mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-17 14:56:46 +08:00
-- bug 项目
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user