qidian-vue-ui 2.0.63 → 2.0.65
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/service/table/clipboard.d.ts +3 -2
- package/dist/components/service/table/clipboard.mjs +5 -1
- package/dist/components/service/table/index.css +72 -72
- package/dist/components/service/table/index.d.ts +1 -0
- package/dist/components/service/table/index.vue.mjs +1 -1
- package/dist/components/service/table/index.vue2.mjs +67 -22
- package/dist/components/service/table/props.d.ts +1 -0
- package/dist/components/service/table/props.mjs +2 -0
- package/dist/index.mjs +2 -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
|
@@ -111,6 +111,7 @@ export declare const QdConfigProvider: import("vue").DefineComponent<{
|
|
|
111
111
|
filterItemSearchPlaceholder?: string;
|
|
112
112
|
filterItemAllText?: string;
|
|
113
113
|
filterItemInvertText?: string;
|
|
114
|
+
filterItemBlankText?: string;
|
|
114
115
|
};
|
|
115
116
|
wrapper?: {
|
|
116
117
|
attach?: import("..").QdDialogProps["attach"];
|
|
@@ -261,6 +262,7 @@ export declare const QdConfigProvider: import("vue").DefineComponent<{
|
|
|
261
262
|
filterItemSearchPlaceholder?: string;
|
|
262
263
|
filterItemAllText?: string;
|
|
263
264
|
filterItemInvertText?: string;
|
|
265
|
+
filterItemBlankText?: string;
|
|
264
266
|
};
|
|
265
267
|
wrapper?: {
|
|
266
268
|
attach?: import("..").QdDialogProps["attach"];
|
|
@@ -396,6 +398,7 @@ export declare const QdConfigProvider: import("vue").DefineComponent<{
|
|
|
396
398
|
filterItemSearchPlaceholder?: string;
|
|
397
399
|
filterItemAllText?: string;
|
|
398
400
|
filterItemInvertText?: string;
|
|
401
|
+
filterItemBlankText?: string;
|
|
399
402
|
};
|
|
400
403
|
wrapper?: {
|
|
401
404
|
attach?: import("..").QdDialogProps["attach"];
|
|
@@ -99,6 +99,7 @@ export declare function useConfig<T extends keyof NonNullable<QdConfigProviderPr
|
|
|
99
99
|
filterItemSearchPlaceholder?: string;
|
|
100
100
|
filterItemAllText?: string;
|
|
101
101
|
filterItemInvertText?: string;
|
|
102
|
+
filterItemBlankText?: string;
|
|
102
103
|
};
|
|
103
104
|
wrapper?: {
|
|
104
105
|
attach?: import("..").QdDialogProps["attach"];
|
|
@@ -232,6 +233,7 @@ export declare function useConfig<T extends keyof NonNullable<QdConfigProviderPr
|
|
|
232
233
|
filterItemSearchPlaceholder?: string;
|
|
233
234
|
filterItemAllText?: string;
|
|
234
235
|
filterItemInvertText?: string;
|
|
236
|
+
filterItemBlankText?: string;
|
|
235
237
|
};
|
|
236
238
|
wrapper?: {
|
|
237
239
|
attach?: import("..").QdDialogProps["attach"];
|
|
@@ -365,6 +367,7 @@ export declare function useConfig<T extends keyof NonNullable<QdConfigProviderPr
|
|
|
365
367
|
filterItemSearchPlaceholder?: string;
|
|
366
368
|
filterItemAllText?: string;
|
|
367
369
|
filterItemInvertText?: string;
|
|
370
|
+
filterItemBlankText?: string;
|
|
368
371
|
};
|
|
369
372
|
wrapper?: {
|
|
370
373
|
attach?: import("..").QdDialogProps["attach"];
|
|
@@ -499,6 +502,7 @@ export declare function useConfig<T extends keyof NonNullable<QdConfigProviderPr
|
|
|
499
502
|
filterItemSearchPlaceholder?: string;
|
|
500
503
|
filterItemAllText?: string;
|
|
501
504
|
filterItemInvertText?: string;
|
|
505
|
+
filterItemBlankText?: string;
|
|
502
506
|
};
|
|
503
507
|
wrapper?: {
|
|
504
508
|
attach?: import("..").QdDialogProps["attach"];
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export declare function serializeTsv(rows: string[][]): string;
|
|
1
|
+
export declare function serializeTsv(rows: (string | null)[][]): string;
|
|
2
2
|
export declare function parseTsv(text: string): string[][];
|
|
3
3
|
export type CellHtmlCell = {
|
|
4
4
|
label: string;
|
|
5
5
|
value: string;
|
|
6
|
+
hole?: boolean;
|
|
6
7
|
};
|
|
7
8
|
export declare function serializeCellHtml(rows: CellHtmlCell[][]): string | null;
|
|
8
|
-
export declare function parseCellHtml(html: string): string[][] | null;
|
|
9
|
+
export declare function parseCellHtml(html: string): (string | null)[][] | null;
|
|
@@ -10,6 +10,7 @@ function parseTsv(text) {
|
|
|
10
10
|
}
|
|
11
11
|
const CELL_HTML_FLAG = "data-qd-service-table-clipboard";
|
|
12
12
|
const CELL_HTML_VALUE = "data-qd-value";
|
|
13
|
+
const CELL_HTML_HOLE = "data-qd-hole";
|
|
13
14
|
function serializeCellHtml(rows) {
|
|
14
15
|
if (typeof document === "undefined") return null;
|
|
15
16
|
const table = document.createElement("table");
|
|
@@ -19,6 +20,7 @@ function serializeCellHtml(rows) {
|
|
|
19
20
|
const tr = document.createElement("tr");
|
|
20
21
|
for (const cell of row) {
|
|
21
22
|
const td = document.createElement("td");
|
|
23
|
+
if (cell.hole) td.setAttribute(CELL_HTML_HOLE, "");
|
|
22
24
|
td.setAttribute(CELL_HTML_VALUE, cell.value);
|
|
23
25
|
td.textContent = cell.label;
|
|
24
26
|
tr.appendChild(td);
|
|
@@ -33,7 +35,9 @@ function parseCellHtml(html) {
|
|
|
33
35
|
const doc = new DOMParser().parseFromString(html, "text/html");
|
|
34
36
|
if (!doc.querySelector(`table[${CELL_HTML_FLAG}]`)) return null;
|
|
35
37
|
return Array.from(doc.querySelectorAll("tr")).map(
|
|
36
|
-
(tr) => Array.from(tr.querySelectorAll("td")).map(
|
|
38
|
+
(tr) => Array.from(tr.querySelectorAll("td")).map(
|
|
39
|
+
(td) => td.hasAttribute(CELL_HTML_HOLE) ? null : td.getAttribute(CELL_HTML_VALUE) ?? ""
|
|
40
|
+
)
|
|
37
41
|
);
|
|
38
42
|
}
|
|
39
43
|
export {
|
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
.qd-service-table[data-v-
|
|
1
|
+
.qd-service-table[data-v-bb8ca5b9] {
|
|
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-bb8ca5b9] > .t-table__content {
|
|
7
7
|
flex: 1;
|
|
8
8
|
}
|
|
9
|
-
.qd-service-table--mini[data-v-
|
|
9
|
+
.qd-service-table--mini[data-v-bb8ca5b9] {
|
|
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-bb8ca5b9] th,
|
|
13
|
+
.qd-service-table--mini[data-v-bb8ca5b9] 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-bb8ca5b9] .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-bb8ca5b9] .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-bb8ca5b9] .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-bb8ca5b9] .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-bb8ca5b9] .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-bb8ca5b9] .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-bb8ca5b9] .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-bb8ca5b9] .t-affix > .t-table__affixed-header-elm-wrap,
|
|
39
|
+
.qd-service-table[data-v-bb8ca5b9] .t-affix > .t-table__scrollbar--obvious {
|
|
40
|
+
transform: var(--f9e71248);
|
|
41
41
|
}
|
|
42
|
-
.qd-service-table--horizontal-bar-static[data-v-
|
|
42
|
+
.qd-service-table--horizontal-bar-static[data-v-bb8ca5b9] .t-table__scrollbar--obvious {
|
|
43
43
|
visibility: hidden;
|
|
44
44
|
pointer-events: none;
|
|
45
45
|
}
|
|
46
|
-
.qd-service-table--horizontal-bar-static[data-v-
|
|
46
|
+
.qd-service-table--horizontal-bar-static[data-v-bb8ca5b9] > div:has(> div > .t-table__scrollbar--obvious) {
|
|
47
47
|
height: 0;
|
|
48
48
|
margin-top: 0 !important;
|
|
49
49
|
overflow: hidden;
|
|
50
50
|
}
|
|
51
|
-
.qd-service-table[data-v-
|
|
51
|
+
.qd-service-table[data-v-bb8ca5b9] .t-table__expanded-row .qd-service-table--horizontal-bar-static > div:has(> div > .t-table__scrollbar--obvious) {
|
|
52
52
|
display: none;
|
|
53
53
|
}
|
|
54
|
-
.qd-service-table[data-v-
|
|
54
|
+
.qd-service-table[data-v-bb8ca5b9] .t-table__expanded-row > td {
|
|
55
55
|
height: 0;
|
|
56
56
|
}
|
|
57
|
-
.qd-service-table[data-v-
|
|
57
|
+
.qd-service-table[data-v-bb8ca5b9] .t-table__affixed-header-elm-wrap {
|
|
58
58
|
height: auto !important;
|
|
59
59
|
}
|
|
60
|
-
.qd-service-table[data-v-
|
|
60
|
+
.qd-service-table[data-v-bb8ca5b9] .t-table__affixed-header-elm {
|
|
61
61
|
position: relative;
|
|
62
62
|
scrollbar-width: none;
|
|
63
63
|
}
|
|
64
|
-
.qd-service-table[data-v-
|
|
64
|
+
.qd-service-table[data-v-bb8ca5b9] .t-table__affixed-header-elm::-webkit-scrollbar {
|
|
65
65
|
display: none;
|
|
66
66
|
width: 0;
|
|
67
67
|
height: 0;
|
|
68
68
|
}
|
|
69
|
-
.qd-service-table[data-v-
|
|
69
|
+
.qd-service-table[data-v-bb8ca5b9] .t-table__virtual-scroll-cursor + table {
|
|
70
70
|
border-collapse: separate;
|
|
71
71
|
}
|
|
72
|
-
.qd-service-table[data-v-
|
|
73
|
-
.qd-service-table[data-v-
|
|
72
|
+
.qd-service-table[data-v-bb8ca5b9] .t-table__expanded-row-inner,
|
|
73
|
+
.qd-service-table[data-v-bb8ca5b9] .t-table__row-filter-inner {
|
|
74
74
|
display: block;
|
|
75
75
|
position: sticky;
|
|
76
76
|
left: 0;
|
|
77
|
-
width: var(--
|
|
77
|
+
width: var(--v88d7fa5e) !important;
|
|
78
78
|
}
|
|
79
|
-
.qd-service-table[data-v-
|
|
79
|
+
.qd-service-table[data-v-bb8ca5b9] .t-table__cell-wrap > .t-form__controls > .t-form__controls-content > *:not(.t-switch):not(.t-tag):not(.t-icon):not(.qd-file-icon) {
|
|
80
80
|
width: 100%;
|
|
81
81
|
}
|
|
82
|
-
.qd-service-table[data-v-
|
|
82
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table__non-editable-col {
|
|
83
83
|
background-color: color-mix(in srgb, var(--td-bg-color-component) 50%, transparent);
|
|
84
84
|
}
|
|
85
|
-
.qd-service-table[data-v-
|
|
85
|
+
.qd-service-table[data-v-bb8ca5b9] td.qd-service-table__selected-cell {
|
|
86
86
|
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);
|
|
87
87
|
}
|
|
88
|
-
.qd-service-table[data-v-
|
|
88
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table__selected-bt {
|
|
89
89
|
--qst-sel-t: var(--td-brand-color);
|
|
90
90
|
}
|
|
91
|
-
.qd-service-table[data-v-
|
|
91
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table__selected-bb {
|
|
92
92
|
--qst-sel-b: var(--td-brand-color);
|
|
93
93
|
}
|
|
94
|
-
.qd-service-table[data-v-
|
|
94
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table__selected-bl {
|
|
95
95
|
--qst-sel-l: var(--td-brand-color);
|
|
96
96
|
}
|
|
97
|
-
.qd-service-table[data-v-
|
|
97
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table__selected-br {
|
|
98
98
|
--qst-sel-r: var(--td-brand-color);
|
|
99
99
|
}
|
|
100
|
-
.qd-service-table[data-v-
|
|
100
|
+
.qd-service-table[data-v-bb8ca5b9] td.qd-service-table__copied-cell {
|
|
101
101
|
background-image: var(--qst-copy-t, none), var(--qst-copy-b, none), var(--qst-copy-l, none), var(--qst-copy-r, none);
|
|
102
102
|
background-size: 8px 1px,
|
|
103
103
|
8px 1px,
|
|
@@ -108,134 +108,134 @@
|
|
|
108
108
|
0 0,
|
|
109
109
|
100% 0;
|
|
110
110
|
background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
|
|
111
|
-
animation: qst-cell-ants-
|
|
111
|
+
animation: qst-cell-ants-bb8ca5b9 0.5s linear infinite;
|
|
112
112
|
}
|
|
113
|
-
.qd-service-table[data-v-
|
|
113
|
+
.qd-service-table[data-v-bb8ca5b9] td.qd-service-table__copied-cell.qd-service-table__selected-cell {
|
|
114
114
|
background-size: 8px 2px,
|
|
115
115
|
8px 2px,
|
|
116
116
|
2px 8px,
|
|
117
117
|
2px 8px;
|
|
118
118
|
}
|
|
119
|
-
.qd-service-table[data-v-
|
|
119
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table__copied-bt {
|
|
120
120
|
--qst-copy-t: linear-gradient(90deg, var(--td-brand-color-hover) 50%, transparent 0);
|
|
121
121
|
}
|
|
122
|
-
.qd-service-table[data-v-
|
|
122
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table__copied-bb {
|
|
123
123
|
--qst-copy-b: linear-gradient(90deg, var(--td-brand-color-hover) 50%, transparent 0);
|
|
124
124
|
}
|
|
125
|
-
.qd-service-table[data-v-
|
|
125
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table__copied-bl {
|
|
126
126
|
--qst-copy-l: linear-gradient(0deg, var(--td-brand-color-hover) 50%, transparent 0);
|
|
127
127
|
}
|
|
128
|
-
.qd-service-table[data-v-
|
|
128
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table__copied-br {
|
|
129
129
|
--qst-copy-r: linear-gradient(0deg, var(--td-brand-color-hover) 50%, transparent 0);
|
|
130
130
|
}
|
|
131
|
-
.qd-service-table[data-v-
|
|
131
|
+
.qd-service-table[data-v-bb8ca5b9] tbody > tr.t-table__row--active {
|
|
132
132
|
background-color: var(--td-brand-color-light);
|
|
133
133
|
}
|
|
134
|
-
.qd-service-table[data-v-
|
|
135
|
-
.qd-service-table[data-v-
|
|
134
|
+
.qd-service-table[data-v-bb8ca5b9] tbody > tr.t-table__row--active.t-table__row--hover,
|
|
135
|
+
.qd-service-table[data-v-bb8ca5b9] tbody > tr.t-table__row--active:hover {
|
|
136
136
|
background-color: var(--td-brand-color-light-hover);
|
|
137
137
|
}
|
|
138
|
-
.qd-service-table[data-v-
|
|
138
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table__non-editable-col:not(.qd-service-table__copied-cell):is(
|
|
139
139
|
.t-table__cell--fixed-left,
|
|
140
140
|
.t-table__cell--fixed-right
|
|
141
141
|
) {
|
|
142
142
|
background-color: inherit;
|
|
143
143
|
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));
|
|
144
144
|
}
|
|
145
|
-
.qd-service-table--disable-horizontal-scroll[data-v-
|
|
145
|
+
.qd-service-table--disable-horizontal-scroll[data-v-bb8ca5b9] colgroup > col {
|
|
146
146
|
width: auto !important;
|
|
147
147
|
}
|
|
148
|
-
.qd-service-table--cell-drag-selecting[data-v-
|
|
148
|
+
.qd-service-table--cell-drag-selecting[data-v-bb8ca5b9] {
|
|
149
149
|
cursor: crosshair;
|
|
150
150
|
}
|
|
151
|
-
.qd-service-table--cell-drag-selecting[data-v-
|
|
151
|
+
.qd-service-table--cell-drag-selecting[data-v-bb8ca5b9] td {
|
|
152
152
|
cursor: crosshair;
|
|
153
153
|
}
|
|
154
|
-
.qd-service-table[data-v-
|
|
154
|
+
.qd-service-table[data-v-bb8ca5b9] .t-table__filter-pop-content-inner {
|
|
155
155
|
padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s) 0;
|
|
156
156
|
}
|
|
157
|
-
.qd-service-table[data-v-
|
|
157
|
+
.qd-service-table[data-v-bb8ca5b9] .t-table__filter-pop-content-inner:has(.qd-service-table-filter-item) {
|
|
158
158
|
padding: 0;
|
|
159
159
|
}
|
|
160
|
-
.qd-service-table[data-v-
|
|
160
|
+
.qd-service-table[data-v-bb8ca5b9] .t-table__filter-pop-content-inner:has(
|
|
161
161
|
.qd-service-table-filter-input,
|
|
162
162
|
.qd-service-table-filter-custom
|
|
163
163
|
) {
|
|
164
164
|
padding-bottom: var(--td-comp-paddingTB-s);
|
|
165
165
|
}
|
|
166
|
-
.qd-service-table[data-v-
|
|
166
|
+
.qd-service-table[data-v-bb8ca5b9] .t-table__filter--bottom-buttons {
|
|
167
167
|
padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s);
|
|
168
168
|
}
|
|
169
|
-
.qd-service-table--mini[data-v-
|
|
169
|
+
.qd-service-table--mini[data-v-bb8ca5b9] .t-table__filter-pop-content-inner {
|
|
170
170
|
padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs) 0;
|
|
171
171
|
}
|
|
172
|
-
.qd-service-table--mini[data-v-
|
|
172
|
+
.qd-service-table--mini[data-v-bb8ca5b9] .t-table__filter--bottom-buttons {
|
|
173
173
|
padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs);
|
|
174
174
|
}
|
|
175
|
-
.qd-service-table--mini[data-v-
|
|
175
|
+
.qd-service-table--mini[data-v-bb8ca5b9] .t-table__filter-pop-content-inner:has(.qd-service-table-filter-item) {
|
|
176
176
|
padding: 0;
|
|
177
177
|
}
|
|
178
|
-
.qd-service-table--mini[data-v-
|
|
178
|
+
.qd-service-table--mini[data-v-bb8ca5b9] .t-table__filter-pop-content-inner:has(
|
|
179
179
|
.qd-service-table-filter-input,
|
|
180
180
|
.qd-service-table-filter-custom
|
|
181
181
|
) {
|
|
182
182
|
padding-bottom: var(--td-comp-paddingTB-xs);
|
|
183
183
|
}
|
|
184
|
-
.qd-service-table[data-v-
|
|
184
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table-filter-item {
|
|
185
185
|
width: 266px;
|
|
186
186
|
}
|
|
187
|
-
.qd-service-table[data-v-
|
|
188
|
-
.qd-service-table[data-v-
|
|
189
|
-
.qd-service-table[data-v-
|
|
187
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table-filter-item__search,
|
|
188
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table-filter-item__all,
|
|
189
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table-filter-item__options {
|
|
190
190
|
padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s) 0;
|
|
191
191
|
}
|
|
192
|
-
.qd-service-table[data-v-
|
|
192
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table-filter-item__all {
|
|
193
193
|
display: flex;
|
|
194
194
|
align-items: center;
|
|
195
195
|
padding: 0 var(--td-comp-paddingLR-s);
|
|
196
196
|
border-bottom: 1px solid var(--td-component-stroke);
|
|
197
197
|
}
|
|
198
|
-
.qd-service-table[data-v-
|
|
198
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table-filter-item__options {
|
|
199
199
|
display: flex;
|
|
200
200
|
flex-direction: column;
|
|
201
201
|
height: 206px;
|
|
202
202
|
padding: 0 var(--td-comp-paddingLR-s);
|
|
203
203
|
overflow-y: auto;
|
|
204
204
|
}
|
|
205
|
-
.qd-service-table[data-v-
|
|
205
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table-filter-item__count {
|
|
206
206
|
margin-left: var(--td-comp-margin-xs);
|
|
207
207
|
color: var(--td-text-color-placeholder);
|
|
208
208
|
}
|
|
209
|
-
.qd-service-table[data-v-
|
|
209
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table-filter-item__cell {
|
|
210
210
|
pointer-events: none;
|
|
211
211
|
}
|
|
212
|
-
.qd-service-table[data-v-
|
|
213
|
-
.qd-service-table[data-v-
|
|
212
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table-filter-item .t-checkbox,
|
|
213
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table-filter-item .t-radio {
|
|
214
214
|
display: flex;
|
|
215
215
|
align-items: center;
|
|
216
216
|
}
|
|
217
|
-
.qd-service-table[data-v-
|
|
218
|
-
.qd-service-table[data-v-
|
|
217
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table-filter-item .t-checkbox__label,
|
|
218
|
+
.qd-service-table[data-v-bb8ca5b9] .qd-service-table-filter-item .t-radio__label {
|
|
219
219
|
display: inline-flex;
|
|
220
220
|
flex: 1 1 0;
|
|
221
221
|
align-items: center;
|
|
222
222
|
min-width: 0;
|
|
223
223
|
overflow: hidden;
|
|
224
224
|
}
|
|
225
|
-
.qd-service-table--mini[data-v-
|
|
225
|
+
.qd-service-table--mini[data-v-bb8ca5b9] .qd-service-table-filter-item__search {
|
|
226
226
|
padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs) 0;
|
|
227
227
|
}
|
|
228
|
-
.qd-service-table--mini[data-v-
|
|
229
|
-
.qd-service-table--mini[data-v-
|
|
228
|
+
.qd-service-table--mini[data-v-bb8ca5b9] .qd-service-table-filter-item__all,
|
|
229
|
+
.qd-service-table--mini[data-v-bb8ca5b9] .qd-service-table-filter-item__options {
|
|
230
230
|
padding: 0 var(--td-comp-paddingLR-xs);
|
|
231
231
|
}
|
|
232
|
-
@keyframes qst-cell-ants-
|
|
232
|
+
@keyframes qst-cell-ants-bb8ca5b9 {
|
|
233
233
|
to {
|
|
234
234
|
background-position: 8px 0, -8px 100%, 0 -8px, 100% 8px;
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
@media (prefers-reduced-motion: reduce) {
|
|
238
|
-
[data-v-
|
|
238
|
+
[data-v-bb8ca5b9] td.qd-service-table__copied-cell {
|
|
239
239
|
animation: none;
|
|
240
240
|
}
|
|
241
241
|
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { default as QdServiceTable } from './index.vue';
|
|
2
|
+
export { QD_TABLE_BLANK_FILTER_VALUE } from './props';
|
|
2
3
|
export type { QdServiceTableCol, QdServiceTableFilterItem, QdServiceTableFilterOption, QdServiceTableFormItem, QdServiceTableInstanceFunctions, QdServiceTablePagination, QdServiceTablePaginationConfig, QdServiceTableProps, QdServiceTableScroll, QdServiceTableSubmitRowContext, QdServiceTableSubmitTableContext, QdServiceTableValidateParams, QdServiceTableValidateRowContext, QdServiceTableValidateTableContext } from './types';
|
|
@@ -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-bb8ca5b9"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdServiceTable as default
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './index.css'
|
|
2
2
|
import { defineComponent, mergeDefaults, useCssVars, computed, ref, useSlots, useTemplateRef, shallowRef, inject, getCurrentInstance, reactive, createVNode, unref, watch, nextTick, onMounted, onActivated, onDeactivated, onBeforeUnmount, withDirectives, createBlock, openBlock, resolveDynamicComponent, mergeProps, isRef, createSlots, withCtx, renderList, renderSlot, normalizeProps, guardReactiveProps, h, render } from "vue";
|
|
3
3
|
import { useVModels, useElementSize, useElementBounding, useIntersectionObserver } from "../../../node_modules/.pnpm/@vueuse_core@14.2.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.mjs";
|
|
4
|
-
import { useActivated, useTimer, useServicePagination, easyCopy,
|
|
4
|
+
import { useActivated, useTimer, isEmpty, useServicePagination, easyCopy, suspectedWrapperPromise, getScrollEl, createExposeProxy, resizeDirective, to } from "qidian-shared";
|
|
5
5
|
import { LoadingIcon, AddRectangleIcon, MinusRectangleIcon } from "tdesign-icons-vue-next";
|
|
6
6
|
import { EnhancedTable, Table, Empty } from "tdesign-vue-next";
|
|
7
7
|
import { validate } from "tdesign-vue-next/es/form/utils/form-model.mjs";
|
|
@@ -12,7 +12,7 @@ import { getQdFormComponentName, resolveQdFormItemOptions } from "../../form/uti
|
|
|
12
12
|
import { serializeTsv, serializeCellHtml, parseTsv, parseCellHtml } from "./clipboard.mjs";
|
|
13
13
|
import QdServiceTableEditCell from "./edit-cell.mjs";
|
|
14
14
|
import QdServiceTableFilterItem from "./filter-item.mjs";
|
|
15
|
-
import { qdServiceTableTreeConfig, qdServiceTableProps, getSortParams } from "./props.mjs";
|
|
15
|
+
import { QD_TABLE_BLANK_FILTER_VALUE, qdServiceTableTreeConfig, qdServiceTableProps, getSortParams } from "./props.mjs";
|
|
16
16
|
import { useReadonly } from "../../../hooks/useReadonly.mjs";
|
|
17
17
|
import { useDisabled } from "../../../hooks/useDisabled.mjs";
|
|
18
18
|
import { PROVIDE_FORM_ADD_BEFORE_SUBMIT_QUEUE } from "../../form/config.mjs";
|
|
@@ -359,8 +359,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
359
359
|
emit: __emit
|
|
360
360
|
}) {
|
|
361
361
|
useCssVars((_ctx) => ({
|
|
362
|
-
"
|
|
363
|
-
"
|
|
362
|
+
"f9e71248": affixedHeaderTransform.value,
|
|
363
|
+
"v88d7fa5e": expandedRowWidth.value
|
|
364
364
|
}));
|
|
365
365
|
const props = __props;
|
|
366
366
|
const emit = __emit;
|
|
@@ -614,7 +614,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
614
614
|
if (type === "input") {
|
|
615
615
|
return String(rowValue ?? "").toLowerCase().includes(String(value).toLowerCase());
|
|
616
616
|
}
|
|
617
|
-
if (Array.isArray(value))
|
|
617
|
+
if (Array.isArray(value)) {
|
|
618
|
+
return value.includes(rowValue) || isEmpty(rowValue) && value.includes(QD_TABLE_BLANK_FILTER_VALUE);
|
|
619
|
+
}
|
|
620
|
+
if (value === QD_TABLE_BLANK_FILTER_VALUE) return isEmpty(rowValue);
|
|
618
621
|
return rowValue === value;
|
|
619
622
|
}));
|
|
620
623
|
});
|
|
@@ -1635,15 +1638,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1635
1638
|
for (let colIdx = colStart; colIdx <= colEnd; colIdx++) {
|
|
1636
1639
|
const position = positions.find((item) => item.rowIdx === rowIdx && item.colIdx === colIdx);
|
|
1637
1640
|
const column = columns[colIdx];
|
|
1638
|
-
cells.push({
|
|
1639
|
-
row,
|
|
1640
|
-
colKey: String(column.colKey)
|
|
1641
|
-
});
|
|
1642
1641
|
if (!position) {
|
|
1643
|
-
rowValues.push(
|
|
1642
|
+
rowValues.push(null);
|
|
1644
1643
|
rowLabels.push("");
|
|
1645
1644
|
continue;
|
|
1646
1645
|
}
|
|
1646
|
+
cells.push({
|
|
1647
|
+
row,
|
|
1648
|
+
colKey: String(column.colKey)
|
|
1649
|
+
});
|
|
1647
1650
|
const colKey = String(column.colKey);
|
|
1648
1651
|
rowValues.push(resolveCellText(row, colKey));
|
|
1649
1652
|
if (column.transformCopy) {
|
|
@@ -1698,7 +1701,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1698
1701
|
const valueText = serializeTsv(selection.valueGrid);
|
|
1699
1702
|
const html = serializeCellHtml(selection.valueGrid.map((rowValues, rowIdx) => rowValues.map((value, colIdx) => ({
|
|
1700
1703
|
label: selection.labelGrid[rowIdx][colIdx],
|
|
1701
|
-
value
|
|
1704
|
+
value: value ?? "",
|
|
1705
|
+
hole: value === null
|
|
1702
1706
|
}))));
|
|
1703
1707
|
const [error] = await to(writeClipboard(plain, html));
|
|
1704
1708
|
if (error) {
|
|
@@ -1730,14 +1734,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1730
1734
|
await navigator.clipboard.writeText(plain);
|
|
1731
1735
|
return;
|
|
1732
1736
|
}
|
|
1733
|
-
const
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1737
|
+
const container = document.createElement("div");
|
|
1738
|
+
container.contentEditable = "true";
|
|
1739
|
+
container.style.position = "fixed";
|
|
1740
|
+
container.style.opacity = "0";
|
|
1741
|
+
container.textContent = plain;
|
|
1742
|
+
document.body.appendChild(container);
|
|
1743
|
+
const range = document.createRange();
|
|
1744
|
+
range.selectNodeContents(container);
|
|
1745
|
+
const selection = document.getSelection();
|
|
1746
|
+
selection?.removeAllRanges();
|
|
1747
|
+
selection?.addRange(range);
|
|
1748
|
+
const handleCopy = (event) => {
|
|
1749
|
+
event.clipboardData?.setData("text/plain", plain);
|
|
1750
|
+
if (html) event.clipboardData?.setData("text/html", html);
|
|
1751
|
+
event.preventDefault();
|
|
1752
|
+
};
|
|
1753
|
+
document.addEventListener("copy", handleCopy);
|
|
1739
1754
|
const copied = document.execCommand("copy");
|
|
1740
|
-
|
|
1755
|
+
document.removeEventListener("copy", handleCopy);
|
|
1756
|
+
selection?.removeAllRanges();
|
|
1757
|
+
container.remove();
|
|
1741
1758
|
if (!copied) throw new Error("[QdServiceTable.writeClipboard] execCommand 复制剪贴板失败");
|
|
1742
1759
|
}
|
|
1743
1760
|
function canCopySelectedCells(target) {
|
|
@@ -1816,6 +1833,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1816
1833
|
label
|
|
1817
1834
|
} of plan) {
|
|
1818
1835
|
if (!row || !column) continue;
|
|
1836
|
+
if (value === null) {
|
|
1837
|
+
skipped++;
|
|
1838
|
+
continue;
|
|
1839
|
+
}
|
|
1819
1840
|
if (!isPasteTargetCell(column, row)) {
|
|
1820
1841
|
skipped++;
|
|
1821
1842
|
continue;
|
|
@@ -1825,7 +1846,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1825
1846
|
row,
|
|
1826
1847
|
rowIndex,
|
|
1827
1848
|
column,
|
|
1828
|
-
value: htmlValue,
|
|
1849
|
+
value: htmlValue ?? void 0,
|
|
1829
1850
|
label
|
|
1830
1851
|
}) : value;
|
|
1831
1852
|
writeCellPasteValue(row, colKey, writtenValue);
|
|
@@ -1851,6 +1872,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1851
1872
|
const row = rows[rowIdx];
|
|
1852
1873
|
const column = columns[colIdx];
|
|
1853
1874
|
if (!row || !column) continue;
|
|
1875
|
+
if (grid[rowIdx - anchorRowIdx][colIdx - anchorColIdx] === null) continue;
|
|
1854
1876
|
cells.push({
|
|
1855
1877
|
row,
|
|
1856
1878
|
colKey: String(column.colKey)
|
|
@@ -2506,11 +2528,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2506
2528
|
function resolveFilterOptions(column, configuredOptions, reuseCell = true) {
|
|
2507
2529
|
const counts = /* @__PURE__ */ new Map();
|
|
2508
2530
|
const firstRows = /* @__PURE__ */ new Map();
|
|
2531
|
+
let blankCount = 0;
|
|
2509
2532
|
const colKey = column.colKey;
|
|
2510
2533
|
data.value.forEach((row, rowIndex) => {
|
|
2511
2534
|
const value = colKey ? get(row, colKey) : void 0;
|
|
2535
|
+
if (isEmpty(value)) {
|
|
2536
|
+
blankCount += 1;
|
|
2537
|
+
return;
|
|
2538
|
+
}
|
|
2512
2539
|
if (typeof value !== "string" && typeof value !== "number") return;
|
|
2513
|
-
if (value === "") return;
|
|
2514
2540
|
counts.set(value, (counts.get(value) ?? 0) + 1);
|
|
2515
2541
|
if (!firstRows.has(value)) firstRows.set(value, {
|
|
2516
2542
|
row,
|
|
@@ -2518,13 +2544,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2518
2544
|
});
|
|
2519
2545
|
});
|
|
2520
2546
|
if (configuredOptions) {
|
|
2521
|
-
|
|
2547
|
+
const options2 = configuredOptions.map((option) => ({
|
|
2522
2548
|
...option,
|
|
2523
2549
|
count: option.count ?? counts.get(option.value) ?? 0
|
|
2524
2550
|
}));
|
|
2551
|
+
const blankOption = options2.find((option) => option.value === QD_TABLE_BLANK_FILTER_VALUE);
|
|
2552
|
+
if (blankOption) {
|
|
2553
|
+
blankOption.count = blankCount;
|
|
2554
|
+
} else if (blankCount) {
|
|
2555
|
+
options2.unshift({
|
|
2556
|
+
label: tableT("filterItemBlankText"),
|
|
2557
|
+
value: QD_TABLE_BLANK_FILTER_VALUE,
|
|
2558
|
+
count: blankCount
|
|
2559
|
+
});
|
|
2560
|
+
}
|
|
2561
|
+
return options2;
|
|
2525
2562
|
}
|
|
2526
2563
|
const colIndex = getFilterColumns(props.columns || []).indexOf(column);
|
|
2527
|
-
|
|
2564
|
+
const options = [...counts].map(([value, count]) => {
|
|
2528
2565
|
const firstRow = firstRows.get(value);
|
|
2529
2566
|
return {
|
|
2530
2567
|
label: String(value),
|
|
@@ -2539,6 +2576,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2539
2576
|
} : {}
|
|
2540
2577
|
};
|
|
2541
2578
|
});
|
|
2579
|
+
if (blankCount) {
|
|
2580
|
+
options.unshift({
|
|
2581
|
+
label: tableT("filterItemBlankText"),
|
|
2582
|
+
value: QD_TABLE_BLANK_FILTER_VALUE,
|
|
2583
|
+
count: blankCount
|
|
2584
|
+
});
|
|
2585
|
+
}
|
|
2586
|
+
return options;
|
|
2542
2587
|
}
|
|
2543
2588
|
function createConfigFilterComponent(component) {
|
|
2544
2589
|
return /* @__PURE__ */ defineComponent({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const QD_TABLE_BLANK_FILTER_VALUE = "__qd_table_blank__";
|
|
1
2
|
const qdServiceTableProps = {
|
|
2
3
|
data: () => [],
|
|
3
4
|
selectedRowKeys: () => [],
|
|
@@ -57,6 +58,7 @@ function getSortParams(sortValue) {
|
|
|
57
58
|
};
|
|
58
59
|
}
|
|
59
60
|
export {
|
|
61
|
+
QD_TABLE_BLANK_FILTER_VALUE,
|
|
60
62
|
getSortParams,
|
|
61
63
|
qdServiceTableProps,
|
|
62
64
|
qdServiceTableTreeConfig
|
package/dist/index.mjs
CHANGED
|
@@ -42,6 +42,7 @@ import { default as default29 } from "./components/org/tag/index.vue.mjs";
|
|
|
42
42
|
import { default as default30 } from "./components/read-write/index.vue.mjs";
|
|
43
43
|
import { default as default31 } from "./components/service/list/index.vue.mjs";
|
|
44
44
|
import { default as default32 } from "./components/service/table/index.vue.mjs";
|
|
45
|
+
import { QD_TABLE_BLANK_FILTER_VALUE } from "./components/service/table/props.mjs";
|
|
45
46
|
import { default as default33 } from "./components/service-dialog-table-select/index.vue.mjs";
|
|
46
47
|
import { defineQdServiceDialogTableSelect } from "./components/service-dialog-table-select/define.mjs";
|
|
47
48
|
import { default as default34 } from "./components/service-dialog-tabs-table-select/index.vue.mjs";
|
|
@@ -72,6 +73,7 @@ export {
|
|
|
72
73
|
PROVIDE_FORM_RESET_QUEUE,
|
|
73
74
|
PROVIDE_GRID_ITEM_PROPS_KEY,
|
|
74
75
|
PROVIDE_GRID_WIDTH_KEY,
|
|
76
|
+
QD_TABLE_BLANK_FILTER_VALUE,
|
|
75
77
|
default12 as QdAutoTooltip,
|
|
76
78
|
default13 as QdAvatar,
|
|
77
79
|
default14 as QdCard,
|
package/dist/locales/en-US.d.ts
CHANGED
package/dist/locales/en-US.mjs
CHANGED
|
@@ -97,7 +97,8 @@ const enUS = merge(enUS$1, {
|
|
|
97
97
|
filterItemInputPlaceholder: "Enter keywords to filter",
|
|
98
98
|
filterItemSearchPlaceholder: "Search; separate keywords with spaces",
|
|
99
99
|
filterItemAllText: "All",
|
|
100
|
-
filterItemInvertText: "Invert"
|
|
100
|
+
filterItemInvertText: "Invert",
|
|
101
|
+
filterItemBlankText: "(Blank cell)"
|
|
101
102
|
},
|
|
102
103
|
columnsController: {
|
|
103
104
|
titleText: "Column Configuration",
|
package/dist/locales/zh-CN.d.ts
CHANGED
package/dist/locales/zh-CN.mjs
CHANGED
|
@@ -94,7 +94,8 @@ const zhCN = merge(zhCN$1, {
|
|
|
94
94
|
filterItemInputPlaceholder: "输入关键词过滤",
|
|
95
95
|
filterItemSearchPlaceholder: "搜索,支持用空格分隔多个关键词",
|
|
96
96
|
filterItemAllText: "全部",
|
|
97
|
-
filterItemInvertText: "反选"
|
|
97
|
+
filterItemInvertText: "反选",
|
|
98
|
+
filterItemBlankText: "(空白单元格)"
|
|
98
99
|
},
|
|
99
100
|
columnsController: {
|
|
100
101
|
titleText: "列配置",
|
package/dist/locales/zh-TW.d.ts
CHANGED
package/dist/locales/zh-TW.mjs
CHANGED
|
@@ -94,7 +94,8 @@ const zhTW = merge(zhTW$1, {
|
|
|
94
94
|
filterItemInputPlaceholder: "輸入關鍵詞過濾",
|
|
95
95
|
filterItemSearchPlaceholder: "搜尋,支援用空格分隔多個關鍵詞",
|
|
96
96
|
filterItemAllText: "全部",
|
|
97
|
-
filterItemInvertText: "反選"
|
|
97
|
+
filterItemInvertText: "反選",
|
|
98
|
+
filterItemBlankText: "(空白儲存格)"
|
|
98
99
|
},
|
|
99
100
|
columnsController: {
|
|
100
101
|
titleText: "列配置",
|