-- bug 项目

This commit is contained in:
yuping
2022-12-03 20:07:39 +08:00
parent b49e47749d
commit c2692a615c

View File

@@ -31,7 +31,7 @@ export default {
props: {
value: {
type: Number,
type: String,
},
name: {
type: String,
@@ -46,14 +46,14 @@ export default {
const state = reactive({
options: [],
id: props.value
id: props.value+''
});
watch(props, () => {
console.log('props', state)
console.log('props', props)
if (props.value !== state.id) {
state.id = props.value
if ((props.value + '') !== state.id) {
state.id = props.value + ''
}
})
onMounted(() => {
@@ -64,7 +64,7 @@ export default {
function change(key, obj) {
console.log(state)
ctx.emit('update:name', obj[0])
ctx.emit('update:value', key)
ctx.emit('update:value', key + '')
}
return {