cnhis-design-vue 3.1.8-beta.8 → 3.1.9-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -22
- package/es/packages/big-table/style/index.less +557 -557
- package/es/packages/bpmn-workflow/style/index.less +29 -29
- package/es/packages/button-print/style/index.less +30 -30
- package/es/packages/chunk-upload/src/chunk-upload-new.vue.d.ts +6 -4
- package/es/packages/chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +3 -0
- package/es/packages/chunk-upload/style/index.less +394 -394
- package/es/packages/drag-layout/src/DragLayout.vue.d.ts +8 -5
- package/es/packages/drag-layout/style/index.less +208 -208
- package/es/packages/field-set/style/index.less +157 -157
- package/es/packages/form-render/index.d.ts +14 -0
- package/es/packages/form-render/src/FormRender.vue.d.ts +14 -0
- package/es/packages/form-render/src/FormRender.vue_vue_type_script_setup_true_lang.mjs +12 -4
- package/es/packages/form-render/src/components/complex.d.ts +13 -0
- package/es/packages/form-render/src/components/complex.mjs +31 -0
- package/es/packages/form-render/src/components/index.d.ts +1 -0
- package/es/packages/form-render/src/components/index.mjs +1 -0
- package/es/packages/form-render/src/hooks/useFieldList2Schema.mjs +10 -1
- package/es/packages/form-render/src/types/fieldItem.d.ts +2 -0
- package/es/packages/form-render/style/index.css +8 -0
- package/es/packages/form-render/style/index.less +8 -0
- package/es/packages/form-table/style/index.less +301 -301
- package/es/packages/grid/style/index.less +12 -12
- package/es/packages/index.css +8 -0
- package/es/packages/index.less +2953 -2945
- package/es/packages/info-header/style/index.less +153 -153
- package/es/packages/map/style/index.less +59 -59
- package/es/packages/scale-view/style/index.less +748 -748
- package/es/packages/select-label/src/LabelFormContent.vue.d.ts +3 -0
- package/es/packages/select-label/style/index.less +151 -151
- package/es/packages/select-person/src/SelectPerson.vue.d.ts +6 -8
- package/es/packages/select-person/src/SelectPerson.vue_vue_type_script_setup_true_lang.mjs +43 -18
- package/es/packages/select-person/src/utils/index.mjs +15 -2
- package/es/packages/select-person/style/index.less +229 -229
- package/es/packages/time-line/style/index.less +34 -34
- package/global.d.ts +8 -8
- package/package.json +1 -1
- package/yarn-error.log +103 -8659
|
@@ -165,6 +165,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
165
165
|
tabTextColorHoverCard: string;
|
|
166
166
|
tabTextColorActiveCard: string;
|
|
167
167
|
tabTextColorDisabledCard: string;
|
|
168
|
+
/**
|
|
169
|
+
* 重置label选项
|
|
170
|
+
*/
|
|
168
171
|
barColor: string;
|
|
169
172
|
closeIconColor: string;
|
|
170
173
|
closeIconColorHover: string;
|
|
@@ -1,151 +1,151 @@
|
|
|
1
|
-
.c-select-label {
|
|
2
|
-
.label-disable-wrap {
|
|
3
|
-
width: 100%;
|
|
4
|
-
font-size: 14px;
|
|
5
|
-
line-height: 20px;
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
|
|
10
|
-
.label-disable-img {
|
|
11
|
-
width: 320px;
|
|
12
|
-
height: 248px;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
.common-label {
|
|
16
|
-
padding: 4px 12px;
|
|
17
|
-
margin-top: 8px !important;
|
|
18
|
-
border-radius: 4px;
|
|
19
|
-
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
20
|
-
> span {
|
|
21
|
-
margin-right: 16px;
|
|
22
|
-
color: rgba(0, 0, 0, 0.9);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
.form-add-icon-label {
|
|
26
|
-
margin-bottom: 4px;
|
|
27
|
-
color: #2d7aff;
|
|
28
|
-
cursor: pointer;
|
|
29
|
-
display: inline-flex;
|
|
30
|
-
align-items: center;
|
|
31
|
-
}
|
|
32
|
-
.anticon + .anticon {
|
|
33
|
-
margin-left: 16px;
|
|
34
|
-
}
|
|
35
|
-
.label-disable-wrap {
|
|
36
|
-
text-align: center;
|
|
37
|
-
}
|
|
38
|
-
.n-tag {
|
|
39
|
-
max-width: 108px;
|
|
40
|
-
margin: 0 8px 0 0;
|
|
41
|
-
border: 1px solid rgb(224, 224, 230);
|
|
42
|
-
.n-base-icon {
|
|
43
|
-
color: #fff;
|
|
44
|
-
}
|
|
45
|
-
.n-tag__content {
|
|
46
|
-
display: inline-block;
|
|
47
|
-
align-items: center;
|
|
48
|
-
max-width: 80px;
|
|
49
|
-
height: 100%;
|
|
50
|
-
line-height: 20px;
|
|
51
|
-
overflow: hidden;
|
|
52
|
-
text-overflow: ellipsis;
|
|
53
|
-
white-space: nowrap;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.c-label-form-content {
|
|
59
|
-
width: 100%;
|
|
60
|
-
height: 100%;
|
|
61
|
-
border-top: 1px solid #e8e8e8;
|
|
62
|
-
border-bottom: 1px solid #e8e8e8;
|
|
63
|
-
.label-wrap {
|
|
64
|
-
display: flex;
|
|
65
|
-
width: 100%;
|
|
66
|
-
height: 100%;
|
|
67
|
-
.left-label-wrap {
|
|
68
|
-
width: 140px;
|
|
69
|
-
height: 404px;
|
|
70
|
-
max-height: 404px;
|
|
71
|
-
border-right: 1px solid #e8e8e8;
|
|
72
|
-
&.total-left-label-wrap {
|
|
73
|
-
height: calc(100vh - 109px);
|
|
74
|
-
max-height: calc(100vh - 109px);
|
|
75
|
-
}
|
|
76
|
-
&.explicit-label-wrap {
|
|
77
|
-
width: 100%;
|
|
78
|
-
height: auto;
|
|
79
|
-
overflow: hidden;
|
|
80
|
-
overflow-y: auto;
|
|
81
|
-
}
|
|
82
|
-
.n-anchor.n-anchor--block .n-anchor-link {
|
|
83
|
-
padding: 10px 8px;
|
|
84
|
-
font-size: 14px;
|
|
85
|
-
&.n-anchor-link--active {
|
|
86
|
-
background-color: #f2f2f2;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
.right-label-wrap {
|
|
91
|
-
flex: 1;
|
|
92
|
-
height: 404px;
|
|
93
|
-
max-height: 404px;
|
|
94
|
-
overflow-y: auto;
|
|
95
|
-
&.total-right-label-wrap {
|
|
96
|
-
max-height: calc(100vh - 109px);
|
|
97
|
-
}
|
|
98
|
-
.label-add {
|
|
99
|
-
position: relative;
|
|
100
|
-
top: 2px;
|
|
101
|
-
height: 30px;
|
|
102
|
-
line-height: 30px;
|
|
103
|
-
width: 108px;
|
|
104
|
-
text-align: center;
|
|
105
|
-
display: inline-flex;
|
|
106
|
-
justify-content: center;
|
|
107
|
-
}
|
|
108
|
-
.add-input {
|
|
109
|
-
width: 108px;
|
|
110
|
-
.n-input__suffix {
|
|
111
|
-
cursor: pointer;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
.explicit-continer {
|
|
116
|
-
width: 100%;
|
|
117
|
-
border: 1px solid #d5d5d5;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
.edit-label-type {
|
|
121
|
-
font-size: 12px;
|
|
122
|
-
margin-left: 4px;
|
|
123
|
-
}
|
|
124
|
-
.edit-label-content {
|
|
125
|
-
padding: 0 14px;
|
|
126
|
-
.edit-content {
|
|
127
|
-
width: 100%;
|
|
128
|
-
margin-top: 8px;
|
|
129
|
-
margin-bottom: 10px;
|
|
130
|
-
.n-tag {
|
|
131
|
-
max-width: 108px;
|
|
132
|
-
margin: 0 8px 8px 0;
|
|
133
|
-
text-align: center;
|
|
134
|
-
border: 1px solid rgb(224, 224, 230);
|
|
135
|
-
.n-tag__content {
|
|
136
|
-
display: inline-flex;
|
|
137
|
-
align-items: center;
|
|
138
|
-
span {
|
|
139
|
-
display: inline-block;
|
|
140
|
-
width: 80px;
|
|
141
|
-
height: 100%;
|
|
142
|
-
line-height: 30px;
|
|
143
|
-
overflow: hidden;
|
|
144
|
-
text-overflow: ellipsis;
|
|
145
|
-
white-space: nowrap;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
1
|
+
.c-select-label {
|
|
2
|
+
.label-disable-wrap {
|
|
3
|
+
width: 100%;
|
|
4
|
+
font-size: 14px;
|
|
5
|
+
line-height: 20px;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
|
|
10
|
+
.label-disable-img {
|
|
11
|
+
width: 320px;
|
|
12
|
+
height: 248px;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
.common-label {
|
|
16
|
+
padding: 4px 12px;
|
|
17
|
+
margin-top: 8px !important;
|
|
18
|
+
border-radius: 4px;
|
|
19
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
20
|
+
> span {
|
|
21
|
+
margin-right: 16px;
|
|
22
|
+
color: rgba(0, 0, 0, 0.9);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
.form-add-icon-label {
|
|
26
|
+
margin-bottom: 4px;
|
|
27
|
+
color: #2d7aff;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
}
|
|
32
|
+
.anticon + .anticon {
|
|
33
|
+
margin-left: 16px;
|
|
34
|
+
}
|
|
35
|
+
.label-disable-wrap {
|
|
36
|
+
text-align: center;
|
|
37
|
+
}
|
|
38
|
+
.n-tag {
|
|
39
|
+
max-width: 108px;
|
|
40
|
+
margin: 0 8px 0 0;
|
|
41
|
+
border: 1px solid rgb(224, 224, 230);
|
|
42
|
+
.n-base-icon {
|
|
43
|
+
color: #fff;
|
|
44
|
+
}
|
|
45
|
+
.n-tag__content {
|
|
46
|
+
display: inline-block;
|
|
47
|
+
align-items: center;
|
|
48
|
+
max-width: 80px;
|
|
49
|
+
height: 100%;
|
|
50
|
+
line-height: 20px;
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
text-overflow: ellipsis;
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.c-label-form-content {
|
|
59
|
+
width: 100%;
|
|
60
|
+
height: 100%;
|
|
61
|
+
border-top: 1px solid #e8e8e8;
|
|
62
|
+
border-bottom: 1px solid #e8e8e8;
|
|
63
|
+
.label-wrap {
|
|
64
|
+
display: flex;
|
|
65
|
+
width: 100%;
|
|
66
|
+
height: 100%;
|
|
67
|
+
.left-label-wrap {
|
|
68
|
+
width: 140px;
|
|
69
|
+
height: 404px;
|
|
70
|
+
max-height: 404px;
|
|
71
|
+
border-right: 1px solid #e8e8e8;
|
|
72
|
+
&.total-left-label-wrap {
|
|
73
|
+
height: calc(100vh - 109px);
|
|
74
|
+
max-height: calc(100vh - 109px);
|
|
75
|
+
}
|
|
76
|
+
&.explicit-label-wrap {
|
|
77
|
+
width: 100%;
|
|
78
|
+
height: auto;
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
overflow-y: auto;
|
|
81
|
+
}
|
|
82
|
+
.n-anchor.n-anchor--block .n-anchor-link {
|
|
83
|
+
padding: 10px 8px;
|
|
84
|
+
font-size: 14px;
|
|
85
|
+
&.n-anchor-link--active {
|
|
86
|
+
background-color: #f2f2f2;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
.right-label-wrap {
|
|
91
|
+
flex: 1;
|
|
92
|
+
height: 404px;
|
|
93
|
+
max-height: 404px;
|
|
94
|
+
overflow-y: auto;
|
|
95
|
+
&.total-right-label-wrap {
|
|
96
|
+
max-height: calc(100vh - 109px);
|
|
97
|
+
}
|
|
98
|
+
.label-add {
|
|
99
|
+
position: relative;
|
|
100
|
+
top: 2px;
|
|
101
|
+
height: 30px;
|
|
102
|
+
line-height: 30px;
|
|
103
|
+
width: 108px;
|
|
104
|
+
text-align: center;
|
|
105
|
+
display: inline-flex;
|
|
106
|
+
justify-content: center;
|
|
107
|
+
}
|
|
108
|
+
.add-input {
|
|
109
|
+
width: 108px;
|
|
110
|
+
.n-input__suffix {
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
.explicit-continer {
|
|
116
|
+
width: 100%;
|
|
117
|
+
border: 1px solid #d5d5d5;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
.edit-label-type {
|
|
121
|
+
font-size: 12px;
|
|
122
|
+
margin-left: 4px;
|
|
123
|
+
}
|
|
124
|
+
.edit-label-content {
|
|
125
|
+
padding: 0 14px;
|
|
126
|
+
.edit-content {
|
|
127
|
+
width: 100%;
|
|
128
|
+
margin-top: 8px;
|
|
129
|
+
margin-bottom: 10px;
|
|
130
|
+
.n-tag {
|
|
131
|
+
max-width: 108px;
|
|
132
|
+
margin: 0 8px 8px 0;
|
|
133
|
+
text-align: center;
|
|
134
|
+
border: 1px solid rgb(224, 224, 230);
|
|
135
|
+
.n-tag__content {
|
|
136
|
+
display: inline-flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
span {
|
|
139
|
+
display: inline-block;
|
|
140
|
+
width: 80px;
|
|
141
|
+
height: 100%;
|
|
142
|
+
line-height: 30px;
|
|
143
|
+
overflow: hidden;
|
|
144
|
+
text-overflow: ellipsis;
|
|
145
|
+
white-space: nowrap;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -319,7 +319,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
319
319
|
textColorFocusPrimary: string;
|
|
320
320
|
textColorDisabledPrimary: string;
|
|
321
321
|
textColorTextPrimary: string;
|
|
322
|
-
textColorTextHoverPrimary: string;
|
|
322
|
+
textColorTextHoverPrimary: string; /** 提交映射 */
|
|
323
323
|
textColorTextPressedPrimary: string;
|
|
324
324
|
textColorTextFocusPrimary: string;
|
|
325
325
|
textColorTextDisabledPrimary: string;
|
|
@@ -2146,9 +2146,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2146
2146
|
'--n-clear-color-hover': string;
|
|
2147
2147
|
'--n-clear-color-pressed': string;
|
|
2148
2148
|
'--n-icon-color': string;
|
|
2149
|
-
'--n-icon-color-hover': string;
|
|
2150
|
-
* 拼接key
|
|
2151
|
-
*/
|
|
2149
|
+
'--n-icon-color-hover': string;
|
|
2152
2150
|
'--n-icon-color-pressed': string;
|
|
2153
2151
|
'--n-icon-color-disabled': string;
|
|
2154
2152
|
'--n-suffix-text-color': string;
|
|
@@ -2157,7 +2155,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2157
2155
|
onRender: (() => void) | undefined;
|
|
2158
2156
|
isCompositing: import("vue").Ref<boolean>;
|
|
2159
2157
|
blur: () => void;
|
|
2160
|
-
focus: () => void;
|
|
2158
|
+
focus: () => void; /**
|
|
2159
|
+
* 拼接key
|
|
2160
|
+
*/
|
|
2161
2161
|
select: () => void;
|
|
2162
2162
|
activate: () => void;
|
|
2163
2163
|
deactivate: () => void;
|
|
@@ -2791,9 +2791,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2791
2791
|
hoverColor: string;
|
|
2792
2792
|
tableColorHover: string;
|
|
2793
2793
|
tableColorStriped: string;
|
|
2794
|
-
pressedColor: string;
|
|
2795
|
-
* 过滤默认值的右边展示
|
|
2796
|
-
*/
|
|
2794
|
+
pressedColor: string;
|
|
2797
2795
|
opacityDisabled: string;
|
|
2798
2796
|
inputColorDisabled: string;
|
|
2799
2797
|
buttonColor2: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, reactive, computed, nextTick, watch, onMounted, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, createCommentVNode, createTextVNode, toDisplayString, createBlock, withDirectives, vShow, mergeProps, renderSlot, Fragment, renderList, normalizeClass } from 'vue';
|
|
1
|
+
import { defineComponent, ref, reactive, computed, nextTick, watch, onMounted, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, createCommentVNode, withKeys, createTextVNode, toDisplayString, createBlock, withDirectives, vShow, mergeProps, renderSlot, Fragment, renderList, normalizeClass } from 'vue';
|
|
2
2
|
import { useMessage, NSpin, NInputGroup, NInput, NButton, NCheckbox, NTree, NIcon, NTooltip } from 'naive-ui';
|
|
3
3
|
import { CloseCircleSharp } from '@vicons/ionicons5';
|
|
4
4
|
import vexutils from 'cnhis-design-vue/es/src/utils/vexutils';
|
|
@@ -350,12 +350,13 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
350
350
|
const generateDataList = (data, dataList) => {
|
|
351
351
|
for (let i = 0; i < data.length; i++) {
|
|
352
352
|
const node = data[i];
|
|
353
|
-
dataList.push({
|
|
354
|
-
parentId: getParentId(node),
|
|
355
|
-
...node
|
|
356
|
-
});
|
|
357
353
|
if (node.children) {
|
|
358
354
|
generateDataList(node.children, dataList);
|
|
355
|
+
} else {
|
|
356
|
+
dataList.push({
|
|
357
|
+
parentId: getParentId(node),
|
|
358
|
+
...node
|
|
359
|
+
});
|
|
359
360
|
}
|
|
360
361
|
}
|
|
361
362
|
};
|
|
@@ -508,6 +509,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
508
509
|
state.treeData.main = JSON.parse(JSON.stringify(props.data));
|
|
509
510
|
return;
|
|
510
511
|
}
|
|
512
|
+
state.expandedKeys = [];
|
|
511
513
|
let copyData = JSON.parse(JSON.stringify(props.data));
|
|
512
514
|
state.treeData.main = filterTree({
|
|
513
515
|
value: state.title,
|
|
@@ -515,8 +517,12 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
515
517
|
prop: "title",
|
|
516
518
|
filter: true,
|
|
517
519
|
callback: (child) => {
|
|
520
|
+
var _a;
|
|
521
|
+
child.visible && ((_a = child.children) == null ? void 0 : _a.length) && state.expandedKeys.push(child.key);
|
|
518
522
|
}
|
|
519
523
|
}) || [];
|
|
524
|
+
state.dataList.main = [];
|
|
525
|
+
generateDataList(state.treeData.main, state.dataList.main);
|
|
520
526
|
};
|
|
521
527
|
const onExpand = (expandedKeys) => {
|
|
522
528
|
state.expandedKeys = expandedKeys;
|
|
@@ -537,10 +543,23 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
537
543
|
state.indeterminate = false;
|
|
538
544
|
state.singleChecked = false;
|
|
539
545
|
} else {
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
546
|
+
const getAllKeys = (tree) => {
|
|
547
|
+
if (!(tree == null ? void 0 : tree.length))
|
|
548
|
+
return 0;
|
|
549
|
+
let n = 0;
|
|
550
|
+
tree.forEach((item) => {
|
|
551
|
+
var _a;
|
|
552
|
+
if (!((_a = item == null ? void 0 : item.children) == null ? void 0 : _a.length)) {
|
|
553
|
+
n++;
|
|
554
|
+
} else {
|
|
555
|
+
n += getAllKeys(item.children);
|
|
556
|
+
}
|
|
557
|
+
});
|
|
558
|
+
return n;
|
|
559
|
+
};
|
|
560
|
+
let keys = getAllKeys(state.treeData.main);
|
|
561
|
+
state.indeterminate = !(keys == state.checkedKeys.main.length);
|
|
562
|
+
state.singleChecked = keys == state.checkedKeys.main.length;
|
|
544
563
|
}
|
|
545
564
|
};
|
|
546
565
|
const addCheckedkeysMain = (keys) => {
|
|
@@ -581,9 +600,9 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
581
600
|
};
|
|
582
601
|
const radioChange = (checked) => {
|
|
583
602
|
if (searchTreeVisable.value) {
|
|
584
|
-
state.singleChecked = checked;
|
|
585
|
-
} else {
|
|
586
603
|
state.searchChecked = checked;
|
|
604
|
+
} else {
|
|
605
|
+
state.singleChecked = checked;
|
|
587
606
|
}
|
|
588
607
|
checkAll(checked ? 1 : 2);
|
|
589
608
|
};
|
|
@@ -592,6 +611,8 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
592
611
|
return false;
|
|
593
612
|
if (type == 1) {
|
|
594
613
|
state.expandedKeys = [];
|
|
614
|
+
state.dataList.main = [];
|
|
615
|
+
generateDataList(state.treeData.main, state.dataList.main);
|
|
595
616
|
state.checkedKeys.main = dataListMainKeys.value;
|
|
596
617
|
} else if (type == 2) {
|
|
597
618
|
state.checkedKeys.main = [];
|
|
@@ -766,8 +787,11 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
766
787
|
immediate: true
|
|
767
788
|
});
|
|
768
789
|
watch(() => state.checkedKeys.main, (val) => {
|
|
769
|
-
|
|
770
|
-
|
|
790
|
+
if (!searchTreeVisable.value) {
|
|
791
|
+
isAllCheck(val);
|
|
792
|
+
} else {
|
|
793
|
+
isSearchAllCheck();
|
|
794
|
+
}
|
|
771
795
|
emit("check", val);
|
|
772
796
|
}, {
|
|
773
797
|
immediate: true,
|
|
@@ -797,8 +821,9 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
797
821
|
clearable: "",
|
|
798
822
|
value: state.title,
|
|
799
823
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => state.title = $event),
|
|
800
|
-
placeholder: __props.searchPlaceholder
|
|
801
|
-
|
|
824
|
+
placeholder: __props.searchPlaceholder,
|
|
825
|
+
onKeyup: withKeys(searchClick, ["enter", "native"])
|
|
826
|
+
}, null, 8, ["value", "placeholder", "onKeyup"]), createVNode(unref(NButton), {
|
|
802
827
|
type: "primary",
|
|
803
828
|
onClick: searchClick
|
|
804
829
|
}, {
|
|
@@ -817,15 +842,15 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
817
842
|
}, 8, ["checked", "indeterminate"])) : (openBlock(), createBlock(unref(NCheckbox), {
|
|
818
843
|
key: 1,
|
|
819
844
|
checked: state.singleChecked,
|
|
820
|
-
|
|
821
|
-
|
|
845
|
+
indeterminate: state.searchIndeterminate,
|
|
846
|
+
"onUpdate:checked": radioChange
|
|
822
847
|
}, {
|
|
823
848
|
default: withCtx(() => [_hoisted_5]),
|
|
824
849
|
_: 1
|
|
825
850
|
}, 8, ["checked", "indeterminate"])), createCommentVNode(' <div v-show="state.search.status == 3 || (state.search.status == 0 && state.treeData.main && state.treeData.main.length == 0)" class="no-data-tips">\n \u67E5\u65E0\u7ED3\u679C\n </div> '), createCommentVNode(" main tree "), withDirectives(createVNode(unref(NTree), {
|
|
826
851
|
class: "main-tree-container",
|
|
827
852
|
"checked-keys": state.checkedKeys.main,
|
|
828
|
-
"onUpdate:checked-keys": _cache[
|
|
853
|
+
"onUpdate:checked-keys": _cache[2] || (_cache[2] = ($event) => state.checkedKeys.main = $event),
|
|
829
854
|
"expanded-keys": state.expandedKeys,
|
|
830
855
|
checkable: "",
|
|
831
856
|
cascade: "",
|
|
@@ -19,6 +19,15 @@ const filterTree = ({
|
|
|
19
19
|
let flag = (data2[prop] || "").indexOf(value2) !== -1;
|
|
20
20
|
return filterXor ? !flag : flag;
|
|
21
21
|
};
|
|
22
|
+
const setVisible = (tree, isVisible) => {
|
|
23
|
+
if (!(tree == null ? void 0 : tree.length))
|
|
24
|
+
return;
|
|
25
|
+
tree.forEach((item) => {
|
|
26
|
+
var _a;
|
|
27
|
+
item[visible] = isVisible;
|
|
28
|
+
((_a = item[children]) == null ? void 0 : _a.length) && setVisible(item[children], isVisible);
|
|
29
|
+
});
|
|
30
|
+
};
|
|
22
31
|
const traverse = function(node) {
|
|
23
32
|
const childNodes = node[children] || [];
|
|
24
33
|
childNodes.forEach((child) => {
|
|
@@ -26,10 +35,14 @@ const filterTree = ({
|
|
|
26
35
|
traverse(child);
|
|
27
36
|
callback && callback(child);
|
|
28
37
|
});
|
|
29
|
-
if (
|
|
38
|
+
if (childNodes.length) {
|
|
30
39
|
let allHidden = true;
|
|
31
40
|
allHidden = !childNodes.some((child) => child[visible]);
|
|
32
|
-
node[visible]
|
|
41
|
+
if (!node[visible]) {
|
|
42
|
+
node[visible] = allHidden === false;
|
|
43
|
+
} else {
|
|
44
|
+
setVisible(childNodes, true);
|
|
45
|
+
}
|
|
33
46
|
}
|
|
34
47
|
};
|
|
35
48
|
let totalData = {
|