mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-19 07:46:46 +08:00
-- bug 项目
This commit is contained in:
@@ -31,7 +31,7 @@ export default {
|
|||||||
|
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
type: Number,
|
type: String,
|
||||||
},
|
},
|
||||||
name: {
|
name: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -46,14 +46,14 @@ export default {
|
|||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
options: [],
|
options: [],
|
||||||
id: props.value
|
id: props.value+''
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(props, () => {
|
watch(props, () => {
|
||||||
console.log('props', state)
|
console.log('props', state)
|
||||||
console.log('props', props)
|
console.log('props', props)
|
||||||
if (props.value !== state.id) {
|
if ((props.value + '') !== state.id) {
|
||||||
state.id = props.value
|
state.id = props.value + ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@@ -64,7 +64,7 @@ export default {
|
|||||||
function change(key, obj) {
|
function change(key, obj) {
|
||||||
console.log(state)
|
console.log(state)
|
||||||
ctx.emit('update:name', obj[0])
|
ctx.emit('update:name', obj[0])
|
||||||
ctx.emit('update:value', key)
|
ctx.emit('update:value', key + '')
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user