@sdata/web-vue 3.28.0 → 3.30.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.
@@ -143,6 +143,7 @@ var basic_crud_table_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
143
143
  const toolbarSlotNames = computed(() => getForwardedSlotNames("toolbar__", [
144
144
  "default",
145
145
  "action_prepend",
146
+ "action_middle",
146
147
  "action_append"
147
148
  ]));
148
149
  const tableSlotNames = computed(() => getForwardedSlotNames("table__", ["action_prepend", "action_append"]));
@@ -412,13 +413,17 @@ var basic_crud_table_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
412
413
  onSearch: handleSearch,
413
414
  onReset: handleReset
414
415
  }), createSlots({
415
- "action-append": withCtx(() => [renderSlot(_ctx.$slots, "toolbar__action_append"), __props.showCreate ? (openBlock(), createBlock(unref(Button), mergeProps({
416
- key: 0,
417
- type: "primary"
418
- }, __props.createBtn, { onClick: handleCreate }), {
419
- default: withCtx(() => [..._cache[6] || (_cache[6] = [createTextVNode(" 新建 ", -1)])]),
420
- _: 1
421
- }, 16)) : createCommentVNode("", true)]),
416
+ "action-append": withCtx(() => [
417
+ renderSlot(_ctx.$slots, "toolbar__action_middle"),
418
+ __props.showCreate ? (openBlock(), createBlock(unref(Button), mergeProps({
419
+ key: 0,
420
+ type: "primary"
421
+ }, __props.createBtn, { onClick: handleCreate }), {
422
+ default: withCtx(() => [..._cache[6] || (_cache[6] = [createTextVNode(" 新建 ", -1)])]),
423
+ _: 1
424
+ }, 16)) : createCommentVNode("", true),
425
+ renderSlot(_ctx.$slots, "toolbar__action_append")
426
+ ]),
422
427
  _: 2
423
428
  }, [
424
429
  _ctx.$slots.toolbar__default ? {
package/es/index.css CHANGED
@@ -3408,7 +3408,7 @@ body {
3408
3408
  }
3409
3409
 
3410
3410
  .sd-upload {
3411
- display: inline-block;
3411
+ display: block;
3412
3412
  max-width: 100%;
3413
3413
  cursor: pointer;
3414
3414
  }
package/es/index.js CHANGED
@@ -58,6 +58,9 @@ import week_picker_default from "./date-picker/pickers/week-picker.js";
58
58
  import year_picker_default from "./date-picker/pickers/year-picker.js";
59
59
  import range_picker_default from "./date-picker/range-picker.js";
60
60
  import DatePicker from "./date-picker/index.js";
61
+ import { defaultInputMaskFormatChars, formatInputMask } from "./input-mask/mask-engine.js";
62
+ import { inputMaskPresets } from "./input-mask/presets.js";
63
+ import InputMask from "./input-mask/index.js";
61
64
  import Textarea from "./textarea/index.js";
62
65
  import Mention from "./mention/index.js";
63
66
  import Rate from "./rate/index.js";
@@ -107,9 +110,6 @@ import preview_group_default from "./image/preview-group.js";
107
110
  import Image from "./image/index.js";
108
111
  import FilePreviewer from "./file-previewer/index.js";
109
112
  import Icon from "./icon-component/index.js";
110
- import { defaultInputMaskFormatChars, formatInputMask } from "./input-mask/mask-engine.js";
111
- import { inputMaskPresets } from "./input-mask/presets.js";
112
- import InputMask from "./input-mask/index.js";
113
113
  import KvList from "./kv-list/index.js";
114
114
  import content_default from "./layout/content.js";
115
115
  import footer_default from "./layout/footer.js";
@@ -27,6 +27,7 @@ var json_form_component_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
27
27
  const type = (_props$schema$type2 = props.schema.type) !== null && _props$schema$type2 !== void 0 ? _props$schema$type2 : JSON_FORM_COMPONENT_TYPES.input;
28
28
  if ([
29
29
  JSON_FORM_COMPONENT_TYPES.input,
30
+ JSON_FORM_COMPONENT_TYPES.inputMask,
30
31
  JSON_FORM_COMPONENT_TYPES.inputSearch,
31
32
  JSON_FORM_COMPONENT_TYPES.inputNumber,
32
33
  JSON_FORM_COMPONENT_TYPES.inputPassword,
@@ -6,6 +6,7 @@ import type { DatePickerInstance, RangePickerInstance } from '../date-picker';
6
6
  import type { FieldRule, FormItemInstance } from '../form';
7
7
  import type { GridColInstance, GridRowInstance } from '../grid';
8
8
  import type { InputInstance, InputPasswordInstance, InputSearchInstance } from '../input';
9
+ import type { InputMaskInstance } from '../input-mask';
9
10
  import type { InputNumberInstance } from '../input-number';
10
11
  import type { InputTagInstance } from '../input-tag';
11
12
  import type { MentionInstance } from '../mention';
@@ -31,6 +32,7 @@ export declare const JSON_FORM_COMPONENT_TYPES: {
31
32
  readonly checkboxGroup: "checkboxGroup";
32
33
  readonly datePicker: "datePicker";
33
34
  readonly input: "input";
35
+ readonly inputMask: "inputMask";
34
36
  readonly inputNumber: "inputNumber";
35
37
  readonly inputPassword: "inputPassword";
36
38
  readonly inputSearch: "inputSearch";
@@ -67,6 +69,7 @@ type JsonFormBuiltInComponentPropsMap = {
67
69
  checkboxGroup: CheckboxGroupInstance['$props'];
68
70
  datePicker: DatePickerInstance['$props'];
69
71
  input: InputInstance['$props'];
72
+ inputMask: InputMaskInstance['$props'];
70
73
  inputNumber: InputNumberInstance['$props'];
71
74
  inputPassword: InputPasswordInstance['$props'];
72
75
  inputSearch: InputSearchInstance['$props'];
@@ -94,6 +97,7 @@ type JsonFormBuiltInComponentEventsMap = {
94
97
  checkboxGroup: CheckboxGroupInstance['$emit'];
95
98
  datePicker: DatePickerInstance['$emit'];
96
99
  input: InputInstance['$emit'];
100
+ inputMask: InputMaskInstance['$emit'];
97
101
  inputNumber: InputNumberInstance['$emit'];
98
102
  inputPassword: InputPasswordInstance['$emit'];
99
103
  inputSearch: InputSearchInstance['$emit'];
@@ -11,6 +11,7 @@ var JSON_FORM_COMPONENT_TYPES = {
11
11
  checkboxGroup: "checkboxGroup",
12
12
  datePicker: "datePicker",
13
13
  input: "input",
14
+ inputMask: "inputMask",
14
15
  inputNumber: "inputNumber",
15
16
  inputPassword: "inputPassword",
16
17
  inputSearch: "inputSearch",
@@ -15,6 +15,7 @@ import { JSON_FORM_COMPONENT_TYPES } from "./types.js";
15
15
  import Cascader from "../cascader/index.js";
16
16
  import range_picker_default from "../date-picker/range-picker.js";
17
17
  import DatePicker from "../date-picker/index.js";
18
+ import InputMask from "../input-mask/index.js";
18
19
  import Textarea from "../textarea/index.js";
19
20
  import Mention from "../mention/index.js";
20
21
  import Rate from "../rate/index.js";
@@ -31,6 +32,7 @@ var STRETCH_COMPONENT_TYPES = /* @__PURE__ */ new Set([
31
32
  JSON_FORM_COMPONENT_TYPES.cascader,
32
33
  JSON_FORM_COMPONENT_TYPES.datePicker,
33
34
  JSON_FORM_COMPONENT_TYPES.input,
35
+ JSON_FORM_COMPONENT_TYPES.inputMask,
34
36
  JSON_FORM_COMPONENT_TYPES.inputNumber,
35
37
  JSON_FORM_COMPONENT_TYPES.inputPassword,
36
38
  JSON_FORM_COMPONENT_TYPES.inputSearch,
@@ -50,6 +52,7 @@ var jsonFormBuiltInComponents = {
50
52
  checkboxGroup: checkbox_group_default,
51
53
  datePicker: DatePicker,
52
54
  input: Input,
55
+ inputMask: InputMask,
53
56
  inputNumber: InputNumber,
54
57
  inputPassword: input_password_default,
55
58
  inputSearch: input_search_default,
package/es/sd-vue.js CHANGED
@@ -56,6 +56,7 @@ import week_picker_default from "./date-picker/pickers/week-picker.js";
56
56
  import year_picker_default from "./date-picker/pickers/year-picker.js";
57
57
  import range_picker_default from "./date-picker/range-picker.js";
58
58
  import DatePicker from "./date-picker/index.js";
59
+ import InputMask from "./input-mask/index.js";
59
60
  import Textarea from "./textarea/index.js";
60
61
  import Mention from "./mention/index.js";
61
62
  import Rate from "./rate/index.js";
@@ -105,7 +106,6 @@ import preview_group_default from "./image/preview-group.js";
105
106
  import Image from "./image/index.js";
106
107
  import FilePreviewer from "./file-previewer/index.js";
107
108
  import Icon from "./icon-component/index.js";
108
- import InputMask from "./input-mask/index.js";
109
109
  import KvList from "./kv-list/index.js";
110
110
  import content_default from "./layout/content.js";
111
111
  import footer_default from "./layout/footer.js";
@@ -6,6 +6,7 @@ export interface UploadContext {
6
6
  iconCls?: string;
7
7
  customIcon?: CustomIcon;
8
8
  showRemoveButton?: boolean;
9
+ showStartButton?: boolean;
9
10
  showRetryButton?: boolean;
10
11
  showCancelButton?: boolean;
11
12
  showPreviewButton?: boolean;
@@ -62,6 +62,10 @@ declare const Upload: {
62
62
  type: BooleanConstructor;
63
63
  default: boolean;
64
64
  };
65
+ showStartButton: {
66
+ type: BooleanConstructor;
67
+ default: boolean;
68
+ };
65
69
  showRetryButton: {
66
70
  type: BooleanConstructor;
67
71
  default: boolean;
@@ -155,6 +159,7 @@ declare const Upload: {
155
159
  autoUpload: boolean;
156
160
  showFileList: boolean;
157
161
  showRemoveButton: boolean;
162
+ showStartButton: boolean;
158
163
  showRetryButton: boolean;
159
164
  showCancelButton: boolean;
160
165
  showUploadButton: boolean | {
@@ -231,6 +236,10 @@ declare const Upload: {
231
236
  type: BooleanConstructor;
232
237
  default: boolean;
233
238
  };
239
+ showStartButton: {
240
+ type: BooleanConstructor;
241
+ default: boolean;
242
+ };
234
243
  showRetryButton: {
235
244
  type: BooleanConstructor;
236
245
  default: boolean;
@@ -316,6 +325,7 @@ declare const Upload: {
316
325
  autoUpload: boolean;
317
326
  showFileList: boolean;
318
327
  showRemoveButton: boolean;
328
+ showStartButton: boolean;
319
329
  showRetryButton: boolean;
320
330
  showCancelButton: boolean;
321
331
  showUploadButton: boolean | {
@@ -389,6 +399,10 @@ declare const Upload: {
389
399
  type: BooleanConstructor;
390
400
  default: boolean;
391
401
  };
402
+ showStartButton: {
403
+ type: BooleanConstructor;
404
+ default: boolean;
405
+ };
392
406
  showRetryButton: {
393
407
  type: BooleanConstructor;
394
408
  default: boolean;
@@ -482,6 +496,7 @@ declare const Upload: {
482
496
  autoUpload: boolean;
483
497
  showFileList: boolean;
484
498
  showRemoveButton: boolean;
499
+ showStartButton: boolean;
485
500
  showRetryButton: boolean;
486
501
  showCancelButton: boolean;
487
502
  showUploadButton: boolean | {
@@ -16,7 +16,7 @@
16
16
  /******** radius *******/
17
17
  /********* icon hover *********/
18
18
  .sd-upload {
19
- display: inline-block;
19
+ display: block;
20
20
  max-width: 100%;
21
21
  cursor: pointer;
22
22
  }
@@ -5,7 +5,7 @@
5
5
  $upload-prefix-cls: string.unquote('#{theme.$prefix}-upload');
6
6
 
7
7
  .#{$upload-prefix-cls} {
8
- display: inline-block;
8
+ display: block;
9
9
  max-width: 100%;
10
10
  cursor: pointer;
11
11
 
@@ -6,6 +6,7 @@ import IconImageClose from "../icon/icon-image-close/index.js";
6
6
  import IconDelete from "../icon/icon-delete/index.js";
7
7
  import { uploadInjectionKey } from "./context.js";
8
8
  import IconUpload from "../icon/icon-upload/index.js";
9
+ import IconPlayArrowFill from "../icon/icon-play-arrow-fill/index.js";
9
10
  import upload_progress_default from "./upload-progress.js";
10
11
  import { Fragment, computed, createVNode, defineComponent, inject, mergeProps } from "vue";
11
12
  //#region components/upload/upload-picture-item.tsx
@@ -33,7 +34,7 @@ var upload_picture_item_default = /* @__PURE__ */ defineComponent({
33
34
  }
34
35
  };
35
36
  const renderCard = () => {
36
- var _uploadCtx$slots$imag, _uploadCtx$slots, _uploadCtx$slots$imag2, _ref, _uploadCtx$slots$erro, _uploadCtx$slots2, _uploadCtx$slots2$err, _uploadCtx$customIcon, _uploadCtx$customIcon2, _ref2, _uploadCtx$slots$prev, _uploadCtx$slots3, _uploadCtx$slots3$pre, _uploadCtx$customIcon3, _uploadCtx$customIcon4, _ref3, _uploadCtx$slots$retr, _uploadCtx$slots4, _uploadCtx$slots4$ret, _uploadCtx$customIcon5, _uploadCtx$customIcon6, _ref4, _uploadCtx$slots$remo, _uploadCtx$slots5, _uploadCtx$slots5$rem, _uploadCtx$customIcon7, _uploadCtx$customIcon8, _uploadCtx$slots6, _uploadCtx$slots6$ext;
37
+ var _uploadCtx$slots$imag, _uploadCtx$slots, _uploadCtx$slots$imag2, _ref, _uploadCtx$slots$erro, _uploadCtx$slots2, _uploadCtx$slots2$err, _uploadCtx$customIcon, _uploadCtx$customIcon2, _ref2, _uploadCtx$slots$prev, _uploadCtx$slots3, _uploadCtx$slots3$pre, _uploadCtx$customIcon3, _uploadCtx$customIcon4, _ref3, _uploadCtx$slots$star, _uploadCtx$slots4, _uploadCtx$slots4$sta, _uploadCtx$customIcon5, _uploadCtx$customIcon6, _ref4, _uploadCtx$slots$retr, _uploadCtx$slots5, _uploadCtx$slots5$ret, _uploadCtx$customIcon7, _uploadCtx$customIcon8, _ref5, _uploadCtx$slots$remo, _uploadCtx$slots6, _uploadCtx$slots6$rem, _uploadCtx$customIcon9, _uploadCtx$customIcon10, _uploadCtx$slots7, _uploadCtx$slots7$ext;
37
38
  if (props.file.status === "uploading") return createVNode(upload_progress_default, {
38
39
  "file": props.file,
39
40
  "listType": "picture-card"
@@ -41,7 +42,7 @@ var upload_picture_item_default = /* @__PURE__ */ defineComponent({
41
42
  return createVNode(Fragment, null, [(_uploadCtx$slots$imag = uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots$imag2 = (_uploadCtx$slots = uploadCtx.slots).image) === null || _uploadCtx$slots$imag2 === void 0 ? void 0 : _uploadCtx$slots$imag2.call(_uploadCtx$slots, { fileItem: props.file })) !== null && _uploadCtx$slots$imag !== void 0 ? _uploadCtx$slots$imag : createVNode("img", mergeProps({
42
43
  "src": props.file.url,
43
44
  "alt": props.file.name
44
- }, (uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.imageLoading) ? { loading: uploadCtx.imageLoading } : void 0), null), createVNode("div", { "class": `${itemCls}-mask` }, [props.file.status === "error" && (uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.showCancelButton) && createVNode("div", { "class": `${itemCls}-error-tip` }, [createVNode("span", { "class": [uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls, `${uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls}-error`] }, [(_ref = (_uploadCtx$slots$erro = uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots2$err = (_uploadCtx$slots2 = uploadCtx.slots)["error-icon"]) === null || _uploadCtx$slots2$err === void 0 ? void 0 : _uploadCtx$slots2$err.call(_uploadCtx$slots2)) !== null && _uploadCtx$slots$erro !== void 0 ? _uploadCtx$slots$erro : uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$customIcon = uploadCtx.customIcon) === null || _uploadCtx$customIcon === void 0 || (_uploadCtx$customIcon2 = _uploadCtx$customIcon.errorIcon) === null || _uploadCtx$customIcon2 === void 0 ? void 0 : _uploadCtx$customIcon2.call(_uploadCtx$customIcon)) !== null && _ref !== void 0 ? _ref : createVNode(IconImageClose, null, null)])]), createVNode("div", { "class": `${itemCls}-operation` }, [
45
+ }, (uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.imageLoading) ? { loading: uploadCtx.imageLoading } : void 0), null), createVNode("div", { "class": `${itemCls}-mask` }, [props.file.status === "error" && createVNode("div", { "class": `${itemCls}-error-tip` }, [createVNode("span", { "class": [uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls, `${uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls}-error`] }, [(_ref = (_uploadCtx$slots$erro = uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots2$err = (_uploadCtx$slots2 = uploadCtx.slots)["error-icon"]) === null || _uploadCtx$slots2$err === void 0 ? void 0 : _uploadCtx$slots2$err.call(_uploadCtx$slots2)) !== null && _uploadCtx$slots$erro !== void 0 ? _uploadCtx$slots$erro : uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$customIcon = uploadCtx.customIcon) === null || _uploadCtx$customIcon === void 0 || (_uploadCtx$customIcon2 = _uploadCtx$customIcon.errorIcon) === null || _uploadCtx$customIcon2 === void 0 ? void 0 : _uploadCtx$customIcon2.call(_uploadCtx$customIcon)) !== null && _ref !== void 0 ? _ref : createVNode(IconImageClose, null, null)])]), createVNode("div", { "class": `${itemCls}-operation` }, [
45
46
  props.file.status !== "error" && (uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.showPreviewButton) && createVNode("span", {
46
47
  "class": [uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls, `${uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls}-preview`],
47
48
  "role": "button",
@@ -50,14 +51,22 @@ var upload_picture_item_default = /* @__PURE__ */ defineComponent({
50
51
  "onClick": () => uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.onPreview(props.file),
51
52
  "onKeydown": onActionKeydown(() => uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.onPreview(props.file))
52
53
  }, [(_ref2 = (_uploadCtx$slots$prev = uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots3$pre = (_uploadCtx$slots3 = uploadCtx.slots)["preview-icon"]) === null || _uploadCtx$slots3$pre === void 0 ? void 0 : _uploadCtx$slots3$pre.call(_uploadCtx$slots3)) !== null && _uploadCtx$slots$prev !== void 0 ? _uploadCtx$slots$prev : uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$customIcon3 = uploadCtx.customIcon) === null || _uploadCtx$customIcon3 === void 0 || (_uploadCtx$customIcon4 = _uploadCtx$customIcon3.previewIcon) === null || _uploadCtx$customIcon4 === void 0 ? void 0 : _uploadCtx$customIcon4.call(_uploadCtx$customIcon3)) !== null && _ref2 !== void 0 ? _ref2 : createVNode(IconEye, null, null)]),
53
- ["init", "error"].includes(props.file.status) && (uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.showRetryButton) && createVNode("span", {
54
+ props.file.status === "init" && (uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.showStartButton) && createVNode("span", {
55
+ "class": [uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls, `${uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls}-start`],
56
+ "role": "button",
57
+ "tabindex": "0",
58
+ "aria-label": t("upload.start"),
59
+ "onClick": () => uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.onUpload(props.file),
60
+ "onKeydown": onActionKeydown(() => uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.onUpload(props.file))
61
+ }, [(_ref3 = (_uploadCtx$slots$star = uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots4$sta = (_uploadCtx$slots4 = uploadCtx.slots)["start-icon"]) === null || _uploadCtx$slots4$sta === void 0 ? void 0 : _uploadCtx$slots4$sta.call(_uploadCtx$slots4)) !== null && _uploadCtx$slots$star !== void 0 ? _uploadCtx$slots$star : uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$customIcon5 = uploadCtx.customIcon) === null || _uploadCtx$customIcon5 === void 0 || (_uploadCtx$customIcon6 = _uploadCtx$customIcon5.startIcon) === null || _uploadCtx$customIcon6 === void 0 ? void 0 : _uploadCtx$customIcon6.call(_uploadCtx$customIcon5)) !== null && _ref3 !== void 0 ? _ref3 : createVNode(IconPlayArrowFill, null, null)]),
62
+ props.file.status === "error" && (uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.showRetryButton) && createVNode("span", {
54
63
  "class": [uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls, `${uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls}-upload`],
55
64
  "role": "button",
56
65
  "tabindex": "0",
57
66
  "aria-label": t("a11y.retryUpload"),
58
67
  "onClick": () => uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.onUpload(props.file),
59
68
  "onKeydown": onActionKeydown(() => uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.onUpload(props.file))
60
- }, [(_ref3 = (_uploadCtx$slots$retr = uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots4$ret = (_uploadCtx$slots4 = uploadCtx.slots)["retry-icon"]) === null || _uploadCtx$slots4$ret === void 0 ? void 0 : _uploadCtx$slots4$ret.call(_uploadCtx$slots4)) !== null && _uploadCtx$slots$retr !== void 0 ? _uploadCtx$slots$retr : uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$customIcon5 = uploadCtx.customIcon) === null || _uploadCtx$customIcon5 === void 0 || (_uploadCtx$customIcon6 = _uploadCtx$customIcon5.retryIcon) === null || _uploadCtx$customIcon6 === void 0 ? void 0 : _uploadCtx$customIcon6.call(_uploadCtx$customIcon5)) !== null && _ref3 !== void 0 ? _ref3 : createVNode(IconUpload, null, null)]),
69
+ }, [(_ref4 = (_uploadCtx$slots$retr = uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots5$ret = (_uploadCtx$slots5 = uploadCtx.slots)["retry-icon"]) === null || _uploadCtx$slots5$ret === void 0 ? void 0 : _uploadCtx$slots5$ret.call(_uploadCtx$slots5)) !== null && _uploadCtx$slots$retr !== void 0 ? _uploadCtx$slots$retr : uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$customIcon7 = uploadCtx.customIcon) === null || _uploadCtx$customIcon7 === void 0 || (_uploadCtx$customIcon8 = _uploadCtx$customIcon7.retryIcon) === null || _uploadCtx$customIcon8 === void 0 ? void 0 : _uploadCtx$customIcon8.call(_uploadCtx$customIcon7)) !== null && _ref4 !== void 0 ? _ref4 : createVNode(IconUpload, null, null)]),
61
70
  !(uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.disabled) && (uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.showRemoveButton) && createVNode("span", {
62
71
  "class": [uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls, `${uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls}-remove`],
63
72
  "role": "button",
@@ -68,8 +77,8 @@ var upload_picture_item_default = /* @__PURE__ */ defineComponent({
68
77
  var _uploadCtx$onRemove;
69
78
  return uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$onRemove = uploadCtx.onRemove) === null || _uploadCtx$onRemove === void 0 ? void 0 : _uploadCtx$onRemove.call(uploadCtx, props.file);
70
79
  })
71
- }, [(_ref4 = (_uploadCtx$slots$remo = uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots5$rem = (_uploadCtx$slots5 = uploadCtx.slots)["remove-icon"]) === null || _uploadCtx$slots5$rem === void 0 ? void 0 : _uploadCtx$slots5$rem.call(_uploadCtx$slots5)) !== null && _uploadCtx$slots$remo !== void 0 ? _uploadCtx$slots$remo : uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$customIcon7 = uploadCtx.customIcon) === null || _uploadCtx$customIcon7 === void 0 || (_uploadCtx$customIcon8 = _uploadCtx$customIcon7.removeIcon) === null || _uploadCtx$customIcon8 === void 0 ? void 0 : _uploadCtx$customIcon8.call(_uploadCtx$customIcon7)) !== null && _ref4 !== void 0 ? _ref4 : createVNode(IconDelete, null, null)]),
72
- uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots6$ext = (_uploadCtx$slots6 = uploadCtx.slots)["extra-button"]) === null || _uploadCtx$slots6$ext === void 0 ? void 0 : _uploadCtx$slots6$ext.call(_uploadCtx$slots6, props.file)
80
+ }, [(_ref5 = (_uploadCtx$slots$remo = uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots6$rem = (_uploadCtx$slots6 = uploadCtx.slots)["remove-icon"]) === null || _uploadCtx$slots6$rem === void 0 ? void 0 : _uploadCtx$slots6$rem.call(_uploadCtx$slots6)) !== null && _uploadCtx$slots$remo !== void 0 ? _uploadCtx$slots$remo : uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$customIcon9 = uploadCtx.customIcon) === null || _uploadCtx$customIcon9 === void 0 || (_uploadCtx$customIcon10 = _uploadCtx$customIcon9.removeIcon) === null || _uploadCtx$customIcon10 === void 0 ? void 0 : _uploadCtx$customIcon10.call(_uploadCtx$customIcon9)) !== null && _ref5 !== void 0 ? _ref5 : createVNode(IconDelete, null, null)]),
81
+ uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots7$ext = (_uploadCtx$slots7 = uploadCtx.slots)["extra-button"]) === null || _uploadCtx$slots7$ext === void 0 ? void 0 : _uploadCtx$slots7$ext.call(_uploadCtx$slots7, props.file)
73
82
  ])])]);
74
83
  };
75
84
  return () => createVNode("span", { "class": cls.value }, [renderCard()]);
@@ -28,29 +28,33 @@ var upload_progress_default = /* @__PURE__ */ defineComponent({
28
28
  const uploadCtx = inject(uploadInjectionKey, void 0);
29
29
  const renderIcon = () => {
30
30
  if (props.file.status === "error") {
31
- var _uploadCtx$slots$retr, _uploadCtx$slots, _uploadCtx$slots$retr2, _uploadCtx$customIcon, _uploadCtx$customIcon2;
31
+ var _ref, _uploadCtx$slots$retr, _uploadCtx$slots$retr2, _uploadCtx$slots, _uploadCtx$customIcon, _uploadCtx$customIcon2;
32
+ if (!(uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.showRetryButton)) return null;
32
33
  return createVNode("span", {
33
34
  "class": [uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls, `${uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls}-upload`],
34
35
  "onClick": () => uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.onUpload(props.file)
35
- }, [(uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.showRetryButton) && ((_uploadCtx$slots$retr = uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots$retr2 = (_uploadCtx$slots = uploadCtx.slots)["retry-icon"]) === null || _uploadCtx$slots$retr2 === void 0 ? void 0 : _uploadCtx$slots$retr2.call(_uploadCtx$slots)) !== null && _uploadCtx$slots$retr !== void 0 ? _uploadCtx$slots$retr : uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$customIcon = uploadCtx.customIcon) === null || _uploadCtx$customIcon === void 0 || (_uploadCtx$customIcon2 = _uploadCtx$customIcon.retryIcon) === null || _uploadCtx$customIcon2 === void 0 ? void 0 : _uploadCtx$customIcon2.call(_uploadCtx$customIcon)) || props.listType === "picture-card" ? createVNode(IconUpload, null, null) : t("upload.retry")]);
36
+ }, [(_ref = (_uploadCtx$slots$retr = (_uploadCtx$slots$retr2 = (_uploadCtx$slots = uploadCtx.slots)["retry-icon"]) === null || _uploadCtx$slots$retr2 === void 0 ? void 0 : _uploadCtx$slots$retr2.call(_uploadCtx$slots)) !== null && _uploadCtx$slots$retr !== void 0 ? _uploadCtx$slots$retr : (_uploadCtx$customIcon = uploadCtx.customIcon) === null || _uploadCtx$customIcon === void 0 || (_uploadCtx$customIcon2 = _uploadCtx$customIcon.retryIcon) === null || _uploadCtx$customIcon2 === void 0 ? void 0 : _uploadCtx$customIcon2.call(_uploadCtx$customIcon)) !== null && _ref !== void 0 ? _ref : props.listType === "picture-card" ? createVNode(IconUpload, null, null) : t("upload.retry")]);
36
37
  }
37
38
  if (props.file.status === "done") {
38
- var _ref, _uploadCtx$slots$succ, _uploadCtx$slots2, _uploadCtx$slots2$suc, _uploadCtx$customIcon3, _uploadCtx$customIcon4;
39
- return createVNode("span", { "class": [uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls, `${uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls}-success`] }, [(_ref = (_uploadCtx$slots$succ = uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots2$suc = (_uploadCtx$slots2 = uploadCtx.slots)["success-icon"]) === null || _uploadCtx$slots2$suc === void 0 ? void 0 : _uploadCtx$slots2$suc.call(_uploadCtx$slots2)) !== null && _uploadCtx$slots$succ !== void 0 ? _uploadCtx$slots$succ : uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$customIcon3 = uploadCtx.customIcon) === null || _uploadCtx$customIcon3 === void 0 || (_uploadCtx$customIcon4 = _uploadCtx$customIcon3.successIcon) === null || _uploadCtx$customIcon4 === void 0 ? void 0 : _uploadCtx$customIcon4.call(_uploadCtx$customIcon3)) !== null && _ref !== void 0 ? _ref : createVNode(IconCheck, null, null)]);
39
+ var _ref2, _uploadCtx$slots$succ, _uploadCtx$slots2, _uploadCtx$slots2$suc, _uploadCtx$customIcon3, _uploadCtx$customIcon4;
40
+ return createVNode("span", { "class": [uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls, `${uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls}-success`] }, [(_ref2 = (_uploadCtx$slots$succ = uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots2$suc = (_uploadCtx$slots2 = uploadCtx.slots)["success-icon"]) === null || _uploadCtx$slots2$suc === void 0 ? void 0 : _uploadCtx$slots2$suc.call(_uploadCtx$slots2)) !== null && _uploadCtx$slots$succ !== void 0 ? _uploadCtx$slots$succ : uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$customIcon3 = uploadCtx.customIcon) === null || _uploadCtx$customIcon3 === void 0 || (_uploadCtx$customIcon4 = _uploadCtx$customIcon3.successIcon) === null || _uploadCtx$customIcon4 === void 0 ? void 0 : _uploadCtx$customIcon4.call(_uploadCtx$customIcon3)) !== null && _ref2 !== void 0 ? _ref2 : createVNode(IconCheck, null, null)]);
41
+ }
42
+ if (props.file.status === "init") {
43
+ if (!(uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.showStartButton)) return null;
44
+ return createVNode(Tooltip, { "content": t("upload.start") }, { default: () => {
45
+ var _ref3, _uploadCtx$slots$star, _uploadCtx$slots3, _uploadCtx$slots3$sta, _uploadCtx$customIcon5, _uploadCtx$customIcon6;
46
+ return [createVNode("span", {
47
+ "class": [uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls, `${uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls}-start`],
48
+ "onClick": () => uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.onUpload(props.file)
49
+ }, [(_ref3 = (_uploadCtx$slots$star = uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots3$sta = (_uploadCtx$slots3 = uploadCtx.slots)["start-icon"]) === null || _uploadCtx$slots3$sta === void 0 ? void 0 : _uploadCtx$slots3$sta.call(_uploadCtx$slots3)) !== null && _uploadCtx$slots$star !== void 0 ? _uploadCtx$slots$star : uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$customIcon5 = uploadCtx.customIcon) === null || _uploadCtx$customIcon5 === void 0 || (_uploadCtx$customIcon6 = _uploadCtx$customIcon5.startIcon) === null || _uploadCtx$customIcon6 === void 0 ? void 0 : _uploadCtx$customIcon6.call(_uploadCtx$customIcon5)) !== null && _ref3 !== void 0 ? _ref3 : createVNode(IconPlayArrowFill, null, null)])];
50
+ } });
40
51
  }
41
- if (props.file.status === "init") return createVNode(Tooltip, { "content": t("upload.start") }, { default: () => {
42
- var _ref2, _uploadCtx$slots$star, _uploadCtx$slots3, _uploadCtx$slots3$sta, _uploadCtx$customIcon5, _uploadCtx$customIcon6;
43
- return [createVNode("span", {
44
- "class": [uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls, `${uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls}-start`],
45
- "onClick": () => uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.onUpload(props.file)
46
- }, [(_ref2 = (_uploadCtx$slots$star = uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots3$sta = (_uploadCtx$slots3 = uploadCtx.slots)["start-icon"]) === null || _uploadCtx$slots3$sta === void 0 ? void 0 : _uploadCtx$slots3$sta.call(_uploadCtx$slots3)) !== null && _uploadCtx$slots$star !== void 0 ? _uploadCtx$slots$star : uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$customIcon5 = uploadCtx.customIcon) === null || _uploadCtx$customIcon5 === void 0 || (_uploadCtx$customIcon6 = _uploadCtx$customIcon5.startIcon) === null || _uploadCtx$customIcon6 === void 0 ? void 0 : _uploadCtx$customIcon6.call(_uploadCtx$customIcon5)) !== null && _ref2 !== void 0 ? _ref2 : createVNode(IconPlayArrowFill, null, null)])];
47
- } });
48
52
  return (uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.showCancelButton) && createVNode(Tooltip, { "content": t("upload.cancel") }, { default: () => {
49
- var _ref3, _uploadCtx$slots$canc, _uploadCtx$slots4, _uploadCtx$slots4$can, _uploadCtx$customIcon7, _uploadCtx$customIcon8;
53
+ var _ref4, _uploadCtx$slots$canc, _uploadCtx$slots4, _uploadCtx$slots4$can, _uploadCtx$customIcon7, _uploadCtx$customIcon8;
50
54
  return [createVNode("span", {
51
55
  "class": [uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls, `${uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.iconCls}-cancel`],
52
56
  "onClick": () => uploadCtx === null || uploadCtx === void 0 ? void 0 : uploadCtx.onAbort(props.file)
53
- }, [(_ref3 = (_uploadCtx$slots$canc = uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots4$can = (_uploadCtx$slots4 = uploadCtx.slots)["cancel-icon"]) === null || _uploadCtx$slots4$can === void 0 ? void 0 : _uploadCtx$slots4$can.call(_uploadCtx$slots4)) !== null && _uploadCtx$slots$canc !== void 0 ? _uploadCtx$slots$canc : uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$customIcon7 = uploadCtx.customIcon) === null || _uploadCtx$customIcon7 === void 0 || (_uploadCtx$customIcon8 = _uploadCtx$customIcon7.cancelIcon) === null || _uploadCtx$customIcon8 === void 0 ? void 0 : _uploadCtx$customIcon8.call(_uploadCtx$customIcon7)) !== null && _ref3 !== void 0 ? _ref3 : createVNode(IconPause, null, null)])];
57
+ }, [(_ref4 = (_uploadCtx$slots$canc = uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$slots4$can = (_uploadCtx$slots4 = uploadCtx.slots)["cancel-icon"]) === null || _uploadCtx$slots4$can === void 0 ? void 0 : _uploadCtx$slots4$can.call(_uploadCtx$slots4)) !== null && _uploadCtx$slots$canc !== void 0 ? _uploadCtx$slots$canc : uploadCtx === null || uploadCtx === void 0 || (_uploadCtx$customIcon7 = uploadCtx.customIcon) === null || _uploadCtx$customIcon7 === void 0 || (_uploadCtx$customIcon8 = _uploadCtx$customIcon7.cancelIcon) === null || _uploadCtx$customIcon8 === void 0 ? void 0 : _uploadCtx$customIcon8.call(_uploadCtx$customIcon7)) !== null && _ref4 !== void 0 ? _ref4 : createVNode(IconPause, null, null)])];
54
58
  } });
55
59
  };
56
60
  const renderProgress = () => {
@@ -60,6 +60,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
60
60
  type: BooleanConstructor;
61
61
  default: boolean;
62
62
  };
63
+ showStartButton: {
64
+ type: BooleanConstructor;
65
+ default: boolean;
66
+ };
63
67
  showRetryButton: {
64
68
  type: BooleanConstructor;
65
69
  default: boolean;
@@ -192,6 +196,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
192
196
  type: BooleanConstructor;
193
197
  default: boolean;
194
198
  };
199
+ showStartButton: {
200
+ type: BooleanConstructor;
201
+ default: boolean;
202
+ };
195
203
  showRetryButton: {
196
204
  type: BooleanConstructor;
197
205
  default: boolean;
@@ -265,6 +273,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
265
273
  autoUpload: boolean;
266
274
  showFileList: boolean;
267
275
  showRemoveButton: boolean;
276
+ showStartButton: boolean;
268
277
  showRetryButton: boolean;
269
278
  showCancelButton: boolean;
270
279
  showUploadButton: boolean | {
@@ -139,6 +139,14 @@ var upload_default = /* @__PURE__ */ defineComponent({
139
139
  default: true
140
140
  },
141
141
  /**
142
+ * @zh 是否显示开始按钮
143
+ * @en Whether to display the start button
144
+ */
145
+ showStartButton: {
146
+ type: Boolean,
147
+ default: true
148
+ },
149
+ /**
142
150
  * @zh 是否显示重试按钮
143
151
  * @en Whether to display the retry button
144
152
  * @version 2.11.0
@@ -364,7 +372,7 @@ var upload_default = /* @__PURE__ */ defineComponent({
364
372
  * @version 2.43.0
365
373
  */
366
374
  setup(props, { emit, slots }) {
367
- const { fileList, disabled, listType, customIcon, showRetryButton, showCancelButton, showRemoveButton, showPreviewButton, imageLoading, download, showLink } = toRefs(props);
375
+ const { fileList, disabled, listType, customIcon, showStartButton, showRetryButton, showCancelButton, showRemoveButton, showPreviewButton, imageLoading, download, showLink } = toRefs(props);
368
376
  const prefixCls = getPrefixCls("upload");
369
377
  const { mergedDisabled, eventHandlers } = useFormItem({ disabled });
370
378
  const _fileList = ref([]);
@@ -545,6 +553,7 @@ var upload_default = /* @__PURE__ */ defineComponent({
545
553
  listType,
546
554
  iconCls: `${prefixCls}-icon`,
547
555
  showRemoveButton,
556
+ showStartButton,
548
557
  showRetryButton,
549
558
  showCancelButton,
550
559
  showPreviewButton,
@@ -4910,6 +4910,10 @@
4910
4910
  "description": "Whether to display the remove button",
4911
4911
  "type": "boolean"
4912
4912
  },
4913
+ "sd-upload/show-start-button": {
4914
+ "description": "Whether to display the start button",
4915
+ "type": "boolean"
4916
+ },
4913
4917
  "sd-upload/show-retry-button": {
4914
4918
  "description": "Whether to display the retry button",
4915
4919
  "type": "boolean"
@@ -1978,6 +1978,7 @@
1978
1978
  "auto-upload",
1979
1979
  "show-file-list",
1980
1980
  "show-remove-button",
1981
+ "show-start-button",
1981
1982
  "show-retry-button",
1982
1983
  "show-cancel-button",
1983
1984
  "show-upload-button",
@@ -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": "3.27.0",
5
+ "version": "3.29.0",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "types-syntax": "typescript",
@@ -11832,6 +11832,14 @@
11832
11832
  "kind": "expression"
11833
11833
  }
11834
11834
  },
11835
+ {
11836
+ "name": "show-start-button",
11837
+ "description": "Whether to display the start button",
11838
+ "value": {
11839
+ "type": "boolean",
11840
+ "kind": "expression"
11841
+ }
11842
+ },
11835
11843
  {
11836
11844
  "name": "show-retry-button",
11837
11845
  "description": "Whether to display the retry button",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdata/web-vue",
3
- "version": "3.28.0",
3
+ "version": "3.30.0",
4
4
  "description": "SD Design Vue: A Vue.js 3 UI Library",
5
5
  "keywords": [
6
6
  "sd",