@sdata/web-vue 4.7.1 → 5.0.0
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/sd.css +4004 -3955
- package/dist/sd.min.css +13 -13
- package/es/_components/input-label/style/index.css +47 -47
- package/es/_components/select-view/style/index.css +256 -256
- package/es/alert/style/index.css +48 -48
- package/es/alert/style/token.scss +257 -0
- package/es/anchor/style/index.css +18 -18
- package/es/anchor/style/token.scss +74 -0
- package/es/auto-complete/style/index.css +18 -18
- package/es/auto-complete/style/token.scss +94 -0
- package/es/avatar/style/index.css +31 -31
- package/es/avatar/style/token.scss +118 -0
- package/es/back-top/style/index.css +11 -11
- package/es/back-top/style/token.scss +60 -0
- package/es/badge/style/index.css +35 -35
- package/es/badge/style/token.scss +148 -0
- package/es/basic-crud-table/style/index.css +4 -4
- package/es/basic-crud-table/style/token.scss +20 -0
- package/es/bloom-menu/style/index.css +33 -34
- package/es/bloom-menu/style/index.scss +5 -5
- package/es/bloom-menu/style/token.scss +99 -0
- package/es/border-beam/style/token.scss +28 -0
- package/es/breadcrumb/style/index.css +17 -17
- package/es/breadcrumb/style/token.scss +97 -0
- package/es/button/style/index.css +379 -379
- package/es/button/style/index.scss +3 -3
- package/es/button/style/token.scss +1604 -0
- package/es/card/style/index.css +36 -36
- package/es/card/style/token.scss +162 -0
- package/es/carousel/style/index.css +41 -41
- package/es/carousel/style/token.scss +101 -0
- package/es/cascader/style/index.css +58 -58
- package/es/cascader/style/token.scss +89 -0
- package/es/checkbox/style/index.css +28 -28
- package/es/checkbox/style/token.scss +134 -0
- package/es/collapse/style/index.css +24 -24
- package/es/collapse/style/token.scss +136 -0
- package/es/color-picker/style/index.css +50 -50
- package/es/color-picker/style/token.scss +200 -0
- package/es/comment/style/index.css +15 -15
- package/es/comment/style/token.scss +83 -0
- package/es/config-provider/algorithms.d.ts +11 -0
- package/es/config-provider/algorithms.js +53 -0
- package/es/config-provider/global-theme.js +7 -4
- package/es/config-provider/theme-config.d.ts +11 -0
- package/es/config-provider/theme-config.js +114 -0
- package/es/config-provider/theme-provider.vue_vue_type_script_setup_true_lang.js +46 -11
- package/es/config-provider/theme.d.ts +4 -1
- package/es/config-provider/theme.js +6 -5
- package/es/config-provider/token-key.d.ts +1 -0
- package/es/config-provider/token-key.js +6 -0
- package/es/copy/style/index.css +1 -1
- package/es/copy/style/token.scss +9 -0
- package/es/cropper/style/index.css +7 -7
- package/es/cropper/style/token.scss +24 -0
- package/es/date-picker/style/index.css +73 -73
- package/es/date-picker/style/token.scss +229 -0
- package/es/descriptions/style/index.css +45 -45
- package/es/descriptions/style/token.scss +191 -0
- package/es/divider/style/index.css +11 -11
- package/es/divider/style/token.scss +60 -0
- package/es/drawer/style/index.css +13 -13
- package/es/drawer/style/token.scss +68 -0
- package/es/dropdown/style/index.css +24 -23
- package/es/dropdown/style/index.scss +4 -2
- package/es/dropdown/style/token.scss +123 -0
- package/es/ellipsis/ellipsis.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/ellipsis/interface.d.ts +1 -0
- package/es/ellipsis/style/index.css +2 -2
- package/es/ellipsis/style/token.scss +5 -0
- package/es/empty/style/index.css +7 -7
- package/es/empty/style/token.scss +35 -0
- package/es/file-previewer/style/index.css +44 -44
- package/es/file-previewer/style/token.scss +198 -0
- package/es/form/style/index.css +113 -113
- package/es/form/style/token.scss +340 -0
- package/es/image/style/index.css +83 -83
- package/es/image/style/token.scss +451 -0
- package/es/index.css +4004 -3955
- package/es/index.d.ts +3 -0
- package/es/index.js +4 -1
- package/es/input/style/index.css +104 -104
- package/es/input/style/input.scss +2 -8
- package/es/input/style/size.scss +4 -4
- package/es/input/style/token.scss +327 -0
- package/es/input-mask/style/index.css +1 -1
- package/es/input-mask/style/token.scss +8 -0
- package/es/input-number/style/index.css +19 -19
- package/es/input-number/style/token.scss +82 -0
- package/es/input-tag/style/index.css +209 -209
- package/es/input-tag/style/token.scss +226 -0
- package/es/json-form/style/index.css +2 -2
- package/es/json-form/style/token.scss +21 -0
- package/es/kv-list/style/index.css +13 -13
- package/es/kv-list/style/token.scss +29 -0
- package/es/layout/style/index.css +38 -38
- package/es/layout/style/token.scss +100 -0
- package/es/link/style/index.css +28 -28
- package/es/link/style/token.scss +117 -0
- package/es/list/style/index.css +27 -27
- package/es/list/style/token.scss +178 -0
- package/es/mention/style/token.scss +22 -0
- package/es/menu/style/index.css +153 -120
- package/es/menu/style/index.scss +12 -4
- package/es/menu/style/token.scss +390 -0
- package/es/message/style/index.css +33 -33
- package/es/message/style/token.scss +218 -0
- package/es/modal/style/index.css +21 -21
- package/es/modal/style/token.scss +115 -0
- package/es/model-selector/style/index.css +1 -1
- package/es/notification/style/index.css +44 -44
- package/es/notification/style/token.scss +241 -0
- package/es/number-flow/style/index.css +5 -5
- package/es/number-flow/style/token.scss +19 -0
- package/es/page-header/style/index.css +25 -25
- package/es/page-header/style/token.scss +139 -0
- package/es/pagination/style/index.css +85 -85
- package/es/pagination/style/token.scss +303 -0
- package/es/panel-group/style/index.css +7 -7
- package/es/panel-group/style/token.scss +28 -0
- package/es/popconfirm/style/index.css +18 -18
- package/es/popconfirm/style/token.scss +83 -0
- package/es/popover/style/index.css +12 -12
- package/es/popover/style/token.scss +58 -0
- package/es/progress/style/index.css +55 -55
- package/es/progress/style/token.scss +253 -0
- package/es/qr-code/style/index.css +18 -21
- package/es/qr-code/style/index.scss +4 -6
- package/es/qr-code/style/token.scss +59 -0
- package/es/radio/style/index.css +45 -44
- package/es/radio/style/index.scss +1 -0
- package/es/radio/style/token.scss +185 -0
- package/es/rate/style/index.css +8 -8
- package/es/rate/style/token.scss +19 -0
- package/es/regex-vis/style/index.css +51 -51
- package/es/regex-vis/style/token.scss +170 -0
- package/es/result/style/index.css +26 -26
- package/es/result/style/token.scss +139 -0
- package/es/rich-text-editor/style/index.css +31 -31
- package/es/rich-text-editor/style/token.scss +120 -0
- package/es/scrollbar/style/index.css +14 -14
- package/es/scrollbar/style/token.scss +33 -0
- package/es/secret/style/index.css +6 -6
- package/es/secret/style/token.scss +30 -0
- package/es/select/style/index.css +27 -27
- package/es/select/style/token.scss +151 -0
- package/es/selectable-card/style/index.css +53 -51
- package/es/selectable-card/style/index.scss +6 -2
- package/es/selectable-card/style/token.scss +60 -0
- package/es/sender/style/index.css +54 -54
- package/es/sender/style/token.scss +155 -0
- package/es/skeleton/style/index.css +12 -12
- package/es/skeleton/style/token.scss +60 -0
- package/es/slider/style/index.css +34 -34
- package/es/slider/style/token.scss +144 -0
- package/es/spin/style/index.css +11 -11
- package/es/spin/style/token.scss +60 -0
- package/es/split/style/index.css +2 -2
- package/es/split/style/token.scss +18 -0
- package/es/statistic/style/index.css +13 -13
- package/es/statistic/style/token.scss +73 -0
- package/es/steps/style/index.css +98 -98
- package/es/steps/style/token.scss +464 -0
- package/es/style/color/css-variables.scss +382 -381
- package/es/style/theme/css-variables.scss +329 -135
- package/es/style/theme/global.scss +5 -5
- package/es/style/theme/index.scss +1 -1
- package/es/style/theme/runtime.scss +29 -0
- package/es/switch/style/index.css +37 -37
- package/es/switch/style/token.scss +135 -0
- package/es/table/style/index.css +127 -127
- package/es/table/style/token.scss +425 -0
- package/es/tabs/style/index.css +196 -190
- package/es/tabs/style/index.scss +27 -17
- package/es/tabs/style/token.scss +534 -0
- package/es/tag/index.d.ts +13 -0
- package/es/tag/interface.d.ts +1 -0
- package/es/tag/style/index.css +159 -159
- package/es/tag/style/token.scss +513 -0
- package/es/tag/tag.vue.d.ts +13 -3
- package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +35 -8
- package/es/tag-group/style/index.css +3 -3
- package/es/tag-group/style/token.scss +9 -0
- package/es/textarea/style/index.css +40 -40
- package/es/time-picker/style/index.css +12 -12
- package/es/time-picker/style/token.scss +50 -0
- package/es/timeline/style/index.css +22 -22
- package/es/timeline/style/token.scss +75 -0
- package/es/toolbar/style/index.css +6 -6
- package/es/toolbar/style/token.scss +45 -0
- package/es/tooltip/style/index.css +8 -8
- package/es/tooltip/style/token.scss +46 -0
- package/es/tour/style/index.css +28 -28
- package/es/tour/style/token.scss +65 -0
- package/es/transfer/style/index.css +46 -45
- package/es/transfer/style/index.scss +4 -1
- package/es/transfer/style/token.scss +199 -0
- package/es/tree/style/index.css +43 -36
- package/es/tree/style/index.scss +10 -0
- package/es/tree/style/token.scss +163 -0
- package/es/tree-select/style/index.css +9 -9
- package/es/tree-select/style/token.scss +21 -0
- package/es/trigger/style/index.css +7 -7
- package/es/trigger/style/token.scss +19 -0
- package/es/typography/style/index.css +40 -40
- package/es/typography/style/token.scss +220 -0
- package/es/upload/index.d.ts +3 -0
- package/es/upload/style/index.css +95 -95
- package/es/upload/style/token.scss +470 -0
- package/es/upload/upload.vue.d.ts +2 -0
- package/es/upload/upload.vue_vue_type_script_setup_true_lang.js +109 -16
- package/json/vetur-attributes.json +7 -0
- package/json/vetur-tags.json +4 -1
- package/json/web-types.json +18 -2
- package/package.json +7 -2
- package/es/style/color/palette-dark.d.ts +0 -4
- package/es/style/color/palette-dark.js +0 -10
- package/es/style/color/palette.d.ts +0 -4
- package/es/style/color/palette.js +0 -10
|
@@ -2,12 +2,13 @@ import { useFormItem } from "../_hooks/use-form-item.js";
|
|
|
2
2
|
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import { isBoolean, isFunction, isObject } from "../_utils/is.js";
|
|
5
|
+
import _asyncToGenerator from "../_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/asyncToGenerator.js";
|
|
5
6
|
import preview_group_default from "../image/preview-group.js";
|
|
6
7
|
import { uploadInjectionKey } from "./context.js";
|
|
7
8
|
import { isImage, uploadRequest } from "./utils.js";
|
|
8
9
|
import upload_button_default from "./upload-button.js";
|
|
9
10
|
import upload_list_default from "./upload-list.js";
|
|
10
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, createSlots, createVNode, defineComponent, guardReactiveProps, h, mergeProps, normalizeProps, openBlock, provide, reactive, ref, renderSlot, toRefs, unref, useAttrs, useSlots, watch, withCtx } from "vue";
|
|
11
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createSlots, createVNode, defineComponent, guardReactiveProps, h, mergeProps, normalizeProps, onBeforeUnmount, openBlock, provide, reactive, ref, renderSlot, toRefs, unref, useAttrs, useSlots, watch, withCtx } from "vue";
|
|
11
12
|
//#region components/upload/upload.vue?vue&type=script&setup=true&lang.ts
|
|
12
13
|
var upload_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, {
|
|
13
14
|
name: "Upload",
|
|
@@ -50,6 +51,11 @@ var upload_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
50
51
|
default: false
|
|
51
52
|
},
|
|
52
53
|
customRequest: Function,
|
|
54
|
+
/**
|
|
55
|
+
* @zh 跨标签页上传互斥标识;相同标识同时只允许一个文件上传
|
|
56
|
+
* @en Cross-tab upload lock key; only one file per key may upload at a time
|
|
57
|
+
*/
|
|
58
|
+
lockKey: [String, Function],
|
|
53
59
|
limit: {
|
|
54
60
|
type: Number,
|
|
55
61
|
default: 0
|
|
@@ -130,6 +136,25 @@ var upload_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
130
136
|
const innerFileList = ref([]);
|
|
131
137
|
const fileMap = /* @__PURE__ */ new Map();
|
|
132
138
|
const requestMap = /* @__PURE__ */ new Map();
|
|
139
|
+
let disposed = false;
|
|
140
|
+
let pendingFiles = 0;
|
|
141
|
+
const cancelRequest = (uid) => {
|
|
142
|
+
const task = requestMap.get(uid);
|
|
143
|
+
if (!task) return;
|
|
144
|
+
requestMap.delete(uid);
|
|
145
|
+
task.cancelled = true;
|
|
146
|
+
try {
|
|
147
|
+
var _task$request, _task$request$abort;
|
|
148
|
+
(_task$request = task.request) === null || _task$request === void 0 || (_task$request$abort = _task$request.abort) === null || _task$request$abort === void 0 || _task$request$abort.call(_task$request);
|
|
149
|
+
} finally {
|
|
150
|
+
var _task$releaseLock;
|
|
151
|
+
(_task$releaseLock = task.releaseLock) === null || _task$releaseLock === void 0 || _task$releaseLock.call(task);
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
onBeforeUnmount(() => {
|
|
155
|
+
disposed = true;
|
|
156
|
+
for (const uid of requestMap.keys()) cancelRequest(uid);
|
|
157
|
+
});
|
|
133
158
|
const isMax = computed(() => props.limit > 0 && innerFileList.value.length >= props.limit);
|
|
134
159
|
const checkFileList = (fileList) => {
|
|
135
160
|
fileMap.clear();
|
|
@@ -145,6 +170,7 @@ var upload_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
145
170
|
return fileItem;
|
|
146
171
|
});
|
|
147
172
|
innerFileList.value = nextFileList !== null && nextFileList !== void 0 ? nextFileList : [];
|
|
173
|
+
for (const uid of requestMap.keys()) if (!fileMap.has(uid)) cancelRequest(uid);
|
|
148
174
|
};
|
|
149
175
|
checkFileList(props.defaultFileList);
|
|
150
176
|
watch(() => props.fileList, (fileList) => {
|
|
@@ -167,7 +193,12 @@ var upload_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
167
193
|
}
|
|
168
194
|
};
|
|
169
195
|
const uploadFile = (fileItem) => {
|
|
196
|
+
if (disposed || !fileMap.has(fileItem.uid) || requestMap.has(fileItem.uid)) return;
|
|
197
|
+
const task = { cancelled: false };
|
|
198
|
+
requestMap.set(fileItem.uid, task);
|
|
199
|
+
const isCurrent = () => !disposed && requestMap.get(fileItem.uid) === task;
|
|
170
200
|
const handleProgress = (percent, event) => {
|
|
201
|
+
if (!isCurrent()) return;
|
|
171
202
|
const file = fileMap.get(fileItem.uid);
|
|
172
203
|
if (!file) return;
|
|
173
204
|
file.status = "uploading";
|
|
@@ -176,6 +207,8 @@ var upload_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
176
207
|
updateFileList(file);
|
|
177
208
|
};
|
|
178
209
|
const handleSuccess = (response) => {
|
|
210
|
+
var _task$releaseLock2;
|
|
211
|
+
if (!isCurrent()) return;
|
|
179
212
|
const file = fileMap.get(fileItem.uid);
|
|
180
213
|
if (!file) return;
|
|
181
214
|
file.status = "done";
|
|
@@ -186,16 +219,20 @@ var upload_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
186
219
|
else if (isObject(response) && response[props.responseUrlKey]) file.url = String(response[props.responseUrlKey]);
|
|
187
220
|
}
|
|
188
221
|
requestMap.delete(file.uid);
|
|
222
|
+
(_task$releaseLock2 = task.releaseLock) === null || _task$releaseLock2 === void 0 || _task$releaseLock2.call(task);
|
|
189
223
|
emit("success", file);
|
|
190
224
|
updateFileList(file);
|
|
191
225
|
};
|
|
192
226
|
const handleError = (response) => {
|
|
227
|
+
var _task$releaseLock3;
|
|
228
|
+
if (!isCurrent()) return;
|
|
193
229
|
const file = fileMap.get(fileItem.uid);
|
|
194
230
|
if (!file) return;
|
|
195
231
|
file.status = "error";
|
|
196
232
|
file.percent = 0;
|
|
197
233
|
file.response = response;
|
|
198
234
|
requestMap.delete(file.uid);
|
|
235
|
+
(_task$releaseLock3 = task.releaseLock) === null || _task$releaseLock3 === void 0 || _task$releaseLock3.call(task);
|
|
199
236
|
emit("error", file);
|
|
200
237
|
updateFileList(file);
|
|
201
238
|
};
|
|
@@ -212,16 +249,53 @@ var upload_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
212
249
|
};
|
|
213
250
|
fileItem.status = "uploading";
|
|
214
251
|
fileItem.percent = 0;
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
|
|
252
|
+
const startRequest = () => {
|
|
253
|
+
if (!isCurrent()) return;
|
|
254
|
+
try {
|
|
255
|
+
var _task$request$abort2, _task$request2;
|
|
256
|
+
task.request = isFunction(props.customRequest) ? props.customRequest(option) : uploadRequest(option);
|
|
257
|
+
if (task.cancelled) (_task$request$abort2 = (_task$request2 = task.request).abort) === null || _task$request$abort2 === void 0 || _task$request$abort2.call(_task$request2);
|
|
258
|
+
if (isCurrent()) updateFileList(fileItem);
|
|
259
|
+
} catch (error) {
|
|
260
|
+
handleError(error);
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
try {
|
|
264
|
+
var _globalThis$navigator;
|
|
265
|
+
const key = isFunction(props.lockKey) ? props.lockKey(fileItem) : props.lockKey;
|
|
266
|
+
if (key === void 0) {
|
|
267
|
+
startRequest();
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
if (!((_globalThis$navigator = globalThis.navigator) === null || _globalThis$navigator === void 0 ? void 0 : _globalThis$navigator.locks)) {
|
|
271
|
+
handleError({
|
|
272
|
+
code: "UPLOAD_LOCK_UNSUPPORTED",
|
|
273
|
+
message: "Web Locks API is unavailable"
|
|
274
|
+
});
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
navigator.locks.request(`sd-upload:${key}`, { ifAvailable: true }, (lock) => {
|
|
278
|
+
if (!isCurrent()) return;
|
|
279
|
+
if (!lock) {
|
|
280
|
+
handleError({
|
|
281
|
+
code: "UPLOAD_LOCK_BUSY",
|
|
282
|
+
message: "An upload with this lock key is already running"
|
|
283
|
+
});
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
return new Promise((resolve) => {
|
|
287
|
+
task.releaseLock = resolve;
|
|
288
|
+
startRequest();
|
|
289
|
+
});
|
|
290
|
+
}).catch(handleError);
|
|
291
|
+
updateFileList(fileItem);
|
|
292
|
+
} catch (error) {
|
|
293
|
+
handleError(error);
|
|
294
|
+
}
|
|
218
295
|
};
|
|
219
296
|
const abort = (fileItem) => {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
if (!request) return;
|
|
223
|
-
(_request$abort = request.abort) === null || _request$abort === void 0 || _request$abort.call(request);
|
|
224
|
-
requestMap.delete(fileItem.uid);
|
|
297
|
+
if (!requestMap.get(fileItem.uid)) return;
|
|
298
|
+
cancelRequest(fileItem.uid);
|
|
225
299
|
const file = fileMap.get(fileItem.uid);
|
|
226
300
|
if (file) {
|
|
227
301
|
file.status = "error";
|
|
@@ -239,6 +313,11 @@ var upload_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
239
313
|
for (const item of innerFileList.value) if (item.status === "init") uploadFile(item);
|
|
240
314
|
};
|
|
241
315
|
const initUpload = (file) => {
|
|
316
|
+
if (disposed) return;
|
|
317
|
+
if (props.limit > 0 && innerFileList.value.length >= props.limit) {
|
|
318
|
+
emit("exceedLimit", innerFileList.value, [file]);
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
242
321
|
const uid = `${Date.now()}-${uidCounter++}`;
|
|
243
322
|
const fileItem = reactive({
|
|
244
323
|
uid,
|
|
@@ -254,20 +333,34 @@ var upload_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
254
333
|
if (props.autoUpload) uploadFile(fileItem);
|
|
255
334
|
};
|
|
256
335
|
const uploadFiles = (files) => {
|
|
257
|
-
if (
|
|
336
|
+
if (disposed) return;
|
|
337
|
+
if (props.limit > 0 && innerFileList.value.length + pendingFiles + files.length > props.limit) {
|
|
258
338
|
emit("exceedLimit", innerFileList.value, files);
|
|
259
339
|
return;
|
|
260
340
|
}
|
|
261
|
-
files.
|
|
262
|
-
|
|
341
|
+
pendingFiles += files.length;
|
|
342
|
+
files.forEach(function() {
|
|
343
|
+
var _ref = _asyncToGenerator(function* (file) {
|
|
344
|
+
let result = true;
|
|
345
|
+
try {
|
|
346
|
+
if (isFunction(props.onBeforeUpload)) result = yield props.onBeforeUpload(file);
|
|
347
|
+
} catch (error) {
|
|
348
|
+
result = false;
|
|
349
|
+
console.error(error);
|
|
350
|
+
} finally {
|
|
351
|
+
pendingFiles -= 1;
|
|
352
|
+
}
|
|
263
353
|
if (result) initUpload(isBoolean(result) ? file : result);
|
|
264
|
-
}).catch((error) => {
|
|
265
|
-
console.error(error);
|
|
266
354
|
});
|
|
267
|
-
|
|
268
|
-
|
|
355
|
+
return function(_x) {
|
|
356
|
+
return _ref.apply(this, arguments);
|
|
357
|
+
};
|
|
358
|
+
}());
|
|
269
359
|
};
|
|
270
360
|
const removeFile = (fileItem) => {
|
|
361
|
+
if (disposed || !fileMap.has(fileItem.uid)) return;
|
|
362
|
+
fileMap.delete(fileItem.uid);
|
|
363
|
+
cancelRequest(fileItem.uid);
|
|
271
364
|
innerFileList.value = innerFileList.value.filter((item) => item.uid !== fileItem.uid);
|
|
272
365
|
updateFileList(fileItem);
|
|
273
366
|
};
|
|
@@ -2988,6 +2988,10 @@
|
|
|
2988
2988
|
"sd-tag/ellipsis-tooltip": {
|
|
2989
2989
|
"description": "Whether to show a tooltip when ellipsis is active. Tooltip props are supported."
|
|
2990
2990
|
},
|
|
2991
|
+
"sd-tag/tooltip": {
|
|
2992
|
+
"description": "Custom tooltip content. When set (or when the tooltip slot is used), the tooltip shows on hover whether or not the content is truncated, unless the ellipsis tooltip is explicitly disabled (false or disabled: true)",
|
|
2993
|
+
"type": "string"
|
|
2994
|
+
},
|
|
2991
2995
|
"sd-tag/ellipsis-performant": {
|
|
2992
2996
|
"description": "Whether to use the performant ellipsis implementation",
|
|
2993
2997
|
"type": "boolean"
|
|
@@ -3752,6 +3756,9 @@
|
|
|
3752
3756
|
"description": "Heading level, equivalent to `h1` `h2` `h3` `h4` `h5` `h6`",
|
|
3753
3757
|
"type": "string"
|
|
3754
3758
|
},
|
|
3759
|
+
"sd-upload/lock-key": {
|
|
3760
|
+
"description": "Cross-tab upload lock key; only one file per key may upload at a time"
|
|
3761
|
+
},
|
|
3755
3762
|
"sd-watermark/content": {
|
|
3756
3763
|
"description": "Watermark text content"
|
|
3757
3764
|
},
|
package/json/vetur-tags.json
CHANGED
|
@@ -1375,6 +1375,7 @@
|
|
|
1375
1375
|
"ellipsis-line-clamp",
|
|
1376
1376
|
"ellipsis-expand-trigger",
|
|
1377
1377
|
"ellipsis-tooltip",
|
|
1378
|
+
"tooltip",
|
|
1378
1379
|
"ellipsis-performant",
|
|
1379
1380
|
"text-color",
|
|
1380
1381
|
"background-alpha"
|
|
@@ -1650,7 +1651,9 @@
|
|
|
1650
1651
|
"attributes": []
|
|
1651
1652
|
},
|
|
1652
1653
|
"sd-upload": {
|
|
1653
|
-
"attributes": [
|
|
1654
|
+
"attributes": [
|
|
1655
|
+
"lock-key"
|
|
1656
|
+
]
|
|
1654
1657
|
},
|
|
1655
1658
|
"sd-verification-code": {
|
|
1656
1659
|
"attributes": []
|
package/json/web-types.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "@sdata/web-vue",
|
|
5
|
-
"version": "4.7.
|
|
5
|
+
"version": "4.7.2",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"types-syntax": "typescript",
|
|
@@ -7363,6 +7363,14 @@
|
|
|
7363
7363
|
"kind": "expression"
|
|
7364
7364
|
}
|
|
7365
7365
|
},
|
|
7366
|
+
{
|
|
7367
|
+
"name": "tooltip",
|
|
7368
|
+
"description": "Custom tooltip content. When set (or when the tooltip slot is used), the tooltip shows on hover whether or not the content is truncated, unless the ellipsis tooltip is explicitly disabled (false or disabled: true)",
|
|
7369
|
+
"value": {
|
|
7370
|
+
"type": "string",
|
|
7371
|
+
"kind": "expression"
|
|
7372
|
+
}
|
|
7373
|
+
},
|
|
7366
7374
|
{
|
|
7367
7375
|
"name": "ellipsis-performant",
|
|
7368
7376
|
"description": "Whether to use the performant ellipsis implementation",
|
|
@@ -9127,7 +9135,15 @@
|
|
|
9127
9135
|
},
|
|
9128
9136
|
{
|
|
9129
9137
|
"name": "sd-upload",
|
|
9130
|
-
"attributes": [
|
|
9138
|
+
"attributes": [
|
|
9139
|
+
{
|
|
9140
|
+
"name": "lock-key",
|
|
9141
|
+
"description": "Cross-tab upload lock key; only one file per key may upload at a time",
|
|
9142
|
+
"value": {
|
|
9143
|
+
"kind": "expression"
|
|
9144
|
+
}
|
|
9145
|
+
}
|
|
9146
|
+
],
|
|
9131
9147
|
"events": [],
|
|
9132
9148
|
"slots": []
|
|
9133
9149
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdata/web-vue",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "SD Design Vue: A Vue.js 3 UI Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sd",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"dist",
|
|
20
20
|
"json"
|
|
21
21
|
],
|
|
22
|
+
"type": "module",
|
|
22
23
|
"sideEffects": [
|
|
23
24
|
"dist/*",
|
|
24
25
|
"es/**/style/*",
|
|
@@ -122,16 +123,20 @@
|
|
|
122
123
|
},
|
|
123
124
|
"web-types": "json/web-types.json",
|
|
124
125
|
"scripts": {
|
|
126
|
+
"theme:generate": "node ./scripts/theme-catalog.mjs",
|
|
127
|
+
"test:theme": "node --test ./scripts/theme-catalog.test.mjs && cypress run --quiet --component --browser chrome --spec components/config-provider/__test__/*.cy.ts",
|
|
128
|
+
"test:theme:e2e": "cypress run --quiet --browser chrome --config-file cypress.theme.config.ts",
|
|
125
129
|
"predev": "pnpm run icongen",
|
|
126
130
|
"dev": "vp run task:dev-component",
|
|
127
131
|
"start": "pnpm run dev",
|
|
128
|
-
"icongen": "vp run gen:icons",
|
|
132
|
+
"icongen": "pnpm run theme:generate && vp run gen:icons",
|
|
129
133
|
"jsongen": "vp run gen:web-types",
|
|
130
134
|
"build": "pnpm run build:component && pnpm run build:style && pnpm run build:dts && pnpm run jsongen",
|
|
131
135
|
"prebuild:component": "pnpm run icongen",
|
|
132
136
|
"build:component": "vp run task:build-component",
|
|
133
137
|
"prebuild:module": "pnpm run icongen",
|
|
134
138
|
"build:module": "vp run task:build-module",
|
|
139
|
+
"prebuild:style": "pnpm run theme:generate",
|
|
135
140
|
"build:style": "vp run task:build-style",
|
|
136
141
|
"fix:scss-legacy-props": "node ./scripts/fix-scss-legacy-property-refs.mjs",
|
|
137
142
|
"prebuild:dts": "pnpm run icongen",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// oxlint-disable-next-line @typescript-eslint/no-var-requires
|
|
2
|
-
const { generate } = require('@arco-design/color');
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
install(_, __, functions) {
|
|
6
|
-
functions.add('color-palette-dark', (color, index) => {
|
|
7
|
-
return generate(color.value, { index: index.value, dark: true });
|
|
8
|
-
});
|
|
9
|
-
},
|
|
10
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// oxlint-disable-next-line @typescript-eslint/no-var-requires
|
|
2
|
-
const { generate } = require('@arco-design/color');
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
install(_, __, functions) {
|
|
6
|
-
functions.add('color-palette', (color, index) => {
|
|
7
|
-
return generate(color.value, { index: index.value });
|
|
8
|
-
});
|
|
9
|
-
},
|
|
10
|
-
};
|