-- bug 项目

This commit is contained in:
yuping
2022-12-03 19:57:41 +08:00
parent 3c657d0b25
commit fc6478dd28
5 changed files with 35 additions and 7 deletions

View File

@@ -1,5 +1,10 @@
<template>
<a-tree-select
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
v-model:value="id"
style="width: 100%"
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
@@ -11,7 +16,7 @@
label: 'name',
value: 'id',
}"
:disabled="viewDetail ? true : false"
:disabled="disabled"
@change="change"
dropdownClassName="treeDropdown"
>
@@ -25,7 +30,7 @@ export default {
name: "OrgClass",
props: {
modelValue: {
value: {
type: Number,
},
name: {
@@ -43,20 +48,23 @@ export default {
options: [],
id: props.value
});
watch(state.id, () => {
ctx.emit('update:modelValue', state.id)
})
watch(props, () => {
if (props.modelValue !== state.id) {
state.id = props.modelValue
console.log('props', state)
console.log('props', props)
if (props.value !== state.id) {
state.id = props.value
}
})
onMounted(() => {
state.options = [...store.state.orgtreeList]
console.log(state.options)
})
function change(key, obj) {
console.log(state)
ctx.emit('update:name', obj[0])
ctx.emit('update:value', key)
}
return {