qidian-vue-ui 2.0.46 → 2.0.47
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/config-provider/index.d.ts +3 -0
- package/dist/components/config-provider/types.d.ts +1 -0
- package/dist/components/config-provider/useConfig.d.ts +4 -0
- package/dist/components/crud/table/index.css +11 -11
- package/dist/components/crud/table/index.vue.mjs +1 -1
- package/dist/components/crud/table/index.vue2.mjs +4 -0
- package/dist/components/crud/table/props.d.ts +1 -0
- package/dist/components/crud/tabs-table/index.vue.d.ts +1 -0
- package/dist/components/crud/tabs-table/index.vue2.mjs +1 -0
- package/dist/components/crud/tabs-table/props.d.ts +1 -0
- package/dist/components/service/table/filter-item.mjs +114 -60
- package/dist/components/service/table/index.css +54 -52
- package/dist/components/service/table/index.vue.mjs +1 -1
- package/dist/components/service/table/index.vue2.mjs +9 -5
- package/dist/components/service/table/props.d.ts +1 -0
- package/dist/components/service/table/props.mjs +1 -0
- package/dist/components/service/table/types.d.ts +1 -0
- package/dist/components/service-dialog-table-select/index.vue2.mjs +3 -0
- package/dist/components/service-dialog-table-select/props.d.ts +1 -0
- package/dist/components/service-dialog-tabs-table-select/index.vue2.mjs +3 -0
- package/dist/components/service-dialog-tabs-table-select/props.d.ts +1 -0
- package/dist/components/service-popup-table-select/index.vue2.mjs +3 -0
- package/dist/components/service-popup-table-select/props.d.ts +1 -0
- package/dist/locales/en-US.d.ts +1 -0
- package/dist/locales/en-US.mjs +2 -1
- package/dist/locales/zh-CN.d.ts +1 -0
- package/dist/locales/zh-CN.mjs +2 -1
- package/dist/locales/zh-TW.d.ts +1 -0
- package/dist/locales/zh-TW.mjs +2 -1
- package/package.json +1 -1
|
@@ -110,6 +110,7 @@ export declare const QdConfigProvider: import("vue").DefineComponent<{
|
|
|
110
110
|
filterItemInputPlaceholder?: string;
|
|
111
111
|
filterItemSearchPlaceholder?: string;
|
|
112
112
|
filterItemAllText?: string;
|
|
113
|
+
filterItemInvertText?: string;
|
|
113
114
|
};
|
|
114
115
|
wrapper?: {
|
|
115
116
|
attach?: import("..").QdDialogProps["attach"];
|
|
@@ -259,6 +260,7 @@ export declare const QdConfigProvider: import("vue").DefineComponent<{
|
|
|
259
260
|
filterItemInputPlaceholder?: string;
|
|
260
261
|
filterItemSearchPlaceholder?: string;
|
|
261
262
|
filterItemAllText?: string;
|
|
263
|
+
filterItemInvertText?: string;
|
|
262
264
|
};
|
|
263
265
|
wrapper?: {
|
|
264
266
|
attach?: import("..").QdDialogProps["attach"];
|
|
@@ -393,6 +395,7 @@ export declare const QdConfigProvider: import("vue").DefineComponent<{
|
|
|
393
395
|
filterItemInputPlaceholder?: string;
|
|
394
396
|
filterItemSearchPlaceholder?: string;
|
|
395
397
|
filterItemAllText?: string;
|
|
398
|
+
filterItemInvertText?: string;
|
|
396
399
|
};
|
|
397
400
|
wrapper?: {
|
|
398
401
|
attach?: import("..").QdDialogProps["attach"];
|
|
@@ -98,6 +98,7 @@ export declare function useConfig<T extends keyof NonNullable<QdConfigProviderPr
|
|
|
98
98
|
filterItemInputPlaceholder?: string;
|
|
99
99
|
filterItemSearchPlaceholder?: string;
|
|
100
100
|
filterItemAllText?: string;
|
|
101
|
+
filterItemInvertText?: string;
|
|
101
102
|
};
|
|
102
103
|
wrapper?: {
|
|
103
104
|
attach?: import("..").QdDialogProps["attach"];
|
|
@@ -230,6 +231,7 @@ export declare function useConfig<T extends keyof NonNullable<QdConfigProviderPr
|
|
|
230
231
|
filterItemInputPlaceholder?: string;
|
|
231
232
|
filterItemSearchPlaceholder?: string;
|
|
232
233
|
filterItemAllText?: string;
|
|
234
|
+
filterItemInvertText?: string;
|
|
233
235
|
};
|
|
234
236
|
wrapper?: {
|
|
235
237
|
attach?: import("..").QdDialogProps["attach"];
|
|
@@ -362,6 +364,7 @@ export declare function useConfig<T extends keyof NonNullable<QdConfigProviderPr
|
|
|
362
364
|
filterItemInputPlaceholder?: string;
|
|
363
365
|
filterItemSearchPlaceholder?: string;
|
|
364
366
|
filterItemAllText?: string;
|
|
367
|
+
filterItemInvertText?: string;
|
|
365
368
|
};
|
|
366
369
|
wrapper?: {
|
|
367
370
|
attach?: import("..").QdDialogProps["attach"];
|
|
@@ -495,6 +498,7 @@ export declare function useConfig<T extends keyof NonNullable<QdConfigProviderPr
|
|
|
495
498
|
filterItemInputPlaceholder?: string;
|
|
496
499
|
filterItemSearchPlaceholder?: string;
|
|
497
500
|
filterItemAllText?: string;
|
|
501
|
+
filterItemInvertText?: string;
|
|
498
502
|
};
|
|
499
503
|
wrapper?: {
|
|
500
504
|
attach?: import("..").QdDialogProps["attach"];
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
.qd-crud-table[data-v-
|
|
1
|
+
.qd-crud-table[data-v-cf0c0269] {
|
|
2
2
|
width: 100%;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
}
|
|
6
|
-
.qd-crud-table > .qd-crud-search:not(.qd-crud-search--hide) + .qd-crud-table__body[data-v-
|
|
6
|
+
.qd-crud-table > .qd-crud-search:not(.qd-crud-search--hide) + .qd-crud-table__body[data-v-cf0c0269] {
|
|
7
7
|
margin-top: var(--td-comp-margin-l);
|
|
8
8
|
}
|
|
9
|
-
.qd-crud-table__body[data-v-
|
|
9
|
+
.qd-crud-table__body[data-v-cf0c0269] > .t-loading__parent > .t-card__body {
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: column;
|
|
12
12
|
}
|
|
13
|
-
.qd-crud-table__body[data-v-
|
|
13
|
+
.qd-crud-table__body[data-v-cf0c0269] > .t-loading__parent > .t-card__body > .qd-service-table .t-table__pagination {
|
|
14
14
|
padding-bottom: 0;
|
|
15
15
|
}
|
|
16
|
-
.qd-crud-table--fit-parent-height[data-v-
|
|
16
|
+
.qd-crud-table--fit-parent-height[data-v-cf0c0269] {
|
|
17
17
|
height: 100%;
|
|
18
18
|
}
|
|
19
|
-
.qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-
|
|
19
|
+
.qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-cf0c0269] {
|
|
20
20
|
flex: auto;
|
|
21
21
|
}
|
|
22
|
-
.qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-
|
|
22
|
+
.qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-cf0c0269] > .t-loading__parent > .t-card__body {
|
|
23
23
|
height: 100%;
|
|
24
24
|
min-height: 443px;
|
|
25
25
|
}
|
|
26
|
-
.qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-
|
|
26
|
+
.qd-crud-table--fit-parent-height > .qd-crud-table__body[data-v-cf0c0269] > .t-loading__parent > .t-card__body > .qd-service-table {
|
|
27
27
|
flex: 1 1 0;
|
|
28
28
|
overflow: hidden;
|
|
29
29
|
}
|
|
30
|
-
.qd-crud-table__toolbar[data-v-
|
|
30
|
+
.qd-crud-table__toolbar[data-v-cf0c0269] {
|
|
31
31
|
display: flex;
|
|
32
32
|
justify-content: space-between;
|
|
33
33
|
}
|
|
34
|
-
.qd-crud-table__toolbar--has-space-item + .qd-service-table[data-v-
|
|
34
|
+
.qd-crud-table__toolbar--has-space-item + .qd-service-table[data-v-cf0c0269] {
|
|
35
35
|
margin-top: var(--td-comp-margin-l);
|
|
36
36
|
}
|
|
37
|
-
.qd-crud-table__toolbar-separator[data-v-
|
|
37
|
+
.qd-crud-table__toolbar-separator[data-v-cf0c0269] {
|
|
38
38
|
display: inline-block;
|
|
39
39
|
padding-left: var(--td-comp-paddingLR-s);
|
|
40
40
|
}
|
|
@@ -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 QdCrudTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const QdCrudTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cf0c0269"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdCrudTable as default
|
|
8
8
|
};
|
|
@@ -81,6 +81,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
81
81
|
headerBg: {
|
|
82
82
|
type: Boolean
|
|
83
83
|
},
|
|
84
|
+
showFilterResult: {
|
|
85
|
+
type: Boolean
|
|
86
|
+
},
|
|
84
87
|
emptyText: {},
|
|
85
88
|
emptyImage: {
|
|
86
89
|
type: [Boolean, String]
|
|
@@ -490,6 +493,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
490
493
|
colKey: "row-select",
|
|
491
494
|
type: reSelectType,
|
|
492
495
|
align: "center",
|
|
496
|
+
fixed: "left",
|
|
493
497
|
width: 50
|
|
494
498
|
};
|
|
495
499
|
if (selectIdx > -1) {
|
|
@@ -43,6 +43,7 @@ export declare const qdCrudTableProps: {
|
|
|
43
43
|
readonly paginationAffixedBottom: undefined;
|
|
44
44
|
readonly pagination: undefined;
|
|
45
45
|
readonly headerBg: true;
|
|
46
|
+
readonly showFilterResult: false;
|
|
46
47
|
readonly loadingWithData: true;
|
|
47
48
|
readonly headerAffixedTop: true;
|
|
48
49
|
readonly activeRowType: "single";
|
|
@@ -193,6 +193,7 @@ declare const _default: <D extends TableRowData = TableRowData, R = unknown, P =
|
|
|
193
193
|
manual?: boolean | undefined;
|
|
194
194
|
selectType?: "single" | "multiple" | undefined;
|
|
195
195
|
headerBg?: boolean | undefined;
|
|
196
|
+
showFilterResult?: boolean | undefined;
|
|
196
197
|
emptyImage?: string | boolean | ((h: typeof import("vue").h) => import("tdesign-vue-next").TNodeReturnValue) | import("tdesign-vue-next").TdImageProps | undefined;
|
|
197
198
|
lazyForm?: boolean | undefined;
|
|
198
199
|
editCellValidationBlock?: import("../../service/table/types").QdServiceTableEditCellValidationBlock | undefined;
|
|
@@ -37,6 +37,7 @@ export declare const qdCrudTabsTableProps: {
|
|
|
37
37
|
readonly paginationAffixedBottom: undefined;
|
|
38
38
|
readonly pagination: undefined;
|
|
39
39
|
readonly headerBg: true;
|
|
40
|
+
readonly showFilterResult: false;
|
|
40
41
|
readonly loadingWithData: true;
|
|
41
42
|
readonly headerAffixedTop: true;
|
|
42
43
|
readonly activeRowType: "single";
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, createVNode, onMounted, onBeforeUnmount } from "vue";
|
|
1
|
+
import { defineComponent, ref, computed, watch, createVNode, Fragment, isVNode, onMounted, onBeforeUnmount } from "vue";
|
|
2
2
|
import { SearchIcon } from "tdesign-icons-vue-next";
|
|
3
|
-
import { Input, Checkbox, Radio } from "tdesign-vue-next";
|
|
3
|
+
import { Input, Checkbox, Divider, Link, Radio } from "tdesign-vue-next";
|
|
4
4
|
import { useConfig } from "../../config-provider/useConfig.mjs";
|
|
5
|
+
function _isSlot(s) {
|
|
6
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
7
|
+
}
|
|
5
8
|
const FilterOptionContent = /* @__PURE__ */ defineComponent({
|
|
6
9
|
props: {
|
|
7
10
|
render: {
|
|
@@ -64,11 +67,15 @@ const QdServiceTableFilterItem = /* @__PURE__ */ defineComponent({
|
|
|
64
67
|
} = useConfig("table");
|
|
65
68
|
const keyword = ref("");
|
|
66
69
|
const renderedTexts = ref(/* @__PURE__ */ new Map());
|
|
70
|
+
const hasKeyword = computed(() => Boolean(keyword.value.trim()));
|
|
67
71
|
const selectedValues = computed(() => {
|
|
68
|
-
if (props.
|
|
69
|
-
|
|
72
|
+
if (props.value === null) return [];
|
|
73
|
+
if (Array.isArray(props.value)) {
|
|
74
|
+
return props.value.length ? props.value : props.options.map((option) => option.value);
|
|
75
|
+
}
|
|
76
|
+
if (props.value !== "" && props.value !== void 0) return [props.value];
|
|
77
|
+
return props.options.map((option) => option.value);
|
|
70
78
|
});
|
|
71
|
-
const allSelected = computed(() => props.type === "multiple" && props.value !== null && (!selectedValues.value.length || props.options.every((option) => selectedValues.value.includes(option.value))));
|
|
72
79
|
const filteredOptions = computed(() => {
|
|
73
80
|
const keywords = keyword.value.trim().toLowerCase().split(/\s+/).filter(Boolean);
|
|
74
81
|
if (!keywords.length) return props.options;
|
|
@@ -77,33 +84,68 @@ const QdServiceTableFilterItem = /* @__PURE__ */ defineComponent({
|
|
|
77
84
|
return keywords.some((item) => label.includes(item));
|
|
78
85
|
});
|
|
79
86
|
});
|
|
87
|
+
const allSelected = computed(() => {
|
|
88
|
+
if (props.value === null) return false;
|
|
89
|
+
if (!hasKeyword.value) {
|
|
90
|
+
if (props.type === "single") return props.value === "" || props.value === void 0;
|
|
91
|
+
return props.options.every((option) => selectedValues.value.includes(option.value));
|
|
92
|
+
}
|
|
93
|
+
const filteredValues = filteredOptions.value.map((option) => option.value);
|
|
94
|
+
return filteredValues.length > 0 && filteredValues.length === selectedValues.value.length && filteredValues.every((value) => selectedValues.value.includes(value));
|
|
95
|
+
});
|
|
80
96
|
const totalCount = computed(() => props.options.reduce((total, option) => total + (option.count ?? 0), 0));
|
|
81
97
|
const selectedCount = computed(() => {
|
|
82
98
|
if (props.value === null) return 0;
|
|
83
|
-
if (allSelected.value || !selectedValues.value.length) return totalCount.value;
|
|
84
99
|
return props.options.reduce((total, option) => selectedValues.value.includes(option.value) ? total + (option.count ?? 0) : total, 0);
|
|
85
100
|
});
|
|
101
|
+
const invertedValues = computed(() => {
|
|
102
|
+
const current = selectedValues.value;
|
|
103
|
+
return filteredOptions.value.flatMap((option) => {
|
|
104
|
+
if (option.disabled) return current.includes(option.value) ? [option.value] : [];
|
|
105
|
+
return current.includes(option.value) ? [] : [option.value];
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
const invertDisabled = computed(() => !filteredOptions.value.some((option) => !option.disabled) || !props.showConfirmAndReset && !invertedValues.value.length);
|
|
109
|
+
function normalizeMultipleValue(values) {
|
|
110
|
+
if (!values.length) return null;
|
|
111
|
+
if (props.options.every((option) => values.includes(option.value))) return [];
|
|
112
|
+
return values;
|
|
113
|
+
}
|
|
114
|
+
function normalizeAllValue(values) {
|
|
115
|
+
if (!values.length) return null;
|
|
116
|
+
if (values.length === props.options.length) return props.type === "single" ? "" : [];
|
|
117
|
+
return values;
|
|
118
|
+
}
|
|
119
|
+
function selectFilteredOptions() {
|
|
120
|
+
if (!props.showConfirmAndReset) return;
|
|
121
|
+
const values = filteredOptions.value.map((option) => option.value);
|
|
122
|
+
props.onChange?.(normalizeAllValue(values));
|
|
123
|
+
}
|
|
86
124
|
function selectAll(checked) {
|
|
125
|
+
const values = filteredOptions.value.map((option) => option.value);
|
|
87
126
|
if (props.type === "single") {
|
|
88
|
-
props.onChange?.(
|
|
127
|
+
props.onChange?.(normalizeAllValue(values));
|
|
89
128
|
return;
|
|
90
129
|
}
|
|
91
|
-
props.onChange?.(checked
|
|
130
|
+
props.onChange?.(checked ? normalizeMultipleValue(values) : null);
|
|
92
131
|
}
|
|
93
132
|
function selectOption(value, checked) {
|
|
94
133
|
if (props.type === "single") {
|
|
95
134
|
props.onChange?.(value);
|
|
96
135
|
return;
|
|
97
136
|
}
|
|
98
|
-
const current =
|
|
137
|
+
const current = selectedValues.value;
|
|
99
138
|
const next = checked ? [.../* @__PURE__ */ new Set([...current, value])] : current.filter((item) => item !== value);
|
|
100
139
|
if (!next.length) {
|
|
101
140
|
if (!props.showConfirmAndReset) return;
|
|
102
141
|
props.onChange?.(null);
|
|
103
142
|
return;
|
|
104
143
|
}
|
|
105
|
-
|
|
106
|
-
|
|
144
|
+
props.onChange?.(normalizeMultipleValue(next));
|
|
145
|
+
}
|
|
146
|
+
function invertSelection() {
|
|
147
|
+
if (invertDisabled.value) return;
|
|
148
|
+
props.onChange?.(normalizeMultipleValue(invertedValues.value));
|
|
107
149
|
}
|
|
108
150
|
function renderOption(option) {
|
|
109
151
|
if (!option.render) return option.label;
|
|
@@ -117,57 +159,69 @@ const QdServiceTableFilterItem = /* @__PURE__ */ defineComponent({
|
|
|
117
159
|
}
|
|
118
160
|
function isOptionDisabled(option) {
|
|
119
161
|
if (option.disabled) return true;
|
|
120
|
-
if (props.showConfirmAndReset
|
|
162
|
+
if (props.showConfirmAndReset) return false;
|
|
121
163
|
return selectedValues.value.length === 1 && selectedValues.value.includes(option.value);
|
|
122
164
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"
|
|
127
|
-
|
|
128
|
-
"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
"
|
|
137
|
-
|
|
138
|
-
"
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
"
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
165
|
+
watch(keyword, selectFilteredOptions);
|
|
166
|
+
return () => {
|
|
167
|
+
let _slot;
|
|
168
|
+
return createVNode("div", {
|
|
169
|
+
"class": "qd-service-table-filter-item"
|
|
170
|
+
}, [createVNode("div", {
|
|
171
|
+
"class": "qd-service-table-filter-item__search"
|
|
172
|
+
}, [createVNode(Input, {
|
|
173
|
+
"modelValue": keyword.value,
|
|
174
|
+
"onUpdate:modelValue": ($event) => keyword.value = $event,
|
|
175
|
+
"clearable": true,
|
|
176
|
+
"placeholder": t("filterItemSearchPlaceholder"),
|
|
177
|
+
"prefixIcon": () => createVNode(SearchIcon, null, null)
|
|
178
|
+
}, null)]), createVNode("div", {
|
|
179
|
+
"class": "qd-service-table-filter-item__all"
|
|
180
|
+
}, [props.type === "multiple" ? createVNode(Fragment, null, [createVNode(Checkbox, {
|
|
181
|
+
"checked": allSelected.value,
|
|
182
|
+
"disabled": !props.showConfirmAndReset && allSelected.value,
|
|
183
|
+
"onChange": selectAll
|
|
184
|
+
}, {
|
|
185
|
+
default: () => [t("filterItemAllText"), createVNode("span", {
|
|
186
|
+
"class": "qd-service-table-filter-item__count"
|
|
187
|
+
}, [`(${selectedCount.value}/${totalCount.value})`])]
|
|
188
|
+
}), createVNode(Divider, {
|
|
189
|
+
"layout": "vertical"
|
|
190
|
+
}, null), createVNode(Link, {
|
|
191
|
+
"hover": "color",
|
|
192
|
+
"disabled": invertDisabled.value,
|
|
193
|
+
"onClick": invertSelection
|
|
194
|
+
}, _isSlot(_slot = t("filterItemInvertText")) ? _slot : {
|
|
195
|
+
default: () => [_slot]
|
|
196
|
+
})]) : createVNode(Radio, {
|
|
197
|
+
"checked": allSelected.value,
|
|
198
|
+
"onChange": selectAll
|
|
199
|
+
}, {
|
|
200
|
+
default: () => [t("filterItemAllText"), createVNode("span", {
|
|
201
|
+
"class": "qd-service-table-filter-item__count"
|
|
202
|
+
}, [`(${selectedCount.value}/${totalCount.value})`])]
|
|
203
|
+
})]), createVNode("div", {
|
|
204
|
+
"class": "qd-service-table-filter-item__options"
|
|
205
|
+
}, [filteredOptions.value.map((option) => props.type === "multiple" ? createVNode(Checkbox, {
|
|
206
|
+
"key": option.value,
|
|
207
|
+
"checked": allSelected.value || selectedValues.value.includes(option.value),
|
|
208
|
+
"disabled": isOptionDisabled(option),
|
|
209
|
+
"onChange": (checked) => selectOption(option.value, checked)
|
|
210
|
+
}, {
|
|
211
|
+
default: () => [renderOption(option), createVNode("span", {
|
|
212
|
+
"class": "qd-service-table-filter-item__count"
|
|
213
|
+
}, [`(${option.count ?? 0})`])]
|
|
214
|
+
}) : createVNode(Radio, {
|
|
215
|
+
"key": option.value,
|
|
216
|
+
"checked": !allSelected.value && selectedValues.value.includes(option.value),
|
|
217
|
+
"disabled": option.disabled,
|
|
218
|
+
"onChange": () => selectOption(option.value, true)
|
|
219
|
+
}, {
|
|
220
|
+
default: () => [renderOption(option), createVNode("span", {
|
|
221
|
+
"class": "qd-service-table-filter-item__count"
|
|
222
|
+
}, [`(${option.count ?? 0})`])]
|
|
223
|
+
}))])]);
|
|
224
|
+
};
|
|
171
225
|
}
|
|
172
226
|
});
|
|
173
227
|
export {
|
|
@@ -1,165 +1,167 @@
|
|
|
1
|
-
.qd-service-table[data-v-
|
|
1
|
+
.qd-service-table[data-v-4ddc7930] {
|
|
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-4ddc7930] > .t-table__content {
|
|
7
7
|
flex: 1;
|
|
8
8
|
}
|
|
9
|
-
.qd-service-table--mini[data-v-
|
|
9
|
+
.qd-service-table--mini[data-v-4ddc7930] {
|
|
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-4ddc7930] th,
|
|
13
|
+
.qd-service-table--mini[data-v-4ddc7930] 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-4ddc7930] .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-4ddc7930] .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-4ddc7930] .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-4ddc7930] .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-4ddc7930] .t-table__empty .t-empty__title {
|
|
30
30
|
margin-top: 0;
|
|
31
31
|
}
|
|
32
|
-
.qd-service-table[data-v-
|
|
32
|
+
.qd-service-table[data-v-4ddc7930] .t-table__tree-col:not(:has(.t-table__tree-op-icon)) {
|
|
33
33
|
margin-left: calc(var(--td-font-size-body-large) + var(--td-comp-margin-s));
|
|
34
34
|
}
|
|
35
|
-
.qd-service-table[data-v-
|
|
35
|
+
.qd-service-table[data-v-4ddc7930] .t-table__tree-leaf-node .t-table__tree-op-icon:empty {
|
|
36
36
|
width: calc(var(--td-font-size-body-large) + var(--td-comp-margin-s));
|
|
37
37
|
}
|
|
38
|
-
.qd-service-table[data-v-
|
|
39
|
-
.qd-service-table[data-v-
|
|
40
|
-
transform: var(--
|
|
38
|
+
.qd-service-table[data-v-4ddc7930] .t-affix > .t-table__affixed-header-elm-wrap,
|
|
39
|
+
.qd-service-table[data-v-4ddc7930] .t-affix > .t-table__scrollbar--obvious {
|
|
40
|
+
transform: var(--v04b6bf58);
|
|
41
41
|
}
|
|
42
|
-
.qd-service-table--horizontal-bar-static[data-v-
|
|
42
|
+
.qd-service-table--horizontal-bar-static[data-v-4ddc7930] .t-table__scrollbar--obvious {
|
|
43
43
|
visibility: hidden;
|
|
44
44
|
pointer-events: none;
|
|
45
45
|
}
|
|
46
|
-
.qd-service-table[data-v-
|
|
46
|
+
.qd-service-table[data-v-4ddc7930] .t-table__expanded-row .qd-service-table--horizontal-bar-static > div:has(> div > .t-table__scrollbar--obvious) {
|
|
47
47
|
display: none;
|
|
48
48
|
}
|
|
49
|
-
.qd-service-table[data-v-
|
|
49
|
+
.qd-service-table[data-v-4ddc7930] .t-table__expanded-row > td {
|
|
50
50
|
height: 0;
|
|
51
51
|
}
|
|
52
|
-
.qd-service-table[data-v-
|
|
52
|
+
.qd-service-table[data-v-4ddc7930] .t-table__affixed-header-elm-wrap {
|
|
53
53
|
height: auto !important;
|
|
54
54
|
}
|
|
55
|
-
.qd-service-table[data-v-
|
|
55
|
+
.qd-service-table[data-v-4ddc7930] .t-table__affixed-header-elm {
|
|
56
56
|
position: relative;
|
|
57
57
|
scrollbar-width: none;
|
|
58
58
|
}
|
|
59
|
-
.qd-service-table[data-v-
|
|
59
|
+
.qd-service-table[data-v-4ddc7930] .t-table__affixed-header-elm::-webkit-scrollbar {
|
|
60
60
|
display: none;
|
|
61
61
|
width: 0;
|
|
62
62
|
height: 0;
|
|
63
63
|
}
|
|
64
|
-
.qd-service-table[data-v-
|
|
64
|
+
.qd-service-table[data-v-4ddc7930] .t-table__virtual-scroll-cursor + table {
|
|
65
65
|
border-collapse: separate;
|
|
66
66
|
}
|
|
67
|
-
.qd-service-table[data-v-
|
|
68
|
-
.qd-service-table[data-v-
|
|
67
|
+
.qd-service-table[data-v-4ddc7930] .t-table__expanded-row-inner,
|
|
68
|
+
.qd-service-table[data-v-4ddc7930] .t-table__row-filter-inner {
|
|
69
69
|
display: block;
|
|
70
70
|
position: sticky;
|
|
71
71
|
left: 0;
|
|
72
|
-
width: var(--
|
|
72
|
+
width: var(--v7006a649) !important;
|
|
73
73
|
}
|
|
74
|
-
.qd-service-table[data-v-
|
|
74
|
+
.qd-service-table[data-v-4ddc7930] .t-table__cell-wrap > .t-form__controls > .t-form__controls-content > *:not(.t-switch):not(.t-tag):not(.t-icon):not(.qd-file-icon) {
|
|
75
75
|
width: 100%;
|
|
76
76
|
}
|
|
77
|
-
.qd-service-table[data-v-
|
|
77
|
+
.qd-service-table[data-v-4ddc7930] .qd-service-table__non-editable-col {
|
|
78
78
|
background-color: color-mix(in srgb, var(--td-bg-color-component) 50%, transparent);
|
|
79
79
|
}
|
|
80
|
-
.qd-service-table[data-v-
|
|
80
|
+
.qd-service-table[data-v-4ddc7930] .qd-service-table__non-editable-col:is(
|
|
81
81
|
.t-table__cell--fixed-left,
|
|
82
82
|
.t-table__cell--fixed-right
|
|
83
83
|
) {
|
|
84
84
|
background-color: inherit;
|
|
85
85
|
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));
|
|
86
86
|
}
|
|
87
|
-
.qd-service-table--disable-horizontal-scroll[data-v-
|
|
87
|
+
.qd-service-table--disable-horizontal-scroll[data-v-4ddc7930] colgroup > col {
|
|
88
88
|
width: auto !important;
|
|
89
89
|
}
|
|
90
|
-
.qd-service-table[data-v-
|
|
90
|
+
.qd-service-table[data-v-4ddc7930] .t-table__filter-pop-content-inner {
|
|
91
91
|
padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s) 0;
|
|
92
92
|
}
|
|
93
|
-
.qd-service-table[data-v-
|
|
93
|
+
.qd-service-table[data-v-4ddc7930] .t-table__filter-pop-content-inner:has(.qd-service-table-filter-item) {
|
|
94
94
|
padding: 0;
|
|
95
95
|
}
|
|
96
|
-
.qd-service-table[data-v-
|
|
96
|
+
.qd-service-table[data-v-4ddc7930] .t-table__filter-pop-content-inner:has(
|
|
97
97
|
.qd-service-table-filter-input,
|
|
98
98
|
.qd-service-table-filter-custom
|
|
99
99
|
) {
|
|
100
100
|
padding-bottom: var(--td-comp-paddingTB-s);
|
|
101
101
|
}
|
|
102
|
-
.qd-service-table[data-v-
|
|
102
|
+
.qd-service-table[data-v-4ddc7930] .t-table__filter--bottom-buttons {
|
|
103
103
|
padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s);
|
|
104
104
|
}
|
|
105
|
-
.qd-service-table--mini[data-v-
|
|
105
|
+
.qd-service-table--mini[data-v-4ddc7930] .t-table__filter-pop-content-inner {
|
|
106
106
|
padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs) 0;
|
|
107
107
|
}
|
|
108
|
-
.qd-service-table--mini[data-v-
|
|
108
|
+
.qd-service-table--mini[data-v-4ddc7930] .t-table__filter--bottom-buttons {
|
|
109
109
|
padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs);
|
|
110
110
|
}
|
|
111
|
-
.qd-service-table--mini[data-v-
|
|
111
|
+
.qd-service-table--mini[data-v-4ddc7930] .t-table__filter-pop-content-inner:has(.qd-service-table-filter-item) {
|
|
112
112
|
padding: 0;
|
|
113
113
|
}
|
|
114
|
-
.qd-service-table--mini[data-v-
|
|
114
|
+
.qd-service-table--mini[data-v-4ddc7930] .t-table__filter-pop-content-inner:has(
|
|
115
115
|
.qd-service-table-filter-input,
|
|
116
116
|
.qd-service-table-filter-custom
|
|
117
117
|
) {
|
|
118
118
|
padding-bottom: var(--td-comp-paddingTB-xs);
|
|
119
119
|
}
|
|
120
|
-
.qd-service-table[data-v-
|
|
120
|
+
.qd-service-table[data-v-4ddc7930] .qd-service-table-filter-item {
|
|
121
121
|
width: 266px;
|
|
122
122
|
}
|
|
123
|
-
.qd-service-table[data-v-
|
|
124
|
-
.qd-service-table[data-v-
|
|
125
|
-
.qd-service-table[data-v-
|
|
123
|
+
.qd-service-table[data-v-4ddc7930] .qd-service-table-filter-item__search,
|
|
124
|
+
.qd-service-table[data-v-4ddc7930] .qd-service-table-filter-item__all,
|
|
125
|
+
.qd-service-table[data-v-4ddc7930] .qd-service-table-filter-item__options {
|
|
126
126
|
padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s) 0;
|
|
127
127
|
}
|
|
128
|
-
.qd-service-table[data-v-
|
|
128
|
+
.qd-service-table[data-v-4ddc7930] .qd-service-table-filter-item__all {
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: center;
|
|
129
131
|
padding: 0 var(--td-comp-paddingLR-s);
|
|
130
132
|
border-bottom: 1px solid var(--td-component-stroke);
|
|
131
133
|
}
|
|
132
|
-
.qd-service-table[data-v-
|
|
134
|
+
.qd-service-table[data-v-4ddc7930] .qd-service-table-filter-item__options {
|
|
133
135
|
display: flex;
|
|
134
136
|
flex-direction: column;
|
|
135
137
|
height: 206px;
|
|
136
138
|
padding: 0 var(--td-comp-paddingLR-s);
|
|
137
139
|
overflow-y: auto;
|
|
138
140
|
}
|
|
139
|
-
.qd-service-table[data-v-
|
|
141
|
+
.qd-service-table[data-v-4ddc7930] .qd-service-table-filter-item__count {
|
|
140
142
|
margin-left: var(--td-comp-margin-xs);
|
|
141
143
|
color: var(--td-text-color-placeholder);
|
|
142
144
|
}
|
|
143
|
-
.qd-service-table[data-v-
|
|
145
|
+
.qd-service-table[data-v-4ddc7930] .qd-service-table-filter-item__cell {
|
|
144
146
|
pointer-events: none;
|
|
145
147
|
}
|
|
146
|
-
.qd-service-table[data-v-
|
|
147
|
-
.qd-service-table[data-v-
|
|
148
|
+
.qd-service-table[data-v-4ddc7930] .qd-service-table-filter-item .t-checkbox,
|
|
149
|
+
.qd-service-table[data-v-4ddc7930] .qd-service-table-filter-item .t-radio {
|
|
148
150
|
display: flex;
|
|
149
151
|
align-items: center;
|
|
150
152
|
}
|
|
151
|
-
.qd-service-table[data-v-
|
|
152
|
-
.qd-service-table[data-v-
|
|
153
|
+
.qd-service-table[data-v-4ddc7930] .qd-service-table-filter-item .t-checkbox__label,
|
|
154
|
+
.qd-service-table[data-v-4ddc7930] .qd-service-table-filter-item .t-radio__label {
|
|
153
155
|
display: inline-flex;
|
|
154
156
|
flex: 1 1 0;
|
|
155
157
|
align-items: center;
|
|
156
158
|
min-width: 0;
|
|
157
159
|
overflow: hidden;
|
|
158
160
|
}
|
|
159
|
-
.qd-service-table--mini[data-v-
|
|
161
|
+
.qd-service-table--mini[data-v-4ddc7930] .qd-service-table-filter-item__search {
|
|
160
162
|
padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs) 0;
|
|
161
163
|
}
|
|
162
|
-
.qd-service-table--mini[data-v-
|
|
163
|
-
.qd-service-table--mini[data-v-
|
|
164
|
+
.qd-service-table--mini[data-v-4ddc7930] .qd-service-table-filter-item__all,
|
|
165
|
+
.qd-service-table--mini[data-v-4ddc7930] .qd-service-table-filter-item__options {
|
|
164
166
|
padding: 0 var(--td-comp-paddingLR-xs);
|
|
165
167
|
}
|
|
@@ -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-4ddc7930"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdServiceTable as default
|
|
8
8
|
};
|
|
@@ -38,6 +38,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
38
38
|
headerBg: {
|
|
39
39
|
type: Boolean
|
|
40
40
|
},
|
|
41
|
+
showFilterResult: {
|
|
42
|
+
type: Boolean
|
|
43
|
+
},
|
|
41
44
|
searchData: {},
|
|
42
45
|
emptyText: {},
|
|
43
46
|
emptyImage: {
|
|
@@ -333,8 +336,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
333
336
|
emit: __emit
|
|
334
337
|
}) {
|
|
335
338
|
useCssVars((_ctx) => ({
|
|
336
|
-
"
|
|
337
|
-
"
|
|
339
|
+
"v04b6bf58": affixedHeaderTransform.value,
|
|
340
|
+
"v7006a649": expandedRowWidth.value
|
|
338
341
|
}));
|
|
339
342
|
const props = __props;
|
|
340
343
|
const emit = __emit;
|
|
@@ -518,6 +521,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
518
521
|
colKey: "row-select",
|
|
519
522
|
type: selectType,
|
|
520
523
|
align: "center",
|
|
524
|
+
fixed: "left",
|
|
521
525
|
width: 50
|
|
522
526
|
};
|
|
523
527
|
if (selectIdx > -1) {
|
|
@@ -601,6 +605,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
601
605
|
size,
|
|
602
606
|
bordered,
|
|
603
607
|
headerAffixedTop,
|
|
608
|
+
showFilterResult,
|
|
604
609
|
horizontalScrollAffixedBottom,
|
|
605
610
|
...tableOptions
|
|
606
611
|
} = props;
|
|
@@ -859,6 +864,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
859
864
|
size: reSize,
|
|
860
865
|
tableOptions: {
|
|
861
866
|
...reTableOptions,
|
|
867
|
+
filterRow: showFilterResult ? reTableOptions.filterRow : null,
|
|
862
868
|
selectOnRowClick: reSelectOnRowClick,
|
|
863
869
|
expandOnRowClick,
|
|
864
870
|
tree: reTree,
|
|
@@ -1872,9 +1878,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1872
1878
|
type
|
|
1873
1879
|
},
|
|
1874
1880
|
component: QdServiceTableFilterItem,
|
|
1875
|
-
|
|
1876
|
-
confirmDisabled: (value) => value === null
|
|
1877
|
-
} : {},
|
|
1881
|
+
confirmDisabled: (value) => value === null,
|
|
1878
1882
|
...!options && reuseCell ? {
|
|
1879
1883
|
renderFilterValue: (_h, {
|
|
1880
1884
|
value
|
|
@@ -32,6 +32,7 @@ export declare const qdServiceTableProps: {
|
|
|
32
32
|
readonly paginationAffixedBottom: undefined;
|
|
33
33
|
readonly pagination: undefined;
|
|
34
34
|
readonly headerBg: true;
|
|
35
|
+
readonly showFilterResult: false;
|
|
35
36
|
readonly loadingWithData: true;
|
|
36
37
|
readonly headerAffixedTop: true;
|
|
37
38
|
readonly activeRowType: "single";
|
|
@@ -77,6 +77,7 @@ export interface QdServiceTableProps<D extends TableRowData = TableRowData, R =
|
|
|
77
77
|
size?: TdEnhancedTableProps<D>['size'] | 'mini';
|
|
78
78
|
selectType?: 'single' | 'multiple';
|
|
79
79
|
headerBg?: boolean;
|
|
80
|
+
showFilterResult?: boolean;
|
|
80
81
|
searchData?: Record<string, unknown>;
|
|
81
82
|
emptyText?: string;
|
|
82
83
|
emptyImage?: boolean | TdEmptyProps['image'];
|
|
@@ -58,6 +58,7 @@ export declare const qdServiceDialogTableSelectProps: {
|
|
|
58
58
|
readonly paginationAffixedBottom: undefined;
|
|
59
59
|
readonly pagination: undefined;
|
|
60
60
|
readonly headerBg: true;
|
|
61
|
+
readonly showFilterResult: false;
|
|
61
62
|
readonly loadingWithData: true;
|
|
62
63
|
readonly headerAffixedTop: true;
|
|
63
64
|
};
|
|
@@ -33,6 +33,7 @@ export declare const qdServiceDialogTabsTableSelectProps: {
|
|
|
33
33
|
readonly paginationAffixedBottom: undefined;
|
|
34
34
|
readonly pagination: undefined;
|
|
35
35
|
readonly headerBg: true;
|
|
36
|
+
readonly showFilterResult: false;
|
|
36
37
|
readonly loadingWithData: true;
|
|
37
38
|
readonly headerAffixedTop: true;
|
|
38
39
|
};
|
|
@@ -32,6 +32,7 @@ export declare const qdServicePopupTableSelectProps: {
|
|
|
32
32
|
readonly paginationAffixedBottom: undefined;
|
|
33
33
|
readonly pagination: undefined;
|
|
34
34
|
readonly headerBg: true;
|
|
35
|
+
readonly showFilterResult: false;
|
|
35
36
|
readonly loadingWithData: true;
|
|
36
37
|
readonly headerAffixedTop: true;
|
|
37
38
|
};
|
package/dist/locales/en-US.d.ts
CHANGED
package/dist/locales/en-US.mjs
CHANGED
|
@@ -96,7 +96,8 @@ const enUS = merge(enUS$1, {
|
|
|
96
96
|
table: {
|
|
97
97
|
filterItemInputPlaceholder: "Enter keywords to filter",
|
|
98
98
|
filterItemSearchPlaceholder: "Search; separate keywords with spaces",
|
|
99
|
-
filterItemAllText: "All"
|
|
99
|
+
filterItemAllText: "All",
|
|
100
|
+
filterItemInvertText: "Invert"
|
|
100
101
|
},
|
|
101
102
|
columnsController: {
|
|
102
103
|
titleText: "Column Configuration",
|
package/dist/locales/zh-CN.d.ts
CHANGED
package/dist/locales/zh-CN.mjs
CHANGED
|
@@ -93,7 +93,8 @@ const zhCN = merge(zhCN$1, {
|
|
|
93
93
|
table: {
|
|
94
94
|
filterItemInputPlaceholder: "输入关键词过滤",
|
|
95
95
|
filterItemSearchPlaceholder: "搜索,支持用空格分隔多个关键词",
|
|
96
|
-
filterItemAllText: "全部"
|
|
96
|
+
filterItemAllText: "全部",
|
|
97
|
+
filterItemInvertText: "反选"
|
|
97
98
|
},
|
|
98
99
|
columnsController: {
|
|
99
100
|
titleText: "列配置",
|
package/dist/locales/zh-TW.d.ts
CHANGED
package/dist/locales/zh-TW.mjs
CHANGED
|
@@ -93,7 +93,8 @@ const zhTW = merge(zhTW$1, {
|
|
|
93
93
|
table: {
|
|
94
94
|
filterItemInputPlaceholder: "輸入關鍵詞過濾",
|
|
95
95
|
filterItemSearchPlaceholder: "搜尋,支援用空格分隔多個關鍵詞",
|
|
96
|
-
filterItemAllText: "全部"
|
|
96
|
+
filterItemAllText: "全部",
|
|
97
|
+
filterItemInvertText: "反選"
|
|
97
98
|
},
|
|
98
99
|
columnsController: {
|
|
99
100
|
titleText: "列配置",
|