1: 引入
import { computed } from 'vue'
2:使用
let price = ref(10);
let amount = ref(3);
let total = computed( ()=>{
return price.value*amount.value
})或者
const initSearchData = ref (
[ {
value:
computed(() => objectNo.value).value
}, ]
)
1: 引入
import { computed } from 'vue'
2:使用
let price = ref(10);
let amount = ref(3);
let total = computed( ()=>{
return price.value*amount.value
})或者
const initSearchData = ref (
[ {
value:
computed(() => objectNo.value).value
}, ]
)