qidian-vue-ui 2.8.13 → 2.8.14
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/dist/components/dict/radio-group/index.vue.d.ts +1 -1
- package/dist/components/service/table/index.css +75 -75
- package/dist/components/service/table/index.vue.mjs +1 -1
- package/dist/components/service/table/index.vue2.mjs +24 -13
- package/dist/components/service/table/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ declare const _default: import("vue").DefineComponent<QdDictRadioGroupProps, {},
|
|
|
8
8
|
disabled: boolean;
|
|
9
9
|
readonly: boolean;
|
|
10
10
|
variant: "outline" | "primary-filled" | "default-filled";
|
|
11
|
-
allowUncheck: boolean;
|
|
12
11
|
strict: boolean;
|
|
12
|
+
allowUncheck: boolean;
|
|
13
13
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
export default _default;
|
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
.qd-service-table[data-v-
|
|
1
|
+
.qd-service-table[data-v-497d2494] {
|
|
2
2
|
height: 100%;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
}
|
|
6
|
-
.qd-service-table[data-v-
|
|
6
|
+
.qd-service-table[data-v-497d2494] > .t-table__content {
|
|
7
7
|
flex: 1;
|
|
8
8
|
}
|
|
9
|
-
.qd-service-table--mini[data-v-
|
|
9
|
+
.qd-service-table--mini[data-v-497d2494] {
|
|
10
10
|
font: var(--td-font-body-small);
|
|
11
11
|
}
|
|
12
|
-
.qd-service-table--mini[data-v-
|
|
13
|
-
.qd-service-table--mini[data-v-
|
|
12
|
+
.qd-service-table--mini[data-v-497d2494] th,
|
|
13
|
+
.qd-service-table--mini[data-v-497d2494] tr:not(.t-table__expanded-row) > td {
|
|
14
14
|
padding: var(--td-comp-paddingTB-xxs) var(--td-comp-paddingLR-xxs);
|
|
15
15
|
line-height: var(--td-line-height-body-small);
|
|
16
16
|
}
|
|
17
|
-
.qd-service-table--mini[data-v-
|
|
17
|
+
.qd-service-table--mini[data-v-497d2494] .t-table__row-full-element {
|
|
18
18
|
padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-s);
|
|
19
19
|
}
|
|
20
|
-
.qd-service-table--hide-empty-image[data-v-
|
|
20
|
+
.qd-service-table--hide-empty-image[data-v-497d2494] .t-table__empty {
|
|
21
21
|
min-height: auto;
|
|
22
22
|
}
|
|
23
|
-
.qd-service-table--hide-empty-image[data-v-
|
|
23
|
+
.qd-service-table--hide-empty-image[data-v-497d2494] .t-table__empty .t-empty {
|
|
24
24
|
padding: 0 !important;
|
|
25
25
|
}
|
|
26
|
-
.qd-service-table--hide-empty-image[data-v-
|
|
26
|
+
.qd-service-table--hide-empty-image[data-v-497d2494] .t-table__empty .t-empty__image {
|
|
27
27
|
display: none;
|
|
28
28
|
}
|
|
29
|
-
.qd-service-table--hide-empty-image[data-v-
|
|
29
|
+
.qd-service-table--hide-empty-image[data-v-497d2494] .t-table__empty .t-empty__title {
|
|
30
30
|
margin-top: 0;
|
|
31
31
|
}
|
|
32
|
-
.qd-service-table[data-v-
|
|
33
|
-
.qd-service-table[data-v-
|
|
32
|
+
.qd-service-table[data-v-497d2494] .t-table__tree-col,
|
|
33
|
+
.qd-service-table[data-v-497d2494] .t-table__tree-leaf-node {
|
|
34
34
|
padding-left: 0 !important;
|
|
35
35
|
}
|
|
36
|
-
.qd-service-table[data-v-
|
|
36
|
+
.qd-service-table[data-v-497d2494] .t-table__tree-col:not(:has(.t-table__tree-op-icon)) {
|
|
37
37
|
margin-left: calc(var(--td-font-size-body-large) + var(--td-tree-indent, 0px) * (var(--td-tree-level, 0) + 1));
|
|
38
38
|
}
|
|
39
|
-
.qd-service-table[data-v-
|
|
39
|
+
.qd-service-table[data-v-497d2494] .t-table__tree-op-icon {
|
|
40
40
|
margin-right: calc(var(--td-tree-indent, 0px) * (var(--td-tree-level, 0) + 1));
|
|
41
41
|
}
|
|
42
|
-
.qd-service-table[data-v-
|
|
42
|
+
.qd-service-table[data-v-497d2494] .t-table__tree-leaf-node .t-table__tree-op-icon:empty {
|
|
43
43
|
width: var(--td-font-size-body-large);
|
|
44
44
|
margin-right: calc(var(--td-tree-indent, 0px) * (var(--td-tree-level, 0) + 1));
|
|
45
45
|
}
|
|
46
|
-
.qd-service-table[data-v-
|
|
47
|
-
.qd-service-table[data-v-
|
|
48
|
-
transform: var(--
|
|
46
|
+
.qd-service-table[data-v-497d2494] .t-affix > .t-table__affixed-header-elm-wrap,
|
|
47
|
+
.qd-service-table[data-v-497d2494] .t-affix > .t-table__scrollbar--obvious {
|
|
48
|
+
transform: var(--v646ba155);
|
|
49
49
|
}
|
|
50
|
-
.qd-service-table--horizontal-bar-static[data-v-
|
|
50
|
+
.qd-service-table--horizontal-bar-static[data-v-497d2494] .t-table__scrollbar--obvious {
|
|
51
51
|
visibility: hidden;
|
|
52
52
|
pointer-events: none;
|
|
53
53
|
}
|
|
54
|
-
.qd-service-table--horizontal-bar-static[data-v-
|
|
54
|
+
.qd-service-table--horizontal-bar-static[data-v-497d2494] > div:has(> div > .t-table__scrollbar--obvious) {
|
|
55
55
|
height: 0;
|
|
56
56
|
margin-top: 0 !important;
|
|
57
57
|
overflow: hidden;
|
|
58
58
|
}
|
|
59
|
-
.qd-service-table[data-v-
|
|
59
|
+
.qd-service-table[data-v-497d2494] .t-table__expanded-row .qd-service-table--horizontal-bar-static > div:has(> div > .t-table__scrollbar--obvious) {
|
|
60
60
|
display: none;
|
|
61
61
|
}
|
|
62
|
-
.qd-service-table[data-v-
|
|
62
|
+
.qd-service-table[data-v-497d2494] .t-table__expanded-row > td {
|
|
63
63
|
height: 0;
|
|
64
64
|
}
|
|
65
|
-
.qd-service-table[data-v-
|
|
65
|
+
.qd-service-table[data-v-497d2494] .t-table__affixed-header-elm-wrap {
|
|
66
66
|
height: auto !important;
|
|
67
67
|
}
|
|
68
|
-
.qd-service-table[data-v-
|
|
68
|
+
.qd-service-table[data-v-497d2494] .t-table__affixed-header-elm {
|
|
69
69
|
position: relative;
|
|
70
70
|
scrollbar-width: none;
|
|
71
71
|
}
|
|
72
|
-
.qd-service-table[data-v-
|
|
72
|
+
.qd-service-table[data-v-497d2494] .t-table__affixed-header-elm::-webkit-scrollbar {
|
|
73
73
|
display: none;
|
|
74
74
|
width: 0;
|
|
75
75
|
height: 0;
|
|
76
76
|
}
|
|
77
|
-
.qd-service-table[data-v-
|
|
77
|
+
.qd-service-table[data-v-497d2494] .t-table__virtual-scroll-cursor + table {
|
|
78
78
|
border-collapse: separate;
|
|
79
79
|
}
|
|
80
|
-
.qd-service-table[data-v-
|
|
81
|
-
.qd-service-table[data-v-
|
|
80
|
+
.qd-service-table[data-v-497d2494] .t-table__expanded-row-inner,
|
|
81
|
+
.qd-service-table[data-v-497d2494] .t-table__row-filter-inner {
|
|
82
82
|
display: block;
|
|
83
83
|
position: sticky;
|
|
84
84
|
left: 0;
|
|
85
|
-
width: var(--
|
|
85
|
+
width: var(--v974287ec) !important;
|
|
86
86
|
}
|
|
87
|
-
.qd-service-table[data-v-
|
|
87
|
+
.qd-service-table[data-v-497d2494] .t-table__cell-wrap > .t-form__controls > .t-form__controls-content > *:not(.t-switch):not(.t-tag):not(.t-icon):not(.qd-file-icon) {
|
|
88
88
|
width: 100%;
|
|
89
89
|
}
|
|
90
|
-
.qd-service-table[data-v-
|
|
90
|
+
.qd-service-table[data-v-497d2494] .qd-service-table__non-editable-col {
|
|
91
91
|
background-color: color-mix(in srgb, var(--td-bg-color-component) 50%, transparent);
|
|
92
92
|
}
|
|
93
|
-
.qd-service-table[data-v-
|
|
93
|
+
.qd-service-table[data-v-497d2494] td.qd-service-table__selected-cell {
|
|
94
94
|
box-shadow: inset 0 1px 0 0 var(--qst-sel-t, transparent), inset 0 -1px 0 0 var(--qst-sel-b, transparent), inset 1px 0 0 0 var(--qst-sel-l, transparent), inset -1px 0 0 0 var(--qst-sel-r, transparent);
|
|
95
95
|
}
|
|
96
|
-
.qd-service-table[data-v-
|
|
96
|
+
.qd-service-table[data-v-497d2494] .qd-service-table__selected-bt {
|
|
97
97
|
--qst-sel-t: var(--td-brand-color);
|
|
98
98
|
}
|
|
99
|
-
.qd-service-table[data-v-
|
|
99
|
+
.qd-service-table[data-v-497d2494] .qd-service-table__selected-bb {
|
|
100
100
|
--qst-sel-b: var(--td-brand-color);
|
|
101
101
|
}
|
|
102
|
-
.qd-service-table[data-v-
|
|
102
|
+
.qd-service-table[data-v-497d2494] .qd-service-table__selected-bl {
|
|
103
103
|
--qst-sel-l: var(--td-brand-color);
|
|
104
104
|
}
|
|
105
|
-
.qd-service-table[data-v-
|
|
105
|
+
.qd-service-table[data-v-497d2494] .qd-service-table__selected-br {
|
|
106
106
|
--qst-sel-r: var(--td-brand-color);
|
|
107
107
|
}
|
|
108
|
-
.qd-service-table[data-v-
|
|
108
|
+
.qd-service-table[data-v-497d2494] td.qd-service-table__copied-cell {
|
|
109
109
|
background-image: var(--qst-copy-t, none), var(--qst-copy-b, none), var(--qst-copy-l, none), var(--qst-copy-r, none);
|
|
110
110
|
background-size: 8px 1px,
|
|
111
111
|
8px 1px,
|
|
@@ -116,134 +116,134 @@
|
|
|
116
116
|
0 0,
|
|
117
117
|
100% 0;
|
|
118
118
|
background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
|
|
119
|
-
animation: qst-cell-ants-
|
|
119
|
+
animation: qst-cell-ants-497d2494 0.5s linear infinite;
|
|
120
120
|
}
|
|
121
|
-
.qd-service-table[data-v-
|
|
121
|
+
.qd-service-table[data-v-497d2494] td.qd-service-table__copied-cell.qd-service-table__selected-cell {
|
|
122
122
|
background-size: 8px 2px,
|
|
123
123
|
8px 2px,
|
|
124
124
|
2px 8px,
|
|
125
125
|
2px 8px;
|
|
126
126
|
}
|
|
127
|
-
.qd-service-table[data-v-
|
|
127
|
+
.qd-service-table[data-v-497d2494] .qd-service-table__copied-bt {
|
|
128
128
|
--qst-copy-t: linear-gradient(90deg, var(--td-brand-color-hover) 50%, transparent 0);
|
|
129
129
|
}
|
|
130
|
-
.qd-service-table[data-v-
|
|
130
|
+
.qd-service-table[data-v-497d2494] .qd-service-table__copied-bb {
|
|
131
131
|
--qst-copy-b: linear-gradient(90deg, var(--td-brand-color-hover) 50%, transparent 0);
|
|
132
132
|
}
|
|
133
|
-
.qd-service-table[data-v-
|
|
133
|
+
.qd-service-table[data-v-497d2494] .qd-service-table__copied-bl {
|
|
134
134
|
--qst-copy-l: linear-gradient(0deg, var(--td-brand-color-hover) 50%, transparent 0);
|
|
135
135
|
}
|
|
136
|
-
.qd-service-table[data-v-
|
|
136
|
+
.qd-service-table[data-v-497d2494] .qd-service-table__copied-br {
|
|
137
137
|
--qst-copy-r: linear-gradient(0deg, var(--td-brand-color-hover) 50%, transparent 0);
|
|
138
138
|
}
|
|
139
|
-
.qd-service-table[data-v-
|
|
139
|
+
.qd-service-table[data-v-497d2494] tbody > tr.t-table__row--active {
|
|
140
140
|
background-color: var(--td-brand-color-light);
|
|
141
141
|
}
|
|
142
|
-
.qd-service-table[data-v-
|
|
143
|
-
.qd-service-table[data-v-
|
|
142
|
+
.qd-service-table[data-v-497d2494] tbody > tr.t-table__row--active.t-table__row--hover,
|
|
143
|
+
.qd-service-table[data-v-497d2494] tbody > tr.t-table__row--active:hover {
|
|
144
144
|
background-color: var(--td-brand-color-light-hover);
|
|
145
145
|
}
|
|
146
|
-
.qd-service-table[data-v-
|
|
146
|
+
.qd-service-table[data-v-497d2494] .qd-service-table__non-editable-col:not(.qd-service-table__copied-cell):is(
|
|
147
147
|
.t-table__cell--fixed-left,
|
|
148
148
|
.t-table__cell--fixed-right
|
|
149
149
|
) {
|
|
150
150
|
background-color: inherit;
|
|
151
151
|
background-image: linear-gradient(color-mix(in srgb, var(--td-bg-color-secondarycontainer) 50%, transparent), color-mix(in srgb, var(--td-bg-color-secondarycontainer) 50%, transparent));
|
|
152
152
|
}
|
|
153
|
-
.qd-service-table--disable-horizontal-scroll[data-v-
|
|
153
|
+
.qd-service-table--disable-horizontal-scroll[data-v-497d2494] colgroup > col {
|
|
154
154
|
width: auto !important;
|
|
155
155
|
}
|
|
156
|
-
.qd-service-table--cell-drag-selecting[data-v-
|
|
156
|
+
.qd-service-table--cell-drag-selecting[data-v-497d2494] {
|
|
157
157
|
cursor: crosshair;
|
|
158
158
|
}
|
|
159
|
-
.qd-service-table--cell-drag-selecting[data-v-
|
|
159
|
+
.qd-service-table--cell-drag-selecting[data-v-497d2494] td {
|
|
160
160
|
cursor: crosshair;
|
|
161
161
|
}
|
|
162
|
-
.qd-service-table[data-v-
|
|
162
|
+
.qd-service-table[data-v-497d2494] .t-table__filter-pop-content-inner {
|
|
163
163
|
padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s) 0;
|
|
164
164
|
}
|
|
165
|
-
.qd-service-table[data-v-
|
|
165
|
+
.qd-service-table[data-v-497d2494] .t-table__filter-pop-content-inner:has(.qd-service-table-filter-item) {
|
|
166
166
|
padding: 0;
|
|
167
167
|
}
|
|
168
|
-
.qd-service-table[data-v-
|
|
168
|
+
.qd-service-table[data-v-497d2494] .t-table__filter-pop-content-inner:has(
|
|
169
169
|
.qd-service-table-filter-input,
|
|
170
170
|
.qd-service-table-filter-custom
|
|
171
171
|
) {
|
|
172
172
|
padding-bottom: var(--td-comp-paddingTB-s);
|
|
173
173
|
}
|
|
174
|
-
.qd-service-table[data-v-
|
|
174
|
+
.qd-service-table[data-v-497d2494] .t-table__filter--bottom-buttons {
|
|
175
175
|
padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s);
|
|
176
176
|
}
|
|
177
|
-
.qd-service-table--mini[data-v-
|
|
177
|
+
.qd-service-table--mini[data-v-497d2494] .t-table__filter-pop-content-inner {
|
|
178
178
|
padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs) 0;
|
|
179
179
|
}
|
|
180
|
-
.qd-service-table--mini[data-v-
|
|
180
|
+
.qd-service-table--mini[data-v-497d2494] .t-table__filter--bottom-buttons {
|
|
181
181
|
padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs);
|
|
182
182
|
}
|
|
183
|
-
.qd-service-table--mini[data-v-
|
|
183
|
+
.qd-service-table--mini[data-v-497d2494] .t-table__filter-pop-content-inner:has(.qd-service-table-filter-item) {
|
|
184
184
|
padding: 0;
|
|
185
185
|
}
|
|
186
|
-
.qd-service-table--mini[data-v-
|
|
186
|
+
.qd-service-table--mini[data-v-497d2494] .t-table__filter-pop-content-inner:has(
|
|
187
187
|
.qd-service-table-filter-input,
|
|
188
188
|
.qd-service-table-filter-custom
|
|
189
189
|
) {
|
|
190
190
|
padding-bottom: var(--td-comp-paddingTB-xs);
|
|
191
191
|
}
|
|
192
|
-
.qd-service-table[data-v-
|
|
192
|
+
.qd-service-table[data-v-497d2494] .qd-service-table-filter-item {
|
|
193
193
|
width: 266px;
|
|
194
194
|
}
|
|
195
|
-
.qd-service-table[data-v-
|
|
196
|
-
.qd-service-table[data-v-
|
|
197
|
-
.qd-service-table[data-v-
|
|
195
|
+
.qd-service-table[data-v-497d2494] .qd-service-table-filter-item__search,
|
|
196
|
+
.qd-service-table[data-v-497d2494] .qd-service-table-filter-item__all,
|
|
197
|
+
.qd-service-table[data-v-497d2494] .qd-service-table-filter-item__options {
|
|
198
198
|
padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s) 0;
|
|
199
199
|
}
|
|
200
|
-
.qd-service-table[data-v-
|
|
200
|
+
.qd-service-table[data-v-497d2494] .qd-service-table-filter-item__all {
|
|
201
201
|
display: flex;
|
|
202
202
|
align-items: center;
|
|
203
203
|
padding: 0 var(--td-comp-paddingLR-s);
|
|
204
204
|
border-bottom: 1px solid var(--td-component-stroke);
|
|
205
205
|
}
|
|
206
|
-
.qd-service-table[data-v-
|
|
206
|
+
.qd-service-table[data-v-497d2494] .qd-service-table-filter-item__options {
|
|
207
207
|
display: flex;
|
|
208
208
|
flex-direction: column;
|
|
209
209
|
height: 206px;
|
|
210
210
|
padding: 0 var(--td-comp-paddingLR-s);
|
|
211
211
|
overflow-y: auto;
|
|
212
212
|
}
|
|
213
|
-
.qd-service-table[data-v-
|
|
213
|
+
.qd-service-table[data-v-497d2494] .qd-service-table-filter-item__count {
|
|
214
214
|
margin-left: var(--td-comp-margin-xs);
|
|
215
215
|
color: var(--td-text-color-placeholder);
|
|
216
216
|
}
|
|
217
|
-
.qd-service-table[data-v-
|
|
217
|
+
.qd-service-table[data-v-497d2494] .qd-service-table-filter-item__cell {
|
|
218
218
|
pointer-events: none;
|
|
219
219
|
}
|
|
220
|
-
.qd-service-table[data-v-
|
|
221
|
-
.qd-service-table[data-v-
|
|
220
|
+
.qd-service-table[data-v-497d2494] .qd-service-table-filter-item .t-checkbox,
|
|
221
|
+
.qd-service-table[data-v-497d2494] .qd-service-table-filter-item .t-radio {
|
|
222
222
|
display: flex;
|
|
223
223
|
align-items: center;
|
|
224
224
|
}
|
|
225
|
-
.qd-service-table[data-v-
|
|
226
|
-
.qd-service-table[data-v-
|
|
225
|
+
.qd-service-table[data-v-497d2494] .qd-service-table-filter-item .t-checkbox__label,
|
|
226
|
+
.qd-service-table[data-v-497d2494] .qd-service-table-filter-item .t-radio__label {
|
|
227
227
|
display: inline-flex;
|
|
228
228
|
flex: 1 1 0;
|
|
229
229
|
align-items: center;
|
|
230
230
|
min-width: 0;
|
|
231
231
|
overflow: hidden;
|
|
232
232
|
}
|
|
233
|
-
.qd-service-table--mini[data-v-
|
|
233
|
+
.qd-service-table--mini[data-v-497d2494] .qd-service-table-filter-item__search {
|
|
234
234
|
padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs) 0;
|
|
235
235
|
}
|
|
236
|
-
.qd-service-table--mini[data-v-
|
|
237
|
-
.qd-service-table--mini[data-v-
|
|
236
|
+
.qd-service-table--mini[data-v-497d2494] .qd-service-table-filter-item__all,
|
|
237
|
+
.qd-service-table--mini[data-v-497d2494] .qd-service-table-filter-item__options {
|
|
238
238
|
padding: 0 var(--td-comp-paddingLR-xs);
|
|
239
239
|
}
|
|
240
|
-
@keyframes qst-cell-ants-
|
|
240
|
+
@keyframes qst-cell-ants-497d2494 {
|
|
241
241
|
to {
|
|
242
242
|
background-position: 8px 0, -8px 100%, 0 -8px, 100% 8px;
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
245
|
@media (prefers-reduced-motion: reduce) {
|
|
246
|
-
[data-v-
|
|
246
|
+
[data-v-497d2494] td.qd-service-table__copied-cell {
|
|
247
247
|
animation: none;
|
|
248
248
|
}
|
|
249
249
|
}
|
|
@@ -2,7 +2,7 @@ import './index.css'
|
|
|
2
2
|
import _sfc_main from "./index.vue2.mjs";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
-
const QdServiceTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const QdServiceTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-497d2494"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdServiceTable as default
|
|
8
8
|
};
|
|
@@ -364,8 +364,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
364
364
|
emit: __emit
|
|
365
365
|
}) {
|
|
366
366
|
useCssVars((_ctx) => ({
|
|
367
|
-
"
|
|
368
|
-
"
|
|
367
|
+
"v646ba155": affixedHeaderTransform.value,
|
|
368
|
+
"v974287ec": expandedRowWidth.value
|
|
369
369
|
}));
|
|
370
370
|
const props = __props;
|
|
371
371
|
const emit = __emit;
|
|
@@ -621,17 +621,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
621
621
|
return rows.filter((row) => activeFilters.every(({
|
|
622
622
|
colKey,
|
|
623
623
|
type,
|
|
624
|
-
value
|
|
624
|
+
value,
|
|
625
|
+
strict
|
|
625
626
|
}) => {
|
|
626
627
|
const rowValue = get(row, colKey);
|
|
627
628
|
if (type === "input") {
|
|
628
629
|
return String(rowValue ?? "").toLowerCase().includes(String(value).toLowerCase());
|
|
629
630
|
}
|
|
630
631
|
if (Array.isArray(value)) {
|
|
631
|
-
return value.
|
|
632
|
+
return value.some((item) => item === QD_TABLE_BLANK_FILTER_VALUE ? isEmpty(rowValue) : isFilterValueEqual(rowValue, item, strict));
|
|
632
633
|
}
|
|
633
634
|
if (value === QD_TABLE_BLANK_FILTER_VALUE) return isEmpty(rowValue);
|
|
634
|
-
return rowValue
|
|
635
|
+
return isFilterValueEqual(rowValue, value, strict);
|
|
635
636
|
}));
|
|
636
637
|
});
|
|
637
638
|
const resolvedScroll = computed(() => {
|
|
@@ -2721,16 +2722,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2721
2722
|
if (!isActiveFilterValue(value)) return [];
|
|
2722
2723
|
const filterItem = column.filterItem === true ? {} : column.filterItem;
|
|
2723
2724
|
const type = column.filter?.type ?? (filterItem?.component ? void 0 : filterItem?.type);
|
|
2725
|
+
const strict = filterItem?.strict ?? false;
|
|
2724
2726
|
return [{
|
|
2725
2727
|
colKey: column.colKey,
|
|
2726
2728
|
type,
|
|
2727
|
-
value
|
|
2729
|
+
value,
|
|
2730
|
+
strict
|
|
2728
2731
|
}];
|
|
2729
2732
|
});
|
|
2730
2733
|
}
|
|
2731
|
-
function
|
|
2734
|
+
function isFilterValueEqual(rowValue, filterValue2, strict) {
|
|
2735
|
+
return strict ? rowValue === filterValue2 : String(rowValue) === String(filterValue2);
|
|
2736
|
+
}
|
|
2737
|
+
function resolveFilterOptions(column, configuredOptions, reuseCell = true, strict = false) {
|
|
2732
2738
|
const counts = /* @__PURE__ */ new Map();
|
|
2733
2739
|
const firstRows = /* @__PURE__ */ new Map();
|
|
2740
|
+
const firstValues = /* @__PURE__ */ new Map();
|
|
2734
2741
|
let blankCount = 0;
|
|
2735
2742
|
const colKey = column.colKey;
|
|
2736
2743
|
safeData.value.forEach((row, rowIndex) => {
|
|
@@ -2740,8 +2747,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2740
2747
|
return;
|
|
2741
2748
|
}
|
|
2742
2749
|
if (typeof value !== "string" && typeof value !== "number") return;
|
|
2743
|
-
|
|
2744
|
-
|
|
2750
|
+
const countKey = strict ? value : String(value);
|
|
2751
|
+
counts.set(countKey, (counts.get(countKey) ?? 0) + 1);
|
|
2752
|
+
if (!firstValues.has(countKey)) firstValues.set(countKey, value);
|
|
2753
|
+
if (!firstRows.has(countKey)) firstRows.set(countKey, {
|
|
2745
2754
|
row,
|
|
2746
2755
|
rowIndex
|
|
2747
2756
|
});
|
|
@@ -2749,7 +2758,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2749
2758
|
if (configuredOptions) {
|
|
2750
2759
|
const options2 = configuredOptions.map((option) => ({
|
|
2751
2760
|
...option,
|
|
2752
|
-
count: option.count ?? counts.get(option.value) ?? 0
|
|
2761
|
+
count: option.count ?? counts.get(strict ? option.value : String(option.value)) ?? 0
|
|
2753
2762
|
}));
|
|
2754
2763
|
const blankOption = options2.find((option) => option.value === QD_TABLE_BLANK_FILTER_VALUE);
|
|
2755
2764
|
if (blankOption) {
|
|
@@ -2766,9 +2775,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2766
2775
|
const colIndex = getFilterColumns(props.columns || []).indexOf(column);
|
|
2767
2776
|
const options = [...counts].map(([value, count]) => {
|
|
2768
2777
|
const firstRow = firstRows.get(value);
|
|
2778
|
+
const firstValue = firstValues.get(value);
|
|
2769
2779
|
return {
|
|
2770
2780
|
label: String(value),
|
|
2771
|
-
value,
|
|
2781
|
+
value: firstValue,
|
|
2772
2782
|
count,
|
|
2773
2783
|
...reuseCell && firstRow ? {
|
|
2774
2784
|
render: () => renderDisplayCell(h, column, {
|
|
@@ -2812,6 +2822,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2812
2822
|
options,
|
|
2813
2823
|
reuseCell = true,
|
|
2814
2824
|
type = "multiple",
|
|
2825
|
+
strict = false,
|
|
2815
2826
|
props: filterProps,
|
|
2816
2827
|
...filterOptions
|
|
2817
2828
|
} = config;
|
|
@@ -2837,7 +2848,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2837
2848
|
type
|
|
2838
2849
|
};
|
|
2839
2850
|
} else {
|
|
2840
|
-
const resolvedOptions = resolveFilterOptions(column, options, reuseCell);
|
|
2851
|
+
const resolvedOptions = resolveFilterOptions(column, options, reuseCell, strict);
|
|
2841
2852
|
generatedFilter = {
|
|
2842
2853
|
resetValue: type === "multiple" ? [] : "",
|
|
2843
2854
|
showConfirmAndReset: true,
|
|
@@ -2856,7 +2867,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2856
2867
|
}) => {
|
|
2857
2868
|
const values = Array.isArray(value) ? value : [value];
|
|
2858
2869
|
return values.map((item, index) => {
|
|
2859
|
-
const option = resolvedOptions.find((option2) => option2.value
|
|
2870
|
+
const option = resolvedOptions.find((option2) => isFilterValueEqual(option2.value, item, strict));
|
|
2860
2871
|
const content = option?.render?.() ?? option?.label ?? String(item);
|
|
2861
2872
|
return [index ? "," : null, h("span", {
|
|
2862
2873
|
class: "qd-service-table-filter-item__cell",
|
|
@@ -39,6 +39,7 @@ export interface QdServiceTableFilterItem extends Omit<TableColumnFilter, 'compo
|
|
|
39
39
|
options?: QdServiceTableFilterOption[];
|
|
40
40
|
reuseCell?: boolean;
|
|
41
41
|
type?: 'input' | 'single' | 'multiple';
|
|
42
|
+
strict?: boolean;
|
|
42
43
|
}
|
|
43
44
|
export type QdServiceTableFormItem = Omit<QdFormItemProps, 'name' | 'label' | 'context' | 'col' | 'row' | 'labelWidth' | 'labelAlign'> & {
|
|
44
45
|
lazy?: boolean;
|