qidian-vue-ui 2.0.34 → 2.0.36
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.vue2.mjs +3 -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/import-dialog/index.vue.d.ts +1 -0
- package/dist/components/import-dialog/index.vue.mjs +35 -5
- package/dist/components/import-dialog/props.d.ts +1 -0
- package/dist/components/import-dialog/props.mjs +2 -1
- package/dist/components/import-dialog/types.d.ts +1 -0
- package/dist/components/service/table/index.css +49 -49
- package/dist/components/service/table/index.vue.mjs +1 -1
- package/dist/components/service/table/index.vue2.mjs +54 -10
- 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 -3
- package/dist/components/service-dialog-tabs-table-select/index.vue2.mjs +3 -3
- package/dist/components/service-popup-table-select/index.vue2.mjs +3 -3
- package/dist/components/upload/index.css +36 -33
- package/dist/components/upload/index.vue.mjs +1 -1
- package/dist/components/upload/index.vue2.mjs +3 -3
- 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
|
@@ -93,6 +93,7 @@ export declare const QdConfigProvider: import("vue").DefineComponent<{
|
|
|
93
93
|
downloadTplText?: string;
|
|
94
94
|
successText?: string;
|
|
95
95
|
failText?: string;
|
|
96
|
+
updateSupportText?: string;
|
|
96
97
|
};
|
|
97
98
|
form?: Omit<NonNullable<NonNullable<import("tdesign-vue-next").TdConfigProviderProps["globalConfig"]>["form"]>, "size"> & {
|
|
98
99
|
size?: import("..").QdFormProps["size"];
|
|
@@ -240,6 +241,7 @@ export declare const QdConfigProvider: import("vue").DefineComponent<{
|
|
|
240
241
|
downloadTplText?: string;
|
|
241
242
|
successText?: string;
|
|
242
243
|
failText?: string;
|
|
244
|
+
updateSupportText?: string;
|
|
243
245
|
};
|
|
244
246
|
form?: Omit<NonNullable<NonNullable<import("tdesign-vue-next").TdConfigProviderProps["globalConfig"]>["form"]>, "size"> & {
|
|
245
247
|
size?: import("..").QdFormProps["size"];
|
|
@@ -372,6 +374,7 @@ export declare const QdConfigProvider: import("vue").DefineComponent<{
|
|
|
372
374
|
downloadTplText?: string;
|
|
373
375
|
successText?: string;
|
|
374
376
|
failText?: string;
|
|
377
|
+
updateSupportText?: string;
|
|
375
378
|
};
|
|
376
379
|
form?: Omit<NonNullable<NonNullable<import("tdesign-vue-next").TdConfigProviderProps["globalConfig"]>["form"]>, "size"> & {
|
|
377
380
|
size?: import("..").QdFormProps["size"];
|
|
@@ -110,6 +110,7 @@ export interface QdConfigProviderProps {
|
|
|
110
110
|
downloadTplText?: string;
|
|
111
111
|
successText?: string;
|
|
112
112
|
failText?: string;
|
|
113
|
+
updateSupportText?: string;
|
|
113
114
|
};
|
|
114
115
|
form?: Omit<NonNullable<NonNullable<TdConfigProviderProps['globalConfig']>['form']>, 'size'> & {
|
|
115
116
|
size?: QdFormProps['size'];
|
|
@@ -81,6 +81,7 @@ export declare function useConfig<T extends keyof NonNullable<QdConfigProviderPr
|
|
|
81
81
|
downloadTplText?: string;
|
|
82
82
|
successText?: string;
|
|
83
83
|
failText?: string;
|
|
84
|
+
updateSupportText?: string;
|
|
84
85
|
};
|
|
85
86
|
form?: Omit<NonNullable<NonNullable<import("tdesign-vue-next").TdConfigProviderProps["globalConfig"]>["form"]>, "size"> & {
|
|
86
87
|
size?: import("..").QdFormProps["size"];
|
|
@@ -211,6 +212,7 @@ export declare function useConfig<T extends keyof NonNullable<QdConfigProviderPr
|
|
|
211
212
|
downloadTplText?: string;
|
|
212
213
|
successText?: string;
|
|
213
214
|
failText?: string;
|
|
215
|
+
updateSupportText?: string;
|
|
214
216
|
};
|
|
215
217
|
form?: Omit<NonNullable<NonNullable<import("tdesign-vue-next").TdConfigProviderProps["globalConfig"]>["form"]>, "size"> & {
|
|
216
218
|
size?: import("..").QdFormProps["size"];
|
|
@@ -341,6 +343,7 @@ export declare function useConfig<T extends keyof NonNullable<QdConfigProviderPr
|
|
|
341
343
|
downloadTplText?: string;
|
|
342
344
|
successText?: string;
|
|
343
345
|
failText?: string;
|
|
346
|
+
updateSupportText?: string;
|
|
344
347
|
};
|
|
345
348
|
form?: Omit<NonNullable<NonNullable<import("tdesign-vue-next").TdConfigProviderProps["globalConfig"]>["form"]>, "size"> & {
|
|
346
349
|
size?: import("..").QdFormProps["size"];
|
|
@@ -472,6 +475,7 @@ export declare function useConfig<T extends keyof NonNullable<QdConfigProviderPr
|
|
|
472
475
|
downloadTplText?: string;
|
|
473
476
|
successText?: string;
|
|
474
477
|
failText?: string;
|
|
478
|
+
updateSupportText?: string;
|
|
475
479
|
};
|
|
476
480
|
form?: Omit<NonNullable<NonNullable<import("tdesign-vue-next").TdConfigProviderProps["globalConfig"]>["form"]>, "size"> & {
|
|
477
481
|
size?: import("..").QdFormProps["size"];
|
|
@@ -22,6 +22,7 @@ export declare const qdCrudTableProps: {
|
|
|
22
22
|
readonly searchData: () => {};
|
|
23
23
|
readonly emptyText: undefined;
|
|
24
24
|
readonly emptyImage: true;
|
|
25
|
+
readonly readonly: undefined;
|
|
25
26
|
readonly lazyForm: true;
|
|
26
27
|
readonly editCellValidationBlock: "error";
|
|
27
28
|
readonly rowKey: "id";
|
|
@@ -66,6 +66,7 @@ declare const _default: <D extends TableRowData = TableRowData, R = unknown, P =
|
|
|
66
66
|
}) => import("tdesign-vue-next").TNodeReturnValue) | undefined;
|
|
67
67
|
emptyText?: string | undefined;
|
|
68
68
|
attach?: import("tdesign-vue-next").AttachNode | undefined;
|
|
69
|
+
readonly?: boolean | undefined;
|
|
69
70
|
onValidate?: ((context: import("tdesign-vue-next").PrimaryTableValidateContext) => void) | undefined;
|
|
70
71
|
rowKey?: string | undefined;
|
|
71
72
|
scroll?: import("../..").QdServiceTableScroll | undefined;
|
|
@@ -16,6 +16,7 @@ export declare const qdCrudTabsTableProps: {
|
|
|
16
16
|
readonly searchData: () => {};
|
|
17
17
|
readonly emptyText: undefined;
|
|
18
18
|
readonly emptyImage: true;
|
|
19
|
+
readonly readonly: undefined;
|
|
19
20
|
readonly lazyForm: true;
|
|
20
21
|
readonly editCellValidationBlock: "error";
|
|
21
22
|
readonly rowKey: "id";
|
|
@@ -10,5 +10,6 @@ declare const _default: import("vue").DefineComponent<QdImportDialogProps, {
|
|
|
10
10
|
name: string;
|
|
11
11
|
accept: string[] | "*";
|
|
12
12
|
method: "POST" | "GET" | "PUT" | "OPTIONS" | "PATCH" | "post" | "get" | "put" | "options" | "patch";
|
|
13
|
+
updateSupport: boolean | string;
|
|
13
14
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
15
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent, mergeDefaults,
|
|
1
|
+
import { defineComponent, mergeDefaults, ref, computed, createVNode, createBlock, openBlock, unref, isRef, isVNode } from "vue";
|
|
2
2
|
import { useVModels } from "../../node_modules/.pnpm/@vueuse_core@14.2.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.mjs";
|
|
3
|
-
import { isEmpty, easyDownload, suspectedWrapperPromise } from "qidian-shared";
|
|
4
|
-
import { Alert, Space, Button } from "tdesign-vue-next";
|
|
3
|
+
import { isEmpty, setUrlParam, easyDownload, suspectedWrapperPromise } from "qidian-shared";
|
|
4
|
+
import { Alert, Space, Button, Checkbox } from "tdesign-vue-next";
|
|
5
5
|
import { useConfig } from "../config-provider/useConfig.mjs";
|
|
6
6
|
import { qdImportDialogProps } from "./props.mjs";
|
|
7
7
|
import QdUpload from "../upload/index.vue.mjs";
|
|
@@ -21,6 +21,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
onSuccess: {
|
|
22
22
|
type: Function
|
|
23
23
|
},
|
|
24
|
+
updateSupport: {
|
|
25
|
+
type: [Boolean, String]
|
|
26
|
+
},
|
|
24
27
|
wrapper: {},
|
|
25
28
|
visible: {
|
|
26
29
|
type: Boolean
|
|
@@ -54,6 +57,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54
57
|
msgSuccess,
|
|
55
58
|
alertError
|
|
56
59
|
} = useModal();
|
|
60
|
+
const formData = ref({});
|
|
61
|
+
const downloadTplLoad = ref(false);
|
|
57
62
|
const reProps = computed(() => {
|
|
58
63
|
const {
|
|
59
64
|
visible: visible2,
|
|
@@ -63,17 +68,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
63
68
|
onSuccess,
|
|
64
69
|
tips,
|
|
65
70
|
accept,
|
|
71
|
+
action,
|
|
72
|
+
updateSupport,
|
|
66
73
|
wrapper,
|
|
67
74
|
...uploadOptions
|
|
68
75
|
} = props;
|
|
69
76
|
const isAcceptUnlimited = accept === "*" || isEmpty(accept);
|
|
70
77
|
const reAccept = isAcceptUnlimited ? void 0 : accept;
|
|
78
|
+
const updateSupportKey = updateSupport === false ? void 0 : typeof updateSupport === "string" ? updateSupport : "updateSupport";
|
|
79
|
+
const updateSupportValue = updateSupportKey === void 0 ? false : formData.value[updateSupportKey] === true;
|
|
80
|
+
const reAction = updateSupportKey === void 0 || !action ? action : typeof action === "string" ? setUrlParam(updateSupportKey, updateSupportValue, action) : (bucketConfigKey) => setUrlParam(updateSupportKey, updateSupportValue, action(bucketConfigKey));
|
|
71
81
|
const reUploadOptions = {
|
|
72
82
|
...uploadOptions,
|
|
73
83
|
listOssByIds: {
|
|
74
84
|
service: void 0
|
|
75
85
|
},
|
|
76
86
|
accept,
|
|
87
|
+
action: reAction,
|
|
77
88
|
tips: tips || !reAccept ? tips : `${t("fileSupport")[0]} ${reAccept.join(",")} ${t("fileSupport")[1]}`
|
|
78
89
|
};
|
|
79
90
|
const qdDialogOptions = {
|
|
@@ -89,10 +100,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
89
100
|
onSuccess,
|
|
90
101
|
qdUploadOptions: reUploadOptions,
|
|
91
102
|
qdDialogOptions,
|
|
103
|
+
updateSupportKey,
|
|
92
104
|
models: visible2
|
|
93
105
|
};
|
|
94
106
|
});
|
|
95
|
-
const downloadTplLoad = ref(false);
|
|
96
107
|
const items = computed(() => [{
|
|
97
108
|
ifRender: !!reProps.value.downloadTpl,
|
|
98
109
|
col: 12,
|
|
@@ -143,6 +154,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
143
154
|
},
|
|
144
155
|
...reProps.value.qdUploadOptions
|
|
145
156
|
}
|
|
157
|
+
}, {
|
|
158
|
+
ifRender: reProps.value.updateSupportKey !== void 0,
|
|
159
|
+
col: 12,
|
|
160
|
+
component: {
|
|
161
|
+
is: () => {
|
|
162
|
+
let _slot2;
|
|
163
|
+
return createVNode(Checkbox, {
|
|
164
|
+
"style": {
|
|
165
|
+
color: "var(--td-text-color-secondary)"
|
|
166
|
+
}
|
|
167
|
+
}, _isSlot(_slot2 = t("updateSupportText")) ? _slot2 : {
|
|
168
|
+
default: () => [_slot2]
|
|
169
|
+
});
|
|
170
|
+
},
|
|
171
|
+
vModel: reProps.value.updateSupportKey ?? "updateSupport",
|
|
172
|
+
defaultModelValue: false
|
|
173
|
+
}
|
|
146
174
|
}]);
|
|
147
175
|
async function handleDownloadTpl() {
|
|
148
176
|
const {
|
|
@@ -173,9 +201,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
173
201
|
return openBlock(), createBlock(unref(_sfc_main$1), {
|
|
174
202
|
visible: unref(visible),
|
|
175
203
|
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => isRef(visible) ? visible.value = $event : null),
|
|
204
|
+
data: formData.value,
|
|
205
|
+
"onUpdate:data": _cache[1] || (_cache[1] = ($event) => formData.value = $event),
|
|
176
206
|
wrapper: reProps.value.qdDialogOptions,
|
|
177
207
|
items: items.value
|
|
178
|
-
}, null, 8, ["visible", "wrapper", "items"]);
|
|
208
|
+
}, null, 8, ["visible", "data", "wrapper", "items"]);
|
|
179
209
|
};
|
|
180
210
|
}
|
|
181
211
|
});
|
|
@@ -5,5 +5,6 @@ export interface QdImportDialogProps extends Pick<QdDialogProps, 'visible'>, Pic
|
|
|
5
5
|
downloadTpl?: string | (() => void) | (() => Promise<void>);
|
|
6
6
|
downloadTplName?: string;
|
|
7
7
|
onSuccess?: () => void;
|
|
8
|
+
updateSupport?: boolean | string;
|
|
8
9
|
wrapper?: Pick<QdDialogProps, 'header' | 'width'>;
|
|
9
10
|
}
|
|
@@ -1,156 +1,156 @@
|
|
|
1
|
-
.qd-service-table[data-v-
|
|
1
|
+
.qd-service-table[data-v-bff70dd6] {
|
|
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-bff70dd6] > .t-table__content {
|
|
7
7
|
flex: 1;
|
|
8
8
|
}
|
|
9
|
-
.qd-service-table--mini[data-v-
|
|
9
|
+
.qd-service-table--mini[data-v-bff70dd6] {
|
|
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-bff70dd6] th,
|
|
13
|
+
.qd-service-table--mini[data-v-bff70dd6] 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-bff70dd6] .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-bff70dd6] .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-bff70dd6] .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-bff70dd6] .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-bff70dd6] .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-bff70dd6] .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-bff70dd6] .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-bff70dd6] .t-affix > .t-table__affixed-header-elm-wrap,
|
|
39
|
+
.qd-service-table[data-v-bff70dd6] .t-affix > .t-table__scrollbar--obvious {
|
|
40
|
+
transform: var(--d0bff1fe);
|
|
41
41
|
}
|
|
42
|
-
.qd-service-table--horizontal-bar-static[data-v-
|
|
42
|
+
.qd-service-table--horizontal-bar-static[data-v-bff70dd6] .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-bff70dd6] .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-bff70dd6] .t-table__expanded-row > td {
|
|
50
50
|
height: 0;
|
|
51
51
|
}
|
|
52
|
-
.qd-service-table[data-v-
|
|
52
|
+
.qd-service-table[data-v-bff70dd6] .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-bff70dd6] .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-bff70dd6] .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-bff70dd6] .t-table__virtual-scroll-cursor + table {
|
|
65
65
|
border-collapse: separate;
|
|
66
66
|
}
|
|
67
|
-
.qd-service-table[data-v-
|
|
67
|
+
.qd-service-table[data-v-bff70dd6] .t-table__expanded-row-inner {
|
|
68
68
|
display: block;
|
|
69
69
|
position: sticky;
|
|
70
70
|
left: 0;
|
|
71
|
-
width: var(--
|
|
71
|
+
width: var(--v2ce85a94) !important;
|
|
72
72
|
}
|
|
73
|
-
.qd-service-table[data-v-
|
|
73
|
+
.qd-service-table[data-v-bff70dd6] .t-table__cell-wrap > .t-form__controls > .t-form__controls-content > *:not(.t-switch):not(.t-tag):not(.t-icon):not(.qd-file-icon) {
|
|
74
74
|
width: 100%;
|
|
75
75
|
}
|
|
76
|
-
.qd-service-table[data-v-
|
|
76
|
+
.qd-service-table[data-v-bff70dd6] .qd-service-table__non-editable-col {
|
|
77
77
|
background-color: color-mix(in srgb, var(--td-bg-color-component) 50%, transparent);
|
|
78
78
|
}
|
|
79
|
-
.qd-service-table[data-v-
|
|
79
|
+
.qd-service-table[data-v-bff70dd6] .qd-service-table__non-editable-col:is(
|
|
80
80
|
.t-table__cell--fixed-left,
|
|
81
81
|
.t-table__cell--fixed-right
|
|
82
82
|
) {
|
|
83
83
|
background-color: inherit;
|
|
84
84
|
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));
|
|
85
85
|
}
|
|
86
|
-
.qd-service-table--disable-horizontal-scroll[data-v-
|
|
86
|
+
.qd-service-table--disable-horizontal-scroll[data-v-bff70dd6] colgroup > col {
|
|
87
87
|
width: auto !important;
|
|
88
88
|
}
|
|
89
|
-
.qd-service-table[data-v-
|
|
89
|
+
.qd-service-table[data-v-bff70dd6] .t-table__filter-pop-content-inner {
|
|
90
90
|
padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s) 0;
|
|
91
91
|
}
|
|
92
|
-
.qd-service-table[data-v-
|
|
92
|
+
.qd-service-table[data-v-bff70dd6] .t-table__filter-pop-content-inner:has(.qd-service-table-filter-item) {
|
|
93
93
|
padding: 0;
|
|
94
94
|
}
|
|
95
|
-
.qd-service-table[data-v-
|
|
95
|
+
.qd-service-table[data-v-bff70dd6] .t-table__filter-pop-content-inner:has(
|
|
96
96
|
.qd-service-table-filter-input,
|
|
97
97
|
.qd-service-table-filter-custom
|
|
98
98
|
) {
|
|
99
99
|
padding-bottom: var(--td-comp-paddingTB-s);
|
|
100
100
|
}
|
|
101
|
-
.qd-service-table[data-v-
|
|
101
|
+
.qd-service-table[data-v-bff70dd6] .t-table__filter--bottom-buttons {
|
|
102
102
|
padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s);
|
|
103
103
|
}
|
|
104
|
-
.qd-service-table--mini[data-v-
|
|
104
|
+
.qd-service-table--mini[data-v-bff70dd6] .t-table__filter-pop-content-inner {
|
|
105
105
|
padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs) 0;
|
|
106
106
|
}
|
|
107
|
-
.qd-service-table--mini[data-v-
|
|
107
|
+
.qd-service-table--mini[data-v-bff70dd6] .t-table__filter--bottom-buttons {
|
|
108
108
|
padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs);
|
|
109
109
|
}
|
|
110
|
-
.qd-service-table--mini[data-v-
|
|
110
|
+
.qd-service-table--mini[data-v-bff70dd6] .t-table__filter-pop-content-inner:has(.qd-service-table-filter-item) {
|
|
111
111
|
padding: 0;
|
|
112
112
|
}
|
|
113
|
-
.qd-service-table--mini[data-v-
|
|
113
|
+
.qd-service-table--mini[data-v-bff70dd6] .t-table__filter-pop-content-inner:has(
|
|
114
114
|
.qd-service-table-filter-input,
|
|
115
115
|
.qd-service-table-filter-custom
|
|
116
116
|
) {
|
|
117
117
|
padding-bottom: var(--td-comp-paddingTB-xs);
|
|
118
118
|
}
|
|
119
|
-
.qd-service-table[data-v-
|
|
119
|
+
.qd-service-table[data-v-bff70dd6] .qd-service-table-filter-item {
|
|
120
120
|
width: 266px;
|
|
121
121
|
}
|
|
122
|
-
.qd-service-table[data-v-
|
|
123
|
-
.qd-service-table[data-v-
|
|
124
|
-
.qd-service-table[data-v-
|
|
122
|
+
.qd-service-table[data-v-bff70dd6] .qd-service-table-filter-item__search,
|
|
123
|
+
.qd-service-table[data-v-bff70dd6] .qd-service-table-filter-item__all,
|
|
124
|
+
.qd-service-table[data-v-bff70dd6] .qd-service-table-filter-item__options {
|
|
125
125
|
padding: var(--td-comp-paddingTB-s) var(--td-comp-paddingLR-s) 0;
|
|
126
126
|
}
|
|
127
|
-
.qd-service-table[data-v-
|
|
127
|
+
.qd-service-table[data-v-bff70dd6] .qd-service-table-filter-item__all {
|
|
128
128
|
padding: 0 var(--td-comp-paddingLR-s);
|
|
129
129
|
border-bottom: 1px solid var(--td-component-stroke);
|
|
130
130
|
}
|
|
131
|
-
.qd-service-table[data-v-
|
|
131
|
+
.qd-service-table[data-v-bff70dd6] .qd-service-table-filter-item__options {
|
|
132
132
|
display: flex;
|
|
133
133
|
flex-direction: column;
|
|
134
134
|
height: 206px;
|
|
135
135
|
padding: 0 var(--td-comp-paddingLR-s);
|
|
136
136
|
overflow-y: auto;
|
|
137
137
|
}
|
|
138
|
-
.qd-service-table[data-v-
|
|
138
|
+
.qd-service-table[data-v-bff70dd6] .qd-service-table-filter-item__count {
|
|
139
139
|
margin-left: var(--td-comp-margin-xs);
|
|
140
140
|
color: var(--td-text-color-placeholder);
|
|
141
141
|
}
|
|
142
|
-
.qd-service-table[data-v-
|
|
142
|
+
.qd-service-table[data-v-bff70dd6] .qd-service-table-filter-item__cell {
|
|
143
143
|
pointer-events: none;
|
|
144
144
|
}
|
|
145
|
-
.qd-service-table[data-v-
|
|
146
|
-
.qd-service-table[data-v-
|
|
145
|
+
.qd-service-table[data-v-bff70dd6] .qd-service-table-filter-item .t-checkbox__label,
|
|
146
|
+
.qd-service-table[data-v-bff70dd6] .qd-service-table-filter-item .t-radio__label {
|
|
147
147
|
display: inline-flex;
|
|
148
148
|
align-items: center;
|
|
149
149
|
}
|
|
150
|
-
.qd-service-table--mini[data-v-
|
|
150
|
+
.qd-service-table--mini[data-v-bff70dd6] .qd-service-table-filter-item__search {
|
|
151
151
|
padding: var(--td-comp-paddingTB-xs) var(--td-comp-paddingLR-xs) 0;
|
|
152
152
|
}
|
|
153
|
-
.qd-service-table--mini[data-v-
|
|
154
|
-
.qd-service-table--mini[data-v-
|
|
153
|
+
.qd-service-table--mini[data-v-bff70dd6] .qd-service-table-filter-item__all,
|
|
154
|
+
.qd-service-table--mini[data-v-bff70dd6] .qd-service-table-filter-item__options {
|
|
155
155
|
padding: 0 var(--td-comp-paddingLR-xs);
|
|
156
156
|
}
|
|
@@ -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-bff70dd6"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdServiceTable as default
|
|
8
8
|
};
|
|
@@ -8,10 +8,12 @@ import { validate } from "tdesign-vue-next/es/form/utils/form-model.mjs";
|
|
|
8
8
|
import { useModal } from "../../../hooks/useModal.mjs";
|
|
9
9
|
import { getTransformOffset } from "../../../utils/tools.mjs";
|
|
10
10
|
import { useConfig } from "../../config-provider/useConfig.mjs";
|
|
11
|
-
import {
|
|
11
|
+
import { getQdFormComponentName, resolveQdFormItemOptions } from "../../form/utils.mjs";
|
|
12
12
|
import QdServiceTableEditCell from "./edit-cell.mjs";
|
|
13
13
|
import QdServiceTableFilterItem from "./filter-item.mjs";
|
|
14
14
|
import { qdServiceTableTreeConfig, qdServiceTableProps, getSortParams } from "./props.mjs";
|
|
15
|
+
import { useReadonly } from "../../../hooks/useReadonly.mjs";
|
|
16
|
+
import { useDisabled } from "../../../hooks/useDisabled.mjs";
|
|
15
17
|
import { PROVIDE_FORM_ADD_BEFORE_SUBMIT_QUEUE } from "../../form/config.mjs";
|
|
16
18
|
import get from "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/get.mjs";
|
|
17
19
|
import _sfc_main$1 from "../../config-renderer/index.vue.mjs";
|
|
@@ -40,6 +42,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
40
42
|
emptyImage: {
|
|
41
43
|
type: [Boolean, String]
|
|
42
44
|
},
|
|
45
|
+
readonly: {
|
|
46
|
+
type: Boolean
|
|
47
|
+
},
|
|
43
48
|
lazyForm: {
|
|
44
49
|
type: Boolean
|
|
45
50
|
},
|
|
@@ -327,8 +332,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
327
332
|
emit: __emit
|
|
328
333
|
}) {
|
|
329
334
|
useCssVars((_ctx) => ({
|
|
330
|
-
"
|
|
331
|
-
"
|
|
335
|
+
"d0bff1fe": affixedHeaderTransform.value,
|
|
336
|
+
"v2ce85a94": expandedRowWidth.value
|
|
332
337
|
}));
|
|
333
338
|
const props = __props;
|
|
334
339
|
const emit = __emit;
|
|
@@ -378,6 +383,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
378
383
|
const {
|
|
379
384
|
msgError
|
|
380
385
|
} = useModal();
|
|
386
|
+
const tdReadonly = useReadonly();
|
|
387
|
+
const tdDisabled = useDisabled();
|
|
388
|
+
const tableReadonly = computed(() => tdReadonly.value || tdDisabled.value);
|
|
381
389
|
const tableRef = useTemplateRef("table");
|
|
382
390
|
const treeLoadIds = ref([]);
|
|
383
391
|
const editingCells = shallowRef([]);
|
|
@@ -576,6 +584,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
576
584
|
expandedTreeNodes: expandedTreeNodes2,
|
|
577
585
|
emptyText,
|
|
578
586
|
emptyImage: _emptyImage,
|
|
587
|
+
readonly: _readonly,
|
|
579
588
|
lazyForm: _lazyForm,
|
|
580
589
|
scroll,
|
|
581
590
|
selectOnRowClick,
|
|
@@ -764,7 +773,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
764
773
|
};
|
|
765
774
|
const hasFormItemColumns = formItemColumns.value.length > 0;
|
|
766
775
|
const callerEditableCellState = reTableOptions.editableCellState;
|
|
767
|
-
const reEditableCellState = hasFormItemColumns ? (context) => {
|
|
776
|
+
const reEditableCellState = tableReadonly.value ? () => false : hasFormItemColumns ? (context) => {
|
|
768
777
|
const column = context.col;
|
|
769
778
|
if (!column.formItem) {
|
|
770
779
|
if (callerEditableCellState) return callerEditableCellState(context);
|
|
@@ -773,7 +782,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
773
782
|
}
|
|
774
783
|
return !resolveFormItemLazy(column) || isEditingCell(context.row, column.colKey);
|
|
775
784
|
} : callerEditableCellState;
|
|
776
|
-
const reEditableRowKeys = hasFormItemColumns ? (data2 || []).map((row) => getRowValue(row)) : reTableOptions.editableRowKeys;
|
|
785
|
+
const reEditableRowKeys = tableReadonly.value ? [] : hasFormItemColumns ? (data2 || []).map((row) => getRowValue(row)) : reTableOptions.editableRowKeys;
|
|
777
786
|
const {
|
|
778
787
|
offsetBottom: horizontalScrollOffsetBottom = 0,
|
|
779
788
|
onFixedChange: onHorizontalScrollFixedChange,
|
|
@@ -895,7 +904,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
895
904
|
};
|
|
896
905
|
});
|
|
897
906
|
});
|
|
898
|
-
watch([reSort, () => searchData.value?.orderByColumn, () => searchData.value?.isAsc], syncSearchDataSort, {
|
|
907
|
+
watch([reSort, () => props.columns, () => searchData.value?.orderByColumn, () => searchData.value?.isAsc], syncSearchDataSort, {
|
|
899
908
|
immediate: true,
|
|
900
909
|
flush: "sync"
|
|
901
910
|
});
|
|
@@ -930,6 +939,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
930
939
|
});
|
|
931
940
|
const reOnSortChange = (sortValue, options) => {
|
|
932
941
|
reProps.value.tableOptions.onSortChange?.(sortValue, options);
|
|
942
|
+
if (typeof options.col.sorter === "function") return;
|
|
933
943
|
changeCurrent(1);
|
|
934
944
|
};
|
|
935
945
|
const tableLoad = computed(() => {
|
|
@@ -980,6 +990,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
980
990
|
if (props.defaultSort) return normalizeSort(props.defaultSort);
|
|
981
991
|
return props.multipleSort ? [] : void 0;
|
|
982
992
|
}
|
|
993
|
+
function isLocalSortColumn(sortBy) {
|
|
994
|
+
function findColumn(columns) {
|
|
995
|
+
for (const column of columns) {
|
|
996
|
+
if (column.colKey === sortBy) return column;
|
|
997
|
+
const child = column.children ? findColumn(column.children) : void 0;
|
|
998
|
+
if (child) return child;
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
return typeof findColumn(props.columns ?? [])?.sorter === "function";
|
|
1002
|
+
}
|
|
1003
|
+
function getRemoteSort(value) {
|
|
1004
|
+
const sortList = Array.isArray(value) ? value : value ? [value] : [];
|
|
1005
|
+
const remoteSortList = sortList.filter((item) => !isLocalSortColumn(item.sortBy));
|
|
1006
|
+
return Array.isArray(value) ? remoteSortList : remoteSortList[0];
|
|
1007
|
+
}
|
|
983
1008
|
async function transformServiceParams(params) {
|
|
984
1009
|
const mergedParams = {
|
|
985
1010
|
...params,
|
|
@@ -990,7 +1015,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
990
1015
|
return mergedParams;
|
|
991
1016
|
}
|
|
992
1017
|
function syncSearchDataSort() {
|
|
993
|
-
const sortParams = getSortParams(reSort.value);
|
|
1018
|
+
const sortParams = getSortParams(getRemoteSort(reSort.value));
|
|
994
1019
|
const current2 = searchData.value;
|
|
995
1020
|
if (!current2) return;
|
|
996
1021
|
if (sortParams.orderByColumn) {
|
|
@@ -1212,6 +1237,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1212
1237
|
}, 0);
|
|
1213
1238
|
}
|
|
1214
1239
|
function enterEditingCell(target, autofocus = true) {
|
|
1240
|
+
if (tableReadonly.value) return;
|
|
1215
1241
|
const currentActiveCell = activeEditingCell.value;
|
|
1216
1242
|
if (currentActiveCell && !isSameEditingCell(currentActiveCell, target)) {
|
|
1217
1243
|
clearAutofocusEditingCell(currentActiveCell);
|
|
@@ -1232,6 +1258,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1232
1258
|
void exitEditingCell(activeEditingCell.value);
|
|
1233
1259
|
}
|
|
1234
1260
|
function handleCellClick(context) {
|
|
1261
|
+
if (tableReadonly.value) return;
|
|
1235
1262
|
const column = context.col;
|
|
1236
1263
|
if (column.formItem) {
|
|
1237
1264
|
const editingCell = findEditingCell(context.row, column.colKey);
|
|
@@ -1846,6 +1873,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1846
1873
|
return columns.map((column) => {
|
|
1847
1874
|
const {
|
|
1848
1875
|
children,
|
|
1876
|
+
edit,
|
|
1849
1877
|
filter,
|
|
1850
1878
|
filterItem,
|
|
1851
1879
|
formItem,
|
|
@@ -1853,6 +1881,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1853
1881
|
} = column;
|
|
1854
1882
|
const reColumn = {
|
|
1855
1883
|
...tableColumn,
|
|
1884
|
+
...!tableReadonly.value && edit ? {
|
|
1885
|
+
edit
|
|
1886
|
+
} : {},
|
|
1856
1887
|
...filterItem ? {
|
|
1857
1888
|
filter: resolveColumnFilter(column, filterItem, filter)
|
|
1858
1889
|
} : {
|
|
@@ -1866,7 +1897,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1866
1897
|
} : {}
|
|
1867
1898
|
};
|
|
1868
1899
|
const columnClassName = reColumn.className === void 0 ? [] : Array.isArray(reColumn.className) ? reColumn.className : [reColumn.className];
|
|
1869
|
-
if (!formItem) {
|
|
1900
|
+
if (tableReadonly.value || !formItem) {
|
|
1870
1901
|
if (!children && formItemColumns.value.length) {
|
|
1871
1902
|
reColumn.className = [...columnClassName, (context) => context.type === "td" ? "qd-service-table__non-editable-col" : ""];
|
|
1872
1903
|
}
|
|
@@ -1880,7 +1911,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1880
1911
|
...attrs,
|
|
1881
1912
|
onDblclick: (event) => {
|
|
1882
1913
|
if (typeof onDblclick === "function") onDblclick(event);
|
|
1883
|
-
if (event.defaultPrevented || !resolveFormItemLazy(column))
|
|
1914
|
+
if (event.defaultPrevented || tableReadonly.value || !resolveFormItemLazy(column)) {
|
|
1915
|
+
return;
|
|
1916
|
+
}
|
|
1884
1917
|
enterEditingCell({
|
|
1885
1918
|
row: context.row,
|
|
1886
1919
|
colKey: column.colKey
|
|
@@ -1948,7 +1981,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1948
1981
|
};
|
|
1949
1982
|
}
|
|
1950
1983
|
};
|
|
1951
|
-
const explicitEdit =
|
|
1984
|
+
const explicitEdit = edit;
|
|
1952
1985
|
const generatedProps = generatedEdit.props;
|
|
1953
1986
|
reColumn.edit = {
|
|
1954
1987
|
...generatedEdit,
|
|
@@ -1966,6 +1999,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1966
1999
|
if (!(rootEl instanceof HTMLElement)) return tableContentEl.value;
|
|
1967
2000
|
return rootEl.querySelector(".t-table__content") ?? tableContentEl.value;
|
|
1968
2001
|
}
|
|
2002
|
+
function clearEditingState() {
|
|
2003
|
+
editingCells.value = [];
|
|
2004
|
+
activeEditingCell.value = void 0;
|
|
2005
|
+
autofocusEditingCell.value = void 0;
|
|
2006
|
+
}
|
|
1969
2007
|
function setScrollElTo(position = scrollRecord) {
|
|
1970
2008
|
const scrollEl = getCurrentTableContentEl();
|
|
1971
2009
|
if (!scrollEl) return;
|
|
@@ -2188,6 +2226,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2188
2226
|
}, {
|
|
2189
2227
|
immediate: true
|
|
2190
2228
|
});
|
|
2229
|
+
watch(tableReadonly, (readonly) => {
|
|
2230
|
+
if (!readonly) return;
|
|
2231
|
+
clearEditingState();
|
|
2232
|
+
}, {
|
|
2233
|
+
flush: "sync"
|
|
2234
|
+
});
|
|
2191
2235
|
watch(expandedTreeNodes, adjustScrollWhenTreeExpanded, {
|
|
2192
2236
|
flush: "post"
|
|
2193
2237
|
});
|
|
@@ -11,6 +11,7 @@ export declare const qdServiceTableProps: {
|
|
|
11
11
|
readonly searchData: () => {};
|
|
12
12
|
readonly emptyText: undefined;
|
|
13
13
|
readonly emptyImage: true;
|
|
14
|
+
readonly readonly: undefined;
|
|
14
15
|
readonly lazyForm: true;
|
|
15
16
|
readonly editCellValidationBlock: "error";
|
|
16
17
|
readonly rowKey: "id";
|
|
@@ -74,6 +74,7 @@ export interface QdServiceTableProps<D extends TableRowData = TableRowData, R =
|
|
|
74
74
|
searchData?: Record<string, unknown>;
|
|
75
75
|
emptyText?: string;
|
|
76
76
|
emptyImage?: boolean | TdEmptyProps['image'];
|
|
77
|
+
readonly?: boolean;
|
|
77
78
|
lazyForm?: boolean;
|
|
78
79
|
editCellValidationBlock?: QdServiceTableEditCellValidationBlock;
|
|
79
80
|
scroll?: QdServiceTableScroll;
|
|
@@ -73,6 +73,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
73
73
|
emptyImage: {
|
|
74
74
|
type: [Boolean, String]
|
|
75
75
|
},
|
|
76
|
+
readonly: {
|
|
77
|
+
type: Boolean
|
|
78
|
+
},
|
|
76
79
|
lazyForm: {
|
|
77
80
|
type: Boolean
|
|
78
81
|
},
|
|
@@ -302,9 +305,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
302
305
|
multiple: {
|
|
303
306
|
type: Boolean
|
|
304
307
|
},
|
|
305
|
-
readonly: {
|
|
306
|
-
type: Boolean
|
|
307
|
-
},
|
|
308
308
|
disabled: {
|
|
309
309
|
type: Boolean
|
|
310
310
|
},
|
|
@@ -87,6 +87,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
87
87
|
emptyImage: {
|
|
88
88
|
type: [Boolean, String]
|
|
89
89
|
},
|
|
90
|
+
readonly: {
|
|
91
|
+
type: Boolean
|
|
92
|
+
},
|
|
90
93
|
lazyForm: {
|
|
91
94
|
type: Boolean
|
|
92
95
|
},
|
|
@@ -308,9 +311,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
308
311
|
multiple: {
|
|
309
312
|
type: Boolean
|
|
310
313
|
},
|
|
311
|
-
readonly: {
|
|
312
|
-
type: Boolean
|
|
313
|
-
},
|
|
314
314
|
disabled: {
|
|
315
315
|
type: Boolean
|
|
316
316
|
},
|
|
@@ -63,6 +63,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
63
63
|
emptyImage: {
|
|
64
64
|
type: [Boolean, String]
|
|
65
65
|
},
|
|
66
|
+
readonly: {
|
|
67
|
+
type: Boolean
|
|
68
|
+
},
|
|
66
69
|
lazyForm: {
|
|
67
70
|
type: Boolean
|
|
68
71
|
},
|
|
@@ -295,9 +298,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
295
298
|
multiple: {
|
|
296
299
|
type: Boolean
|
|
297
300
|
},
|
|
298
|
-
readonly: {
|
|
299
|
-
type: Boolean
|
|
300
|
-
},
|
|
301
301
|
disabled: {
|
|
302
302
|
type: Boolean
|
|
303
303
|
},
|
|
@@ -1,97 +1,100 @@
|
|
|
1
|
-
.qd-upload[data-v-
|
|
1
|
+
.qd-upload[data-v-f6d5f77e] {
|
|
2
2
|
width: 100%;
|
|
3
3
|
outline: none;
|
|
4
4
|
}
|
|
5
|
-
.qd-upload[data-v-
|
|
5
|
+
.qd-upload[data-v-f6d5f77e] .t-image-viewer__trigger {
|
|
6
6
|
display: none;
|
|
7
7
|
}
|
|
8
|
-
.qd-upload[data-v-
|
|
8
|
+
.qd-upload[data-v-f6d5f77e] .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-f6d5f77e] .t-upload__dragger-btns > .t-size-s {
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
}
|
|
17
|
+
.qd-upload[data-v-f6d5f77e] .t-upload__flow {
|
|
15
18
|
width: 100%;
|
|
16
19
|
min-width: auto;
|
|
17
20
|
max-width: 100%;
|
|
18
21
|
}
|
|
19
|
-
.qd-upload[data-v-
|
|
22
|
+
.qd-upload[data-v-f6d5f77e] .t-upload__flow-empty {
|
|
20
23
|
height: auto;
|
|
21
24
|
min-height: 144px;
|
|
22
25
|
}
|
|
23
|
-
.qd-upload[data-v-
|
|
24
|
-
.qd-upload[data-v-
|
|
26
|
+
.qd-upload[data-v-f6d5f77e] .t-upload__flow-card-area,
|
|
27
|
+
.qd-upload[data-v-f6d5f77e] .t-upload__flow-table {
|
|
25
28
|
margin-top: var(--td-comp-margin-s);
|
|
26
29
|
}
|
|
27
|
-
.qd-upload[data-v-
|
|
30
|
+
.qd-upload[data-v-f6d5f77e] .t-upload__file-name__container {
|
|
28
31
|
display: flex;
|
|
29
32
|
align-items: center;
|
|
30
33
|
}
|
|
31
|
-
.qd-upload[data-v-
|
|
34
|
+
.qd-upload[data-v-f6d5f77e] .t-upload__file-name-text {
|
|
32
35
|
cursor: pointer;
|
|
33
36
|
}
|
|
34
|
-
.qd-upload[data-v-
|
|
37
|
+
.qd-upload[data-v-f6d5f77e] .t-upload__file-thumbnail {
|
|
35
38
|
width: var(--td-comp-size-m);
|
|
36
39
|
height: var(--td-comp-size-m);
|
|
37
40
|
}
|
|
38
|
-
.qd-upload[data-v-
|
|
41
|
+
.qd-upload[data-v-f6d5f77e] .t-upload__card-image {
|
|
39
42
|
width: 100%;
|
|
40
43
|
height: 100%;
|
|
41
44
|
}
|
|
42
|
-
.qd-upload__popup-upload[data-v-
|
|
45
|
+
.qd-upload__popup-upload[data-v-f6d5f77e] .t-image-viewer__trigger {
|
|
43
46
|
display: none;
|
|
44
47
|
}
|
|
45
|
-
.qd-upload__popup-upload[data-v-
|
|
48
|
+
.qd-upload__popup-upload[data-v-f6d5f77e] .t-upload__flow-table {
|
|
46
49
|
margin-top: 0;
|
|
47
50
|
}
|
|
48
|
-
.qd-upload__popup-upload[data-v-
|
|
51
|
+
.qd-upload__popup-upload[data-v-f6d5f77e] .t-upload__file-name__container {
|
|
49
52
|
display: flex;
|
|
50
53
|
align-items: center;
|
|
51
54
|
}
|
|
52
|
-
.qd-upload__popup-upload[data-v-
|
|
55
|
+
.qd-upload__popup-upload[data-v-f6d5f77e] .t-upload__file-name-text {
|
|
53
56
|
cursor: pointer;
|
|
54
57
|
}
|
|
55
|
-
.qd-upload__popup-upload[data-v-
|
|
58
|
+
.qd-upload__popup-upload[data-v-f6d5f77e] .t-upload__file-thumbnail {
|
|
56
59
|
width: var(--td-comp-size-m);
|
|
57
60
|
height: var(--td-comp-size-m);
|
|
58
61
|
}
|
|
59
|
-
.qd-upload__popup-upload[data-v-
|
|
62
|
+
.qd-upload__popup-upload[data-v-f6d5f77e] .t-upload__card-image {
|
|
60
63
|
width: 100%;
|
|
61
64
|
height: 100%;
|
|
62
65
|
}
|
|
63
|
-
.qd-upload__popup-upload--disabled[data-v-
|
|
64
|
-
.qd-upload__popup-upload--disabled[data-v-
|
|
66
|
+
.qd-upload__popup-upload--disabled[data-v-f6d5f77e] .t-upload__flow-table th:last-child,
|
|
67
|
+
.qd-upload__popup-upload--disabled[data-v-f6d5f77e] .t-upload__flow-table td:last-child {
|
|
65
68
|
display: none;
|
|
66
69
|
}
|
|
67
|
-
.qd-upload[data-v-
|
|
68
|
-
.qd-upload[data-v-
|
|
70
|
+
.qd-upload[data-v-f6d5f77e]:focus .t-upload__flow-card-area,
|
|
71
|
+
.qd-upload[data-v-f6d5f77e]:focus .t-upload__flow-table {
|
|
69
72
|
border-color: var(--td-brand-color);
|
|
70
73
|
}
|
|
71
|
-
.qd-upload--only-view[data-v-
|
|
72
|
-
.qd-upload--only-view[data-v-
|
|
74
|
+
.qd-upload--only-view[data-v-f6d5f77e] .t-upload__flow-empty,
|
|
75
|
+
.qd-upload--only-view[data-v-f6d5f77e] .t-upload__card-mask-item-divider {
|
|
73
76
|
display: none;
|
|
74
77
|
}
|
|
75
|
-
.qd-upload--only-view[data-v-
|
|
78
|
+
.qd-upload--only-view[data-v-f6d5f77e] .t-upload__flow-card-area {
|
|
76
79
|
border-color: var(--td-component-border);
|
|
77
80
|
}
|
|
78
|
-
.qd-upload--only-view[data-v-
|
|
79
|
-
.qd-upload--only-view[data-v-
|
|
80
|
-
.qd-upload--only-view[data-v-
|
|
81
|
+
.qd-upload--only-view[data-v-f6d5f77e]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-op,
|
|
82
|
+
.qd-upload--only-view[data-v-f6d5f77e]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__trigger,
|
|
83
|
+
.qd-upload--only-view[data-v-f6d5f77e]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-bottom {
|
|
81
84
|
display: none;
|
|
82
85
|
}
|
|
83
|
-
.qd-upload--only-view[data-v-
|
|
84
|
-
.qd-upload--only-view[data-v-
|
|
86
|
+
.qd-upload--only-view[data-v-f6d5f77e]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-table,
|
|
87
|
+
.qd-upload--only-view[data-v-f6d5f77e]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-card-area {
|
|
85
88
|
margin-top: 0;
|
|
86
89
|
}
|
|
87
|
-
.qd-upload--hide-manual-upload[data-v-
|
|
90
|
+
.qd-upload--hide-manual-upload[data-v-f6d5f77e] .t-upload__flow-bottom {
|
|
88
91
|
display: none;
|
|
89
92
|
margin-top: 0;
|
|
90
93
|
}
|
|
91
|
-
.qd-upload--hide-progress[data-v-
|
|
92
|
-
.qd-upload--hide-progress[data-v-
|
|
94
|
+
.qd-upload--hide-progress[data-v-f6d5f77e] .t-upload__flow-table th:last-child,
|
|
95
|
+
.qd-upload--hide-progress[data-v-f6d5f77e] .t-upload__flow-table td:last-child {
|
|
93
96
|
display: none;
|
|
94
97
|
}
|
|
95
|
-
.qd-upload--disabled[data-v-
|
|
98
|
+
.qd-upload--disabled[data-v-f6d5f77e] .t-upload__flow-card-area {
|
|
96
99
|
border-color: var(--td-component-border);
|
|
97
100
|
}
|
|
@@ -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-f6d5f77e"]]);
|
|
6
6
|
export {
|
|
7
7
|
QdUpload as default
|
|
8
8
|
};
|
|
@@ -12,13 +12,13 @@ import { qdUploadAcceptMap } from "./config.mjs";
|
|
|
12
12
|
import { qdUploadSizeLimit, qdUploadProps } from "./props.mjs";
|
|
13
13
|
import { uploadByXhr, calcUploadTimeout } from "./request.mjs";
|
|
14
14
|
import { PROVIDE_FORM_ADD_BEFORE_SUBMIT_QUEUE, PROVIDE_FORM_ADD_AFTER_SUBMIT_QUEUE, PROVIDE_FORM_RESET_QUEUE } from "../form/config.mjs";
|
|
15
|
-
import { useReadonly } from "../../hooks/useReadonly.mjs";
|
|
16
|
-
import { useDisabled } from "../../hooks/useDisabled.mjs";
|
|
17
15
|
import _sfc_main$1 from "./image-file-list-display/index.vue.mjs";
|
|
18
16
|
import QdUploadFileFlowFileListDisplay from "./file-flow-file-list-display/index.vue.mjs";
|
|
19
17
|
import _sfc_main$2 from "../multi-file-viewer/index.vue.mjs";
|
|
20
18
|
/* empty css */
|
|
21
19
|
import _sfc_main$3 from "./image-flow-file-list-display/index.vue.mjs";
|
|
20
|
+
import { useReadonly } from "../../hooks/useReadonly.mjs";
|
|
21
|
+
import { useDisabled } from "../../hooks/useDisabled.mjs";
|
|
22
22
|
import { useModal } from "../../hooks/useModal.mjs";
|
|
23
23
|
const tempOssIdPrefix = "__qd_upload_temp_";
|
|
24
24
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -261,7 +261,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
261
261
|
response: { ...response, url: response?.url ?? response?.data?.url }
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
|
-
const errorMsg =
|
|
264
|
+
const errorMsg = result.error === "timeout" ? t("fileUploadTimeout") : formatResult.error || t("fileUploadFailed");
|
|
265
265
|
return { status: "fail", error: errorMsg, response: {} };
|
|
266
266
|
});
|
|
267
267
|
} : void 0;
|
package/dist/locales/en-US.d.ts
CHANGED
package/dist/locales/en-US.mjs
CHANGED
|
@@ -83,7 +83,8 @@ const enUS = merge(enUS$1, {
|
|
|
83
83
|
clickDownloadTplText: "Click to download the corresponding template and complete the information.",
|
|
84
84
|
downloadTplText: "Download template",
|
|
85
85
|
successText: "Import Success",
|
|
86
|
-
failText: "Import Failed"
|
|
86
|
+
failText: "Import Failed",
|
|
87
|
+
updateSupportText: "Update existing data"
|
|
87
88
|
},
|
|
88
89
|
form: {
|
|
89
90
|
submitFailed: "Submission Failed",
|
package/dist/locales/zh-CN.d.ts
CHANGED
package/dist/locales/zh-CN.mjs
CHANGED
package/dist/locales/zh-TW.d.ts
CHANGED
package/dist/locales/zh-TW.mjs
CHANGED