Commit ef4b7e08 by xinla

--no commit message

1 parent be107dab
...@@ -43,7 +43,9 @@ export default { ...@@ -43,7 +43,9 @@ export default {
} }
}, },
watch: { watch: {
defaultValues(value) { defaultValues: {
deep: true,
handler(value) {
const checkedUserList = [] const checkedUserList = []
if (!Array.isArray(value) || value.length == 0) { if (!Array.isArray(value) || value.length == 0) {
this.userList = [] this.userList = []
...@@ -58,6 +60,7 @@ export default { ...@@ -58,6 +60,7 @@ export default {
this.userList = checkedUserList this.userList = checkedUserList
} }
}, },
},
Pvisible(val) { Pvisible(val) {
val && this.$refs.tree && this.$refs.tree.setCheckedKeys(this.defaultValues.map((e) => e.deptId)) val && this.$refs.tree && this.$refs.tree.setCheckedKeys(this.defaultValues.map((e) => e.deptId))
if (!this.$refs.tree) { if (!this.$refs.tree) {
......
...@@ -41,6 +41,7 @@ export default { ...@@ -41,6 +41,7 @@ export default {
this.selectList = value this.selectList = value
}, },
immediate: true, immediate: true,
deep: true,
}, },
Pvisible(val) { Pvisible(val) {
this.selectList = this.defaultValues this.selectList = this.defaultValues
......
...@@ -72,6 +72,7 @@ export default { ...@@ -72,6 +72,7 @@ export default {
} }
}, },
immediate: true, immediate: 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))
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!