File tree Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,11 @@ const props = defineProps({
1717 type: Object ,
1818 default : () => ({}),
1919 },
20- disabledData: {
20+ disabledData: { // 用于提示职位关联
21+ type: Array ,
22+ default: [],
23+ },
24+ disabledShowTips: {
2125 type: Array ,
2226 default: [],
2327 },
@@ -38,11 +42,17 @@ const handleData = (arr) => {
3842 if (i .children ? .length ) {
3943 i .children = handleData (i .children );
4044 }
41- if (props .disabledData ? .includes (i .id )) {
42- i .disabled = true ;
43- } else {
44- i .disabled = false ;
45- }
45+
46+ i .disabled = (props .disabledShowTips || []).includes (i .id ) || props .disabledData ? .includes (i .id );
47+
48+ // if (!i.disabled) {
49+ // if (props.disabledData?.includes(i.id)) {
50+ // i.disabled = true;
51+ // } else {
52+ // i.disabled = false;
53+ // }
54+ // }
55+
4656 return i;
4757 });
4858};
@@ -168,7 +178,7 @@ onMounted(() => {
168178 < / div>
169179 < div
170180 v- if = "
171- !disabledData.includes(value) && !_extraData.includes(value)
181+ !disabledData.includes(value) && !_extraData.includes(value) && !disabledShowTips.includes(value)
172182 "
173183 @click .stop = " onClose"
174184 class = " ant-select-selection-item-remove"
You can’t perform that action at this time.
0 commit comments