qidian-vue-ui 2.4.2 → 2.4.4
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/crud/table/index.css +11 -11
- package/dist/components/crud/table/index.vue.mjs +1 -1
- package/dist/components/crud/table/index.vue2.mjs +3 -2
- 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 +34 -33
- package/dist/components/upload/index.css +45 -45
- package/dist/components/upload/index.vue.mjs +1 -1
- package/dist/components/upload/index.vue2.mjs +23 -19
- package/package.json +1 -1
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
.qd-crud-table[data-v-
|
|
1
|
+
.qd-crud-table[data-v-c856531a] {
|
|
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-c856531a] {
|
|
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-c856531a] > .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-c856531a] > .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-c856531a] {
|
|
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-c856531a] {
|
|
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-c856531a] > .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-c856531a] > .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-c856531a] {
|
|
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-c856531a] {
|
|
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-c856531a] {
|
|
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-c856531a"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdCrudTable as default
|
|
8
8
|
};
|
|
@@ -413,6 +413,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
413
413
|
} = useVModels(props, emit, {
|
|
414
414
|
passive: true
|
|
415
415
|
});
|
|
416
|
+
const safeData = computed(() => data.value ?? []);
|
|
416
417
|
const {
|
|
417
418
|
t,
|
|
418
419
|
size: globalComponentSize
|
|
@@ -964,7 +965,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
964
965
|
if (getData) {
|
|
965
966
|
return props.tree ? getData(item)?.row : getData(item);
|
|
966
967
|
}
|
|
967
|
-
return
|
|
968
|
+
return safeData.value.find((it) => get(it, rowKey) === item);
|
|
968
969
|
}).filter(Boolean);
|
|
969
970
|
if (typeof checkChildren === "function") {
|
|
970
971
|
let result = await checkChildren({
|
|
@@ -973,7 +974,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
973
974
|
selectedRowKeys: selectedRowKeys.value,
|
|
974
975
|
rowKey,
|
|
975
976
|
childrenKey,
|
|
976
|
-
tableData:
|
|
977
|
+
tableData: safeData.value
|
|
977
978
|
});
|
|
978
979
|
if (typeof result === "boolean") {
|
|
979
980
|
result = {
|
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
.qd-service-table[data-v-
|
|
1
|
+
.qd-service-table[data-v-1787ac4b] {
|
|
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-1787ac4b] > .t-table__content {
|
|
7
7
|
flex: 1;
|
|
8
8
|
}
|
|
9
|
-
.qd-service-table--mini[data-v-
|
|
9
|
+
.qd-service-table--mini[data-v-1787ac4b] {
|
|
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-1787ac4b] th,
|
|
13
|
+
.qd-service-table--mini[data-v-1787ac4b] 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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .t-table__tree-col,
|
|
33
|
+
.qd-service-table[data-v-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .t-affix > .t-table__affixed-header-elm-wrap,
|
|
47
|
+
.qd-service-table[data-v-1787ac4b] .t-affix > .t-table__scrollbar--obvious {
|
|
48
|
+
transform: var(--v1c05dfca);
|
|
49
49
|
}
|
|
50
|
-
.qd-service-table--horizontal-bar-static[data-v-
|
|
50
|
+
.qd-service-table--horizontal-bar-static[data-v-1787ac4b] .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-1787ac4b] > 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-1787ac4b] .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-1787ac4b] .t-table__expanded-row > td {
|
|
63
63
|
height: 0;
|
|
64
64
|
}
|
|
65
|
-
.qd-service-table[data-v-
|
|
65
|
+
.qd-service-table[data-v-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .t-table__expanded-row-inner,
|
|
81
|
+
.qd-service-table[data-v-1787ac4b] .t-table__row-filter-inner {
|
|
82
82
|
display: block;
|
|
83
83
|
position: sticky;
|
|
84
84
|
left: 0;
|
|
85
|
-
width: var(--
|
|
85
|
+
width: var(--v6c443750) !important;
|
|
86
86
|
}
|
|
87
|
-
.qd-service-table[data-v-
|
|
87
|
+
.qd-service-table[data-v-1787ac4b] .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-1787ac4b] .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-1787ac4b] 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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] 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-1787ac4b 0.5s linear infinite;
|
|
120
120
|
}
|
|
121
|
-
.qd-service-table[data-v-
|
|
121
|
+
.qd-service-table[data-v-1787ac4b] 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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] 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-1787ac4b] tbody > tr.t-table__row--active.t-table__row--hover,
|
|
143
|
+
.qd-service-table[data-v-1787ac4b] 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-1787ac4b] .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-1787ac4b] 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-1787ac4b] {
|
|
157
157
|
cursor: crosshair;
|
|
158
158
|
}
|
|
159
|
-
.qd-service-table--cell-drag-selecting[data-v-
|
|
159
|
+
.qd-service-table--cell-drag-selecting[data-v-1787ac4b] td {
|
|
160
160
|
cursor: crosshair;
|
|
161
161
|
}
|
|
162
|
-
.qd-service-table[data-v-
|
|
162
|
+
.qd-service-table[data-v-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .qd-service-table-filter-item__search,
|
|
196
|
+
.qd-service-table[data-v-1787ac4b] .qd-service-table-filter-item__all,
|
|
197
|
+
.qd-service-table[data-v-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .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-1787ac4b] .qd-service-table-filter-item .t-checkbox,
|
|
221
|
+
.qd-service-table[data-v-1787ac4b] .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-1787ac4b] .qd-service-table-filter-item .t-checkbox__label,
|
|
226
|
+
.qd-service-table[data-v-1787ac4b] .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-1787ac4b] .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-1787ac4b] .qd-service-table-filter-item__all,
|
|
237
|
+
.qd-service-table--mini[data-v-1787ac4b] .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-1787ac4b {
|
|
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-1787ac4b] 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-1787ac4b"]]);
|
|
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
|
+
"v1c05dfca": affixedHeaderTransform.value,
|
|
368
|
+
"v6c443750": expandedRowWidth.value
|
|
369
369
|
}));
|
|
370
370
|
const props = __props;
|
|
371
371
|
const emit = __emit;
|
|
@@ -383,6 +383,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
383
383
|
} = useVModels(props, emit, {
|
|
384
384
|
passive: true
|
|
385
385
|
});
|
|
386
|
+
const safeData = computed(() => data.value ?? []);
|
|
386
387
|
const innerSort = ref(getDefaultSort());
|
|
387
388
|
const reSort = computed({
|
|
388
389
|
get: () => sort.value ?? innerSort.value,
|
|
@@ -493,7 +494,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
493
494
|
return prototype === Object.prototype || prototype === null;
|
|
494
495
|
}
|
|
495
496
|
function getExpandedRowProxy(row) {
|
|
496
|
-
const sourceRow =
|
|
497
|
+
const sourceRow = safeData.value.find((item) => getRowValue(item) === getRowValue(row)) ?? row;
|
|
497
498
|
const cached = expandedRowProxyMap.get(sourceRow);
|
|
498
499
|
if (cached) return cached;
|
|
499
500
|
const proxies = /* @__PURE__ */ new WeakMap();
|
|
@@ -611,7 +612,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
611
612
|
return result;
|
|
612
613
|
});
|
|
613
614
|
const displayData = computed(() => {
|
|
614
|
-
const rows =
|
|
615
|
+
const rows = safeData.value;
|
|
615
616
|
if (props.onFilterChange) return rows;
|
|
616
617
|
if (props.service && props.pagination !== false) return rows;
|
|
617
618
|
const activeFilters = getActiveFilterEntries();
|
|
@@ -1368,7 +1369,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1368
1369
|
}
|
|
1369
1370
|
function replaceTableValidationErrors(result) {
|
|
1370
1371
|
const nextErrors = /* @__PURE__ */ new Map();
|
|
1371
|
-
for (const row of
|
|
1372
|
+
for (const row of safeData.value) {
|
|
1372
1373
|
const rowValue = getRowValue(row);
|
|
1373
1374
|
const rowErrors = /* @__PURE__ */ new Map();
|
|
1374
1375
|
for (const {
|
|
@@ -1440,7 +1441,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1440
1441
|
return selectedCells.value.some((item) => getRowValue(item.row) === getRowValue(row) && item.colKey === colKey);
|
|
1441
1442
|
}
|
|
1442
1443
|
function isSelectedCellAt(rowIndex, colIndex) {
|
|
1443
|
-
const row =
|
|
1444
|
+
const row = safeData.value[rowIndex];
|
|
1444
1445
|
const column = leafColumns.value[colIndex];
|
|
1445
1446
|
if (!row || !column) return false;
|
|
1446
1447
|
return isSelectedCell(row, column.colKey);
|
|
@@ -1449,7 +1450,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1449
1450
|
return copiedCells.value.some((item) => getRowValue(item.row) === getRowValue(row) && item.colKey === colKey);
|
|
1450
1451
|
}
|
|
1451
1452
|
function isCopiedCellAt(rowIndex, colIndex) {
|
|
1452
|
-
const row =
|
|
1453
|
+
const row = safeData.value[rowIndex];
|
|
1453
1454
|
const column = leafColumns.value[colIndex];
|
|
1454
1455
|
if (!row || !column) return false;
|
|
1455
1456
|
return isCopiedCell(row, column.colKey);
|
|
@@ -1462,7 +1463,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1462
1463
|
const columns = leafColumns.value;
|
|
1463
1464
|
const fromCol = columns.findIndex((col) => col.colKey === anchor.colKey);
|
|
1464
1465
|
const toCol = columns.findIndex((col) => col.colKey === target.colKey);
|
|
1465
|
-
const rows =
|
|
1466
|
+
const rows = safeData.value;
|
|
1466
1467
|
const fromRow = rows.findIndex((row) => getRowValue(row) === getRowValue(anchor.row));
|
|
1467
1468
|
const toRow = rows.findIndex((row) => getRowValue(row) === getRowValue(target.row));
|
|
1468
1469
|
if (fromCol < 0 || toCol < 0 || fromRow < 0 || toRow < 0) return [target];
|
|
@@ -1494,8 +1495,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1494
1495
|
if (seen.has(rowValue)) continue;
|
|
1495
1496
|
seen.add(rowValue);
|
|
1496
1497
|
rowKeys.push(rowValue);
|
|
1497
|
-
const rowIndex =
|
|
1498
|
-
if (!isRowSelectDisabled(rowIndex >= 0 ?
|
|
1498
|
+
const rowIndex = safeData.value.findIndex((row) => getRowValue(row) === rowValue);
|
|
1499
|
+
if (!isRowSelectDisabled(rowIndex >= 0 ? safeData.value[rowIndex] : item.row, rowIndex)) {
|
|
1499
1500
|
checkableRowKeys.push(rowValue);
|
|
1500
1501
|
}
|
|
1501
1502
|
}
|
|
@@ -1520,7 +1521,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1520
1521
|
function emitRowSelectChange(clickedRow, type) {
|
|
1521
1522
|
if (!rowClickSelectsRows.value) return;
|
|
1522
1523
|
const rowKeys = [...selectedRowKeys.value];
|
|
1523
|
-
const selectedRowData = rowKeys.map((key) =>
|
|
1524
|
+
const selectedRowData = rowKeys.map((key) => safeData.value.find((row) => getRowValue(row) === key)).filter((row) => !!row);
|
|
1524
1525
|
props.onSelectChange?.(rowKeys, {
|
|
1525
1526
|
selectedRowData,
|
|
1526
1527
|
currentRowKey: String(getRowValue(clickedRow)),
|
|
@@ -1550,8 +1551,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1550
1551
|
const nextKeys = new Set(selectedRowKeys.value);
|
|
1551
1552
|
for (const rowValue of nextRows) {
|
|
1552
1553
|
if (prevRows.has(rowValue)) continue;
|
|
1553
|
-
const rowIndex =
|
|
1554
|
-
if (rowIndex >= 0 && !isRowSelectDisabled(
|
|
1554
|
+
const rowIndex = safeData.value.findIndex((row) => getRowValue(row) === rowValue);
|
|
1555
|
+
if (rowIndex >= 0 && !isRowSelectDisabled(safeData.value[rowIndex], rowIndex)) {
|
|
1555
1556
|
nextKeys.add(rowValue);
|
|
1556
1557
|
}
|
|
1557
1558
|
}
|
|
@@ -1595,7 +1596,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1595
1596
|
const columns = leafColumns.value;
|
|
1596
1597
|
const fromCol = columns.findIndex((col) => col.colKey === anchor.colKey);
|
|
1597
1598
|
const toCol = columns.findIndex((col) => col.colKey === target.colKey);
|
|
1598
|
-
const rows =
|
|
1599
|
+
const rows = safeData.value;
|
|
1599
1600
|
const fromRow = rows.findIndex((row) => getRowValue(row) === getRowValue(anchor.row));
|
|
1600
1601
|
const toRow = rows.findIndex((row) => getRowValue(row) === getRowValue(target.row));
|
|
1601
1602
|
if (fromCol < 0 || toCol < 0 || fromRow < 0 || toRow < 0) return null;
|
|
@@ -1618,7 +1619,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1618
1619
|
if (dragCellCache.has(td)) return dragCellCache.get(td) ?? null;
|
|
1619
1620
|
const rowKey = td.dataset.qdRowKey;
|
|
1620
1621
|
const column = leafColumns.value.find((col) => String(col.colKey) === td.dataset.qdColKey);
|
|
1621
|
-
const row =
|
|
1622
|
+
const row = safeData.value.find((item) => rowKey !== void 0 && String(getRowValue(item)) === rowKey);
|
|
1622
1623
|
if (!row || !column || !isCellSelectableColumn(column)) return null;
|
|
1623
1624
|
const cell = {
|
|
1624
1625
|
row,
|
|
@@ -1786,7 +1787,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1786
1787
|
for (const cell of resolveSelectedCells()) {
|
|
1787
1788
|
if (!cell.colKey) continue;
|
|
1788
1789
|
const colIdx = columns.findIndex((col) => col.colKey === cell.colKey);
|
|
1789
|
-
const rowIdx =
|
|
1790
|
+
const rowIdx = safeData.value.findIndex((row) => getRowValue(row) === getRowValue(cell.row));
|
|
1790
1791
|
if (colIdx < 0 || rowIdx < 0) continue;
|
|
1791
1792
|
positions.push({
|
|
1792
1793
|
rowIdx,
|
|
@@ -1795,7 +1796,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1795
1796
|
}
|
|
1796
1797
|
if (!positions.length) return null;
|
|
1797
1798
|
positions.sort((first, second) => first.rowIdx - second.rowIdx || first.colIdx - second.colIdx);
|
|
1798
|
-
const rows =
|
|
1799
|
+
const rows = safeData.value;
|
|
1799
1800
|
const rowStart = positions[0].rowIdx;
|
|
1800
1801
|
const rowEnd = positions.at(-1).rowIdx;
|
|
1801
1802
|
const colStart = Math.min(...positions.map((item) => item.colIdx));
|
|
@@ -1964,7 +1965,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1964
1965
|
skipped: 0
|
|
1965
1966
|
};
|
|
1966
1967
|
const columns = leafColumns.value;
|
|
1967
|
-
const rows =
|
|
1968
|
+
const rows = safeData.value;
|
|
1968
1969
|
const anchors = anchorCells.map((cell) => ({
|
|
1969
1970
|
rowIdx: rows.findIndex((row) => getRowValue(row) === getRowValue(cell.row)),
|
|
1970
1971
|
colIdx: columns.findIndex((col) => col.colKey === cell.colKey)
|
|
@@ -2286,7 +2287,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2286
2287
|
}
|
|
2287
2288
|
function resolveValidationResults(result) {
|
|
2288
2289
|
const results = [];
|
|
2289
|
-
for (const [rowIndex, row] of
|
|
2290
|
+
for (const [rowIndex, row] of safeData.value.entries()) {
|
|
2290
2291
|
for (const {
|
|
2291
2292
|
column,
|
|
2292
2293
|
colIndex
|
|
@@ -2477,16 +2478,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2477
2478
|
}
|
|
2478
2479
|
}
|
|
2479
2480
|
async function validateTableViaOffscreenForm() {
|
|
2480
|
-
return validateRowsViaOffscreenRules(
|
|
2481
|
+
return validateRowsViaOffscreenRules(safeData.value);
|
|
2481
2482
|
}
|
|
2482
2483
|
async function validateSingleRowViaOffscreenForm(rowValue) {
|
|
2483
|
-
const row =
|
|
2484
|
+
const row = safeData.value.find((item) => getRowValue(item) === rowValue);
|
|
2484
2485
|
if (!row) return [];
|
|
2485
2486
|
const result = await validateRowsViaOffscreenRules([row]);
|
|
2486
2487
|
return resolveValidationResults(result);
|
|
2487
2488
|
}
|
|
2488
2489
|
async function submitTableViaOffscreenForm(params, showErrorMessage) {
|
|
2489
|
-
const queueResult = await runOffscreenBeforeSubmit(
|
|
2490
|
+
const queueResult = await runOffscreenBeforeSubmit(safeData.value);
|
|
2490
2491
|
if (!queueResult.success) {
|
|
2491
2492
|
if (showErrorMessage && queueResult.message) msgError(queueResult.message);
|
|
2492
2493
|
return {
|
|
@@ -2495,10 +2496,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2495
2496
|
validateResult: false,
|
|
2496
2497
|
firstError: queueResult.message,
|
|
2497
2498
|
showErrorMessage,
|
|
2498
|
-
tableData: easyCopy(
|
|
2499
|
+
tableData: easyCopy(safeData.value)
|
|
2499
2500
|
};
|
|
2500
2501
|
}
|
|
2501
|
-
const result = await validateRowsViaOffscreenRules(
|
|
2502
|
+
const result = await validateRowsViaOffscreenRules(safeData.value);
|
|
2502
2503
|
const cellResults = resolveValidationResults(result);
|
|
2503
2504
|
if (cellResults.length) await showFirstValidationError(cellResults, {
|
|
2504
2505
|
...params,
|
|
@@ -2510,7 +2511,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2510
2511
|
validateResult: !cellResults.length,
|
|
2511
2512
|
firstError: getFirstValidationError(cellResults),
|
|
2512
2513
|
showErrorMessage,
|
|
2513
|
-
tableData: easyCopy(
|
|
2514
|
+
tableData: easyCopy(safeData.value)
|
|
2514
2515
|
};
|
|
2515
2516
|
}
|
|
2516
2517
|
async function submitSingleRowViaOffscreenForm(row, params, showErrorMessage) {
|
|
@@ -2634,7 +2635,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2634
2635
|
validateResult: false,
|
|
2635
2636
|
firstError: queueResult.message,
|
|
2636
2637
|
showErrorMessage,
|
|
2637
|
-
tableData: easyCopy(
|
|
2638
|
+
tableData: easyCopy(safeData.value)
|
|
2638
2639
|
};
|
|
2639
2640
|
}
|
|
2640
2641
|
const validateContext = await validateTableData({
|
|
@@ -2644,12 +2645,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2644
2645
|
return {
|
|
2645
2646
|
...validateContext,
|
|
2646
2647
|
showErrorMessage,
|
|
2647
|
-
tableData: easyCopy(
|
|
2648
|
+
tableData: easyCopy(safeData.value)
|
|
2648
2649
|
};
|
|
2649
2650
|
}
|
|
2650
2651
|
async function submitRowData(rowValue, params) {
|
|
2651
2652
|
const showErrorMessage = params?.showErrorMessage ?? true;
|
|
2652
|
-
const row =
|
|
2653
|
+
const row = safeData.value.find((item) => getRowValue(item) === rowValue);
|
|
2653
2654
|
if (isVirtualScroll.value) {
|
|
2654
2655
|
return serializeOffscreen(() => submitSingleRowViaOffscreenForm(row, params, showErrorMessage));
|
|
2655
2656
|
}
|
|
@@ -2705,7 +2706,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2705
2706
|
const firstRows = /* @__PURE__ */ new Map();
|
|
2706
2707
|
let blankCount = 0;
|
|
2707
2708
|
const colKey = column.colKey;
|
|
2708
|
-
|
|
2709
|
+
safeData.value.forEach((row, rowIndex) => {
|
|
2709
2710
|
const value = colKey ? get(row, colKey) : void 0;
|
|
2710
2711
|
if (isEmpty(value)) {
|
|
2711
2712
|
blankCount += 1;
|
|
@@ -2893,7 +2894,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2893
2894
|
const selectedCellClass = (context) => {
|
|
2894
2895
|
if (context.type !== "td" || !reCellSelectable.value) return "";
|
|
2895
2896
|
if (!isSelectedCell(context.row, column.colKey)) return "";
|
|
2896
|
-
const rowIndex =
|
|
2897
|
+
const rowIndex = safeData.value.findIndex((item) => getRowValue(item) === getRowValue(context.row));
|
|
2897
2898
|
const colIndex = leafColumns.value.findIndex((col) => col.colKey === column.colKey);
|
|
2898
2899
|
const classes = ["qd-service-table__selected-cell"];
|
|
2899
2900
|
if (!isSelectedCellAt(rowIndex - 1, colIndex)) classes.push("qd-service-table__selected-bt");
|
|
@@ -2904,7 +2905,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2904
2905
|
};
|
|
2905
2906
|
const copiedCellClass = (context) => {
|
|
2906
2907
|
if (context.type !== "td" || !isCopiedCell(context.row, column.colKey)) return "";
|
|
2907
|
-
const rowIndex =
|
|
2908
|
+
const rowIndex = safeData.value.findIndex((item) => getRowValue(item) === getRowValue(context.row));
|
|
2908
2909
|
const colIndex = leafColumns.value.findIndex((col) => col.colKey === column.colKey);
|
|
2909
2910
|
const classes = ["qd-service-table__copied-cell"];
|
|
2910
2911
|
if (!isCopiedCellAt(rowIndex - 1, colIndex)) classes.push("qd-service-table__copied-bt");
|
|
@@ -2993,7 +2994,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2993
2994
|
colKey: String(colKey),
|
|
2994
2995
|
formItem,
|
|
2995
2996
|
label: column.title,
|
|
2996
|
-
sourceRow: props.data?.find((item) => getRowValue(item) === rowValue) ??
|
|
2997
|
+
sourceRow: props.data?.find((item) => getRowValue(item) === rowValue) ?? safeData.value.find((item) => getRowValue(item) === rowValue) ?? row,
|
|
2997
2998
|
updateEditedCellValue: context.updateEditedCellValue,
|
|
2998
2999
|
notifyDataChange,
|
|
2999
3000
|
getHorizontalScroll: () => getCurrentTableContentEl()?.scrollLeft,
|
|
@@ -3402,7 +3403,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3402
3403
|
submitRowData,
|
|
3403
3404
|
getData: (key) => {
|
|
3404
3405
|
if (props.tree) return tableRef.value?.getData(key);
|
|
3405
|
-
return
|
|
3406
|
+
return safeData.value.find((item) => get(item, props.rowKey || qdServiceTableProps.rowKey) === key);
|
|
3406
3407
|
},
|
|
3407
3408
|
scrollToElement: (params) => {
|
|
3408
3409
|
const opts = params ?? {};
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
.qd-upload[data-v-
|
|
1
|
+
.qd-upload[data-v-15a6df62] {
|
|
2
2
|
width: 100%;
|
|
3
3
|
outline: none;
|
|
4
4
|
}
|
|
5
|
-
.qd-upload[data-v-
|
|
5
|
+
.qd-upload[data-v-15a6df62] .t-image-viewer__trigger {
|
|
6
6
|
display: none;
|
|
7
7
|
}
|
|
8
|
-
.qd-upload[data-v-
|
|
8
|
+
.qd-upload[data-v-15a6df62] .t-upload__dragger {
|
|
9
9
|
min-width: auto;
|
|
10
10
|
min-height: 144px;
|
|
11
11
|
width: 100%;
|
|
12
12
|
height: 100%;
|
|
13
13
|
}
|
|
14
|
-
.qd-upload[data-v-
|
|
14
|
+
.qd-upload[data-v-15a6df62] .t-upload__dragger-btns > .t-size-s {
|
|
15
15
|
display: inline-flex;
|
|
16
16
|
}
|
|
17
|
-
.qd-upload[data-v-
|
|
17
|
+
.qd-upload[data-v-15a6df62] .t-upload__flow {
|
|
18
18
|
width: 100%;
|
|
19
19
|
min-width: auto;
|
|
20
20
|
max-width: 100%;
|
|
21
21
|
}
|
|
22
|
-
.qd-upload[data-v-
|
|
22
|
+
.qd-upload[data-v-15a6df62] .t-upload__flow-empty {
|
|
23
23
|
height: auto;
|
|
24
24
|
min-height: 144px;
|
|
25
25
|
}
|
|
26
|
-
.qd-upload[data-v-
|
|
27
|
-
.qd-upload[data-v-
|
|
26
|
+
.qd-upload[data-v-15a6df62] .t-upload__flow-card-area,
|
|
27
|
+
.qd-upload[data-v-15a6df62] .t-upload__flow-table {
|
|
28
28
|
margin-top: var(--td-comp-margin-s);
|
|
29
29
|
}
|
|
30
|
-
.qd-upload[data-v-
|
|
30
|
+
.qd-upload[data-v-15a6df62] .t-upload__file-name__container {
|
|
31
31
|
display: flex;
|
|
32
32
|
align-items: center;
|
|
33
33
|
}
|
|
34
|
-
.qd-upload[data-v-
|
|
34
|
+
.qd-upload[data-v-15a6df62] .t-upload__file-name-text {
|
|
35
35
|
cursor: pointer;
|
|
36
36
|
}
|
|
37
|
-
.qd-upload[data-v-
|
|
37
|
+
.qd-upload[data-v-15a6df62] .t-upload__file-thumbnail {
|
|
38
38
|
width: var(--td-comp-size-m);
|
|
39
39
|
height: var(--td-comp-size-m);
|
|
40
40
|
}
|
|
41
|
-
.qd-upload[data-v-
|
|
41
|
+
.qd-upload[data-v-15a6df62] .t-upload__card-image {
|
|
42
42
|
width: 100%;
|
|
43
43
|
height: 100%;
|
|
44
44
|
}
|
|
45
|
-
.qd-upload__popup-upload[data-v-
|
|
45
|
+
.qd-upload__popup-upload[data-v-15a6df62] .t-image-viewer__trigger {
|
|
46
46
|
display: none;
|
|
47
47
|
}
|
|
48
|
-
.qd-upload__popup-upload[data-v-
|
|
48
|
+
.qd-upload__popup-upload[data-v-15a6df62] .t-upload__flow-table {
|
|
49
49
|
margin-top: 0;
|
|
50
50
|
}
|
|
51
|
-
.qd-upload__popup-upload[data-v-
|
|
51
|
+
.qd-upload__popup-upload[data-v-15a6df62] .t-upload__file-name__container {
|
|
52
52
|
display: flex;
|
|
53
53
|
align-items: center;
|
|
54
54
|
}
|
|
55
|
-
.qd-upload__popup-upload[data-v-
|
|
55
|
+
.qd-upload__popup-upload[data-v-15a6df62] .t-upload__file-name-text {
|
|
56
56
|
cursor: pointer;
|
|
57
57
|
}
|
|
58
|
-
.qd-upload__popup-upload[data-v-
|
|
58
|
+
.qd-upload__popup-upload[data-v-15a6df62] .t-upload__file-thumbnail {
|
|
59
59
|
width: var(--td-comp-size-m);
|
|
60
60
|
height: var(--td-comp-size-m);
|
|
61
61
|
}
|
|
62
|
-
.qd-upload__popup-upload[data-v-
|
|
62
|
+
.qd-upload__popup-upload[data-v-15a6df62] .t-upload__card-image {
|
|
63
63
|
width: 100%;
|
|
64
64
|
height: 100%;
|
|
65
65
|
}
|
|
66
|
-
.qd-upload__popup-upload--disabled[data-v-
|
|
67
|
-
.qd-upload__popup-upload--disabled[data-v-
|
|
66
|
+
.qd-upload__popup-upload--disabled[data-v-15a6df62] .t-upload__flow-table th:last-child,
|
|
67
|
+
.qd-upload__popup-upload--disabled[data-v-15a6df62] .t-upload__flow-table td:last-child {
|
|
68
68
|
display: none;
|
|
69
69
|
}
|
|
70
|
-
.qd-upload__popup-actions[data-v-
|
|
70
|
+
.qd-upload__popup-actions[data-v-15a6df62] {
|
|
71
71
|
display: inline-flex;
|
|
72
72
|
}
|
|
73
|
-
.qd-upload__popup-drag-text[data-v-
|
|
73
|
+
.qd-upload__popup-drag-text[data-v-15a6df62] {
|
|
74
74
|
display: flex;
|
|
75
75
|
align-items: center;
|
|
76
76
|
justify-content: center;
|
|
@@ -78,18 +78,18 @@
|
|
|
78
78
|
height: 100%;
|
|
79
79
|
color: var(--td-text-color-placeholder);
|
|
80
80
|
}
|
|
81
|
-
.qd-upload[data-v-
|
|
82
|
-
.qd-upload[data-v-
|
|
81
|
+
.qd-upload[data-v-15a6df62]:focus .t-upload__flow-card-area,
|
|
82
|
+
.qd-upload[data-v-15a6df62]:focus .t-upload__flow-table {
|
|
83
83
|
border-color: var(--td-brand-color);
|
|
84
84
|
}
|
|
85
|
-
.qd-upload--btn-image-popup[data-v-
|
|
86
|
-
.qd-upload--btn-file-popup[data-v-
|
|
85
|
+
.qd-upload--btn-image-popup[data-v-15a6df62],
|
|
86
|
+
.qd-upload--btn-file-popup[data-v-15a6df62] {
|
|
87
87
|
padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s);
|
|
88
88
|
border: 1px dashed var(--td-component-border);
|
|
89
89
|
transition: border 0.2s linear;
|
|
90
90
|
}
|
|
91
|
-
.qd-upload--btn-image-popup[data-v-
|
|
92
|
-
.qd-upload--btn-file-popup[data-v-
|
|
91
|
+
.qd-upload--btn-image-popup[data-v-15a6df62] .t-upload__dragger,
|
|
92
|
+
.qd-upload--btn-file-popup[data-v-15a6df62] .t-upload__dragger {
|
|
93
93
|
min-height: auto;
|
|
94
94
|
padding: 0;
|
|
95
95
|
border: 0;
|
|
@@ -98,42 +98,42 @@
|
|
|
98
98
|
align-items: flex-start;
|
|
99
99
|
cursor: default;
|
|
100
100
|
}
|
|
101
|
-
.qd-upload--btn-image-popup[data-v-
|
|
102
|
-
.qd-upload--btn-file-popup[data-v-
|
|
101
|
+
.qd-upload--btn-image-popup[data-v-15a6df62] .t-upload__dragger > .t-upload__trigger,
|
|
102
|
+
.qd-upload--btn-file-popup[data-v-15a6df62] .t-upload__dragger > .t-upload__trigger {
|
|
103
103
|
width: 100%;
|
|
104
104
|
height: 100%;
|
|
105
105
|
}
|
|
106
|
-
.qd-upload--btn-image-popup[data-v-
|
|
107
|
-
.qd-upload--btn-file-popup[data-v-
|
|
106
|
+
.qd-upload--btn-image-popup[data-v-15a6df62]:focus-within,
|
|
107
|
+
.qd-upload--btn-file-popup[data-v-15a6df62]:focus-within {
|
|
108
108
|
border-color: var(--td-brand-color);
|
|
109
109
|
}
|
|
110
|
-
.qd-upload--only-view[data-v-
|
|
111
|
-
.qd-upload--only-view[data-v-
|
|
110
|
+
.qd-upload--only-view[data-v-15a6df62] .t-upload__flow-empty,
|
|
111
|
+
.qd-upload--only-view[data-v-15a6df62] .t-upload__card-mask-item-divider {
|
|
112
112
|
display: none;
|
|
113
113
|
}
|
|
114
|
-
.qd-upload--only-view[data-v-
|
|
114
|
+
.qd-upload--only-view[data-v-15a6df62] .t-upload__flow-card-area {
|
|
115
115
|
border-color: var(--td-component-border);
|
|
116
116
|
}
|
|
117
|
-
.qd-upload--only-view[data-v-
|
|
118
|
-
.qd-upload--only-view[data-v-
|
|
119
|
-
.qd-upload--only-view[data-v-
|
|
117
|
+
.qd-upload--only-view[data-v-15a6df62]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-op,
|
|
118
|
+
.qd-upload--only-view[data-v-15a6df62]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__trigger,
|
|
119
|
+
.qd-upload--only-view[data-v-15a6df62]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-bottom {
|
|
120
120
|
display: none;
|
|
121
121
|
}
|
|
122
|
-
.qd-upload--only-view[data-v-
|
|
123
|
-
.qd-upload--only-view[data-v-
|
|
122
|
+
.qd-upload--only-view[data-v-15a6df62]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-table,
|
|
123
|
+
.qd-upload--only-view[data-v-15a6df62]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-card-area {
|
|
124
124
|
margin-top: 0;
|
|
125
125
|
}
|
|
126
|
-
.qd-upload--uploading[data-v-
|
|
126
|
+
.qd-upload--uploading[data-v-15a6df62] .t-upload__single-input-clear {
|
|
127
127
|
display: none;
|
|
128
128
|
}
|
|
129
|
-
.qd-upload--hide-manual-upload[data-v-
|
|
129
|
+
.qd-upload--hide-manual-upload[data-v-15a6df62] .t-upload__flow-bottom {
|
|
130
130
|
display: none;
|
|
131
131
|
margin-top: 0;
|
|
132
132
|
}
|
|
133
|
-
.qd-upload--hide-progress[data-v-
|
|
134
|
-
.qd-upload--hide-progress[data-v-
|
|
133
|
+
.qd-upload--hide-progress[data-v-15a6df62] .t-upload__flow-table th:last-child,
|
|
134
|
+
.qd-upload--hide-progress[data-v-15a6df62] .t-upload__flow-table td:last-child {
|
|
135
135
|
display: none;
|
|
136
136
|
}
|
|
137
|
-
.qd-upload--disabled[data-v-
|
|
137
|
+
.qd-upload--disabled[data-v-15a6df62] .t-upload__flow-card-area {
|
|
138
138
|
border-color: var(--td-component-border);
|
|
139
139
|
}
|
|
@@ -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 QdUpload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const QdUpload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-15a6df62"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdUpload as default
|
|
8
8
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import './index.css'
|
|
2
|
-
import { defineComponent, mergeDefaults, getCurrentInstance,
|
|
3
|
-
import { useVModel } from "../../node_modules/.pnpm/@vueuse_core@14.2.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.mjs";
|
|
2
|
+
import { defineComponent, mergeDefaults, ref, getCurrentInstance, watch, computed, inject, useTemplateRef, onMounted, onUnmounted, createBlock, openBlock, unref, mergeProps, createSlots, withCtx, renderList, renderSlot, createElementBlock, createCommentVNode, createTextVNode, toDisplayString, createVNode, withModifiers, normalizeClass, createElementVNode, normalizeProps, guardReactiveProps } from "vue";
|
|
4
3
|
import dayjs from "../../_virtual/dayjs.min.mjs";
|
|
5
4
|
import { isEmpty, useTimer, easyCopy, checkSameObject, abortWrapper, to, filterSlots, isTypeByName, suspectedWrapperPromise } from "qidian-shared";
|
|
6
5
|
import { UploadIcon, BrowseIcon } from "tdesign-icons-vue-next";
|
|
@@ -106,14 +105,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
106
105
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
107
106
|
const props = __props;
|
|
108
107
|
const emit = __emit;
|
|
109
|
-
const modelValue =
|
|
110
|
-
passive: true
|
|
111
|
-
});
|
|
108
|
+
const modelValue = ref(props.modelValue);
|
|
112
109
|
const hasFilesProp = Object.prototype.hasOwnProperty.call(
|
|
113
110
|
getCurrentInstance()?.vnode.props,
|
|
114
111
|
"files"
|
|
115
112
|
);
|
|
116
113
|
const fileList = ref([]);
|
|
114
|
+
watch(
|
|
115
|
+
() => props.modelValue,
|
|
116
|
+
(value) => {
|
|
117
|
+
if (Object.is(modelValue.value, value)) return;
|
|
118
|
+
modelValue.value = value;
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
watch(modelValue, (value) => {
|
|
122
|
+
if (Object.is(value, props.modelValue)) return;
|
|
123
|
+
emit("update:modelValue", value);
|
|
124
|
+
});
|
|
117
125
|
const reModelValue = computed({
|
|
118
126
|
get: () => {
|
|
119
127
|
const { convStr } = reProps.value;
|
|
@@ -145,8 +153,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
145
153
|
const uploadRef = useTemplateRef("upload");
|
|
146
154
|
const { timer: uploadTimer, clearTimer: clearUploadTimer } = useTimer("interval");
|
|
147
155
|
const waitingUploadFiles = ref([]);
|
|
148
|
-
let
|
|
149
|
-
let isSyncingFiles = false;
|
|
156
|
+
let internalModelValue = props.modelValue;
|
|
150
157
|
const tempUrlMap = /* @__PURE__ */ new WeakMap();
|
|
151
158
|
const removedUploadingFileValues = /* @__PURE__ */ new Set();
|
|
152
159
|
const tempModelValueSet = /* @__PURE__ */ new Set();
|
|
@@ -507,11 +514,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
507
514
|
}
|
|
508
515
|
tempModelValue.push(genTempValue(item));
|
|
509
516
|
});
|
|
510
|
-
|
|
517
|
+
internalModelValue = tempModelValue;
|
|
511
518
|
reModelValue.value = tempModelValue;
|
|
512
|
-
nextTick(() => {
|
|
513
|
-
isSyncingUploadModelValue = false;
|
|
514
|
-
});
|
|
515
519
|
}
|
|
516
520
|
function revokeTempUrl(file) {
|
|
517
521
|
if (!file) return;
|
|
@@ -619,6 +623,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
619
623
|
function clear() {
|
|
620
624
|
revokeAllTempUrls();
|
|
621
625
|
removedUploadingFileValues.clear();
|
|
626
|
+
internalModelValue = [];
|
|
622
627
|
reModelValue.value = [];
|
|
623
628
|
fileList.value = [];
|
|
624
629
|
waitingUploadFiles.value = [];
|
|
@@ -673,19 +678,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
673
678
|
(files) => {
|
|
674
679
|
if (!hasFilesProp) return;
|
|
675
680
|
if (!files.length && reModelValue.value.length) return;
|
|
676
|
-
isSyncingFiles = true;
|
|
677
681
|
fileList.value = files;
|
|
678
682
|
updateTempModelValue(fileList.value);
|
|
679
|
-
nextTick(() => {
|
|
680
|
-
isSyncingFiles = false;
|
|
681
|
-
});
|
|
682
683
|
},
|
|
683
684
|
{ deep: true, immediate: true }
|
|
684
685
|
);
|
|
685
686
|
watch(
|
|
686
687
|
fileList,
|
|
687
688
|
(files) => {
|
|
688
|
-
if (
|
|
689
|
+
if (!files.length && !reModelValue.value.length) return;
|
|
689
690
|
emit("update:files", files);
|
|
690
691
|
updateTempModelValue(files);
|
|
691
692
|
},
|
|
@@ -694,9 +695,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
694
695
|
watch(
|
|
695
696
|
reModelValue,
|
|
696
697
|
async (newVal, oldVal) => {
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
698
|
+
const isInternalSync = oldVal !== void 0 && checkSameObject(newVal, internalModelValue);
|
|
699
|
+
if (hasFilesProp && props.files.length || isInternalSync) {
|
|
700
|
+
return;
|
|
701
|
+
}
|
|
700
702
|
const reNewVal = newVal.filter((item) => !isTempModelValue(item));
|
|
701
703
|
const reOldVal = oldVal?.filter((item) => !isTempModelValue(item));
|
|
702
704
|
if (!newVal.length) {
|
|
@@ -704,6 +706,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
704
706
|
return;
|
|
705
707
|
}
|
|
706
708
|
if (!reNewVal.length || checkSameObject(reNewVal, reOldVal)) return;
|
|
709
|
+
ossListAbort?.abort?.(ossListAbortReason);
|
|
710
|
+
ossListAbort = void 0;
|
|
707
711
|
const { valueMode } = reProps.value;
|
|
708
712
|
const apiFn = valueMode === "url" ? getOssByUrls : getOssByIds;
|
|
709
713
|
const currentRequest = abortWrapper(apiFn(reNewVal));
|