Commit 3e5a9b34 by xinla

人员选择回显优化

1 parent e22920a5
...@@ -81,18 +81,21 @@ export default { ...@@ -81,18 +81,21 @@ export default {
}) })
this.userList = checkedUserList this.userList = checkedUserList
} }
setTimeout(() => {
this.Pvisible && this.$refs.tree?.setCheckedKeys(value.map((e) => e.userId || e.id))
}, 300)
}, },
immediate: true, immediate: true,
deep: true, deep: true,
}, },
Pvisible(val) { // Pvisible(val) {
val && this.$refs.tree && this.$refs.tree.setCheckedKeys(this.defaultValues.map((e) => e.userId || e.id)) // val && this.$refs.tree && this.$refs.tree.setCheckedKeys(this.defaultValues.map((e) => e.userId || e.id))
if (!this.$refs.tree) { // if (!this.$refs.tree) {
setTimeout(() => { // setTimeout(() => {
this.$refs.tree && this.$refs.tree.setCheckedKeys(this.defaultValues.map((e) => e.userId || e.id)) // this.$refs.tree && this.$refs.tree.setCheckedKeys(this.defaultValues.map((e) => e.userId || e.id))
}, 300) // }, 300)
} // }
}, // },
}, },
computed: { computed: {
Pvisible: { Pvisible: {
...@@ -130,7 +133,9 @@ export default { ...@@ -130,7 +133,9 @@ export default {
return arr return arr
}, },
}, },
created() {}, created() {
console.log(this.$attrs)
},
mounted() {}, mounted() {},
methods: { methods: {
setChange(e) { setChange(e) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!