-- 项目创建修改

This commit is contained in:
yuping
2022-12-02 17:47:25 +08:00
parent 6b152f68b7
commit 1f5d7359e9
2 changed files with 15 additions and 0 deletions

View File

@@ -33,6 +33,13 @@ export default {
options: [], options: [],
id: props.modelValue id: props.modelValue
}); });
watch(props, () => {
if (props.modelValue !== state.id) {
state.id = props.modelValue
}
})
watch(state.id,()=>{ watch(state.id,()=>{
ctx.emit('update:modelValue',state.id) ctx.emit('update:modelValue',state.id)
}) })

View File

@@ -33,6 +33,14 @@ export default {
watch(state.id, () => { watch(state.id, () => {
ctx.emit('update:modelValue', state.id) ctx.emit('update:modelValue', state.id)
}) })
watch(props, () => {
if (props.modelValue !== state.id) {
state.id = props.modelValue
}
})
onMounted(() => { onMounted(() => {
state.options = store.state.projectSys.map(e => ({value: parseInt(e.dictCode), label: e.dictName})) state.options = store.state.projectSys.map(e => ({value: parseInt(e.dictCode), label: e.dictName}))
}) })