qidian-vue-ui 1.3.2 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/components/config-provider/index.d.ts +3 -0
  2. package/dist/components/config-provider/types.d.ts +1 -0
  3. package/dist/components/config-provider/useConfig.d.ts +4 -0
  4. package/dist/components/form/item.css +2 -2
  5. package/dist/components/form/item.vue.mjs +1 -1
  6. package/dist/components/import-dialog/index.vue.d.ts +1 -1
  7. package/dist/components/import-dialog/index.vue.mjs +3 -1
  8. package/dist/components/multi-file-viewer/index.css +3 -0
  9. package/dist/components/multi-file-viewer/index.vue.mjs +77 -32
  10. package/dist/components/service-dialog-table-select/index.css +10 -10
  11. package/dist/components/service-dialog-table-select/index.vue.mjs +1 -1
  12. package/dist/components/service-dialog-table-select/index.vue2.mjs +1 -1
  13. package/dist/components/service-popup-table-select/index.vue.mjs +1 -1
  14. package/dist/components/service-popup-table-select/index.vue2.mjs +1 -1
  15. package/dist/components/service-popup-table-select/index2.css +7 -7
  16. package/dist/components/stream-markdown/previewers/index.d.ts +1 -0
  17. package/dist/components/stream-markdown/previewers/index.mjs +1 -1
  18. package/dist/components/upload/index.css +33 -33
  19. package/dist/components/upload/index.vue.mjs +1 -1
  20. package/dist/components/upload/index.vue2.mjs +3 -2
  21. package/dist/components/upload/types.d.ts +1 -1
  22. package/dist/locales/en-US.d.ts +1 -0
  23. package/dist/locales/en-US.mjs +2 -1
  24. package/dist/locales/zh-CN.d.ts +1 -0
  25. package/dist/locales/zh-CN.mjs +2 -1
  26. package/dist/locales/zh-TW.d.ts +1 -0
  27. package/dist/locales/zh-TW.mjs +2 -1
  28. package/package.json +2 -2
@@ -81,6 +81,7 @@ export declare const QdConfigProvider: import("vue").DefineComponent<{
81
81
  addText?: string;
82
82
  addConfirmText?: string;
83
83
  addCancelText?: string;
84
+ quoteText?: string;
84
85
  };
85
86
  importDialog?: {
86
87
  fileSupport?: [string, string];
@@ -209,6 +210,7 @@ export declare const QdConfigProvider: import("vue").DefineComponent<{
209
210
  addText?: string;
210
211
  addConfirmText?: string;
211
212
  addCancelText?: string;
213
+ quoteText?: string;
212
214
  };
213
215
  importDialog?: {
214
216
  fileSupport?: [string, string];
@@ -322,6 +324,7 @@ export declare const QdConfigProvider: import("vue").DefineComponent<{
322
324
  addText?: string;
323
325
  addConfirmText?: string;
324
326
  addCancelText?: string;
327
+ quoteText?: string;
325
328
  };
326
329
  importDialog?: {
327
330
  fileSupport?: [string, string];
@@ -96,6 +96,7 @@ export interface QdConfigProviderProps {
96
96
  addText?: string;
97
97
  addConfirmText?: string;
98
98
  addCancelText?: string;
99
+ quoteText?: string;
99
100
  };
100
101
  importDialog?: {
101
102
  fileSupport?: [string, string];
@@ -69,6 +69,7 @@ export declare function useConfig<T extends keyof NonNullable<QdConfigProviderPr
69
69
  addText?: string;
70
70
  addConfirmText?: string;
71
71
  addCancelText?: string;
72
+ quoteText?: string;
72
73
  };
73
74
  importDialog?: {
74
75
  fileSupport?: [string, string];
@@ -180,6 +181,7 @@ export declare function useConfig<T extends keyof NonNullable<QdConfigProviderPr
180
181
  addText?: string;
181
182
  addConfirmText?: string;
182
183
  addCancelText?: string;
184
+ quoteText?: string;
183
185
  };
184
186
  importDialog?: {
185
187
  fileSupport?: [string, string];
@@ -291,6 +293,7 @@ export declare function useConfig<T extends keyof NonNullable<QdConfigProviderPr
291
293
  addText?: string;
292
294
  addConfirmText?: string;
293
295
  addCancelText?: string;
296
+ quoteText?: string;
294
297
  };
295
298
  importDialog?: {
296
299
  fileSupport?: [string, string];
@@ -403,6 +406,7 @@ export declare function useConfig<T extends keyof NonNullable<QdConfigProviderPr
403
406
  addText?: string;
404
407
  addConfirmText?: string;
405
408
  addCancelText?: string;
409
+ quoteText?: string;
406
410
  };
407
411
  importDialog?: {
408
412
  fileSupport?: [string, string];
@@ -1,6 +1,6 @@
1
- .qd-form-item[data-v-ad6b610c] > .t-form__item > .t-form__controls > .t-form__controls-content > *:not(.t-switch) {
1
+ .qd-form-item[data-v-3e69dc20] > .t-form__item > .t-form__controls > .t-form__controls-content > *:not(.t-switch):not(.t-tag):not(.t-icon):not(.qd-file-icon) {
2
2
  width: 100%;
3
3
  }
4
- .qd-form-item__component[data-v-ad6b610c]:not(.t-switch) {
4
+ .qd-form-item__component[data-v-3e69dc20]:not(.t-switch):not(.t-tag):not(.t-icon):not(.qd-file-icon) {
5
5
  width: 100%;
6
6
  }
@@ -2,7 +2,7 @@ import './item.css'
2
2
  import _sfc_main from "./item.vue2.mjs";
3
3
  /* empty css */
4
4
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
5
- const QdFormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ad6b610c"]]);
5
+ const QdFormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3e69dc20"]]);
6
6
  export {
7
7
  QdFormItem as default
8
8
  };
@@ -8,7 +8,7 @@ declare const _default: import("vue").DefineComponent<QdImportDialogProps, {
8
8
  "onUpdate:visible"?: ((args_0: boolean | undefined) => any) | undefined;
9
9
  }>, {
10
10
  name: string;
11
- accept: string[];
11
+ accept: string[] | "*";
12
12
  method: "POST" | "GET" | "PUT" | "OPTIONS" | "PATCH" | "post" | "get" | "put" | "options" | "patch";
13
13
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
14
  export default _default;
@@ -66,13 +66,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
66
66
  wrapper,
67
67
  ...uploadOptions
68
68
  } = props;
69
+ const isAcceptUnlimited = accept === "*" || isEmpty(accept);
70
+ const reAccept = isAcceptUnlimited ? void 0 : accept;
69
71
  const reUploadOptions = {
70
72
  ...uploadOptions,
71
73
  listOssByIds: {
72
74
  service: void 0
73
75
  },
74
76
  accept,
75
- tips: tips || isEmpty(accept) ? tips : `${t("fileSupport")[0]} ${accept.join(",")} ${t("fileSupport")[1]}`
77
+ tips: tips || !reAccept ? tips : `${t("fileSupport")[0]} ${reAccept.join(",")} ${t("fileSupport")[1]}`
76
78
  };
77
79
  const qdDialogOptions = {
78
80
  width: "min(600px, 100%)",
@@ -29,3 +29,6 @@
29
29
  flex: 1 1 0;
30
30
  overflow: hidden;
31
31
  }
32
+ .qd-multi-file-viewer--image {
33
+ display: none;
34
+ }
@@ -1,10 +1,11 @@
1
1
  import './index.css'
2
- import { defineComponent, mergeDefaults, ref, computed, watch, createBlock, openBlock, resolveDynamicComponent, mergeProps, withCtx, createElementBlock, createVNode, createElementVNode, unref, Fragment, renderList, createTextVNode, toDisplayString, createCommentVNode, nextTick } from "vue";
3
- import { Menu, MenuItem, Empty } from "tdesign-vue-next";
2
+ import { defineComponent, mergeDefaults, ref, computed, watch, createBlock, openBlock, resolveDynamicComponent, mergeProps, withCtx, createElementBlock, Fragment, createVNode, createElementVNode, unref, renderList, createTextVNode, toDisplayString, createCommentVNode, nextTick } from "vue";
3
+ import { Menu, MenuItem, Empty, ImageViewer } from "tdesign-vue-next";
4
4
  import { useConfig } from "../config-provider/useConfig.mjs";
5
5
  import _sfc_main$1 from "../dialog/index.vue.mjs";
6
6
  /* empty css */
7
7
  import QdFileViewer from "../file-viewer/index.vue.mjs";
8
+ import { IMAGE_REGEXP } from "../upload/common.mjs";
8
9
  import { qdMultiFileViewerWrapperProps, qdMultiFileViewerProps } from "./props.mjs";
9
10
  import merge from "../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
10
11
  const _hoisted_1 = {
@@ -25,7 +26,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25
26
  const props = __props;
26
27
  const runtimeOverrides = ref({});
27
28
  const dialogRef = ref();
29
+ const imageViewerVisible = ref(false);
30
+ const imageViewerIndex = ref(0);
28
31
  const { t } = useConfig("multiFileViewer");
32
+ const { t: wrapperT } = useConfig("wrapper");
29
33
  const mergedProps = computed(() => ({
30
34
  ...props,
31
35
  ...runtimeOverrides.value
@@ -49,7 +53,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
49
53
  )
50
54
  };
51
55
  });
52
- const isDialog = computed(() => mergedProps.value.wrapper !== false);
56
+ const allFilesAreImages = computed(() => {
57
+ const files = mergedProps.value.files;
58
+ return !!files?.length && files.every((item) => isImage(item) && !!resolveImageViewerSource(item));
59
+ });
60
+ const imageViewerImages = computed(
61
+ () => (mergedProps.value.files ?? []).map((item) => resolveImageViewerSource(item) ?? "")
62
+ );
63
+ const imageViewerAttach = computed(() => {
64
+ const wrapper = mergedProps.value.wrapper === false ? void 0 : mergedProps.value.wrapper;
65
+ return wrapper?.attach ?? wrapperT("attach") ?? "body";
66
+ });
67
+ const isDialog = computed(() => mergedProps.value.wrapper !== false && !allFilesAreImages.value);
53
68
  const dialogProps = computed(() => {
54
69
  const wrapper = mergedProps.value.wrapper === false ? void 0 : mergedProps.value.wrapper;
55
70
  return {
@@ -61,6 +76,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
61
76
  });
62
77
  const wrapperTag = computed(() => isDialog.value ? _sfc_main$1 : "div");
63
78
  const wrapperBindings = computed(() => isDialog.value ? dialogProps.value : {});
79
+ function resolveFileType(item) {
80
+ const file = item.file;
81
+ if (file && "type" in file && file.type) return file.type;
82
+ if (file && "name" in file && file.name) return file.name;
83
+ return item.src || item.name || "";
84
+ }
85
+ function isImage(item) {
86
+ return IMAGE_REGEXP.test(resolveFileType(item));
87
+ }
88
+ function resolveImageViewerSource(item) {
89
+ if (typeof File !== "undefined" && item.file instanceof File) return item.file;
90
+ if (item.src) return item.src;
91
+ return void 0;
92
+ }
64
93
  function normalizeIndex(index, files) {
65
94
  if (!files?.length) return 0;
66
95
  if (index === void 0 || index < 0 || index >= files.length) return 0;
@@ -88,10 +117,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
88
117
  function show(override) {
89
118
  runtimeOverrides.value = override ?? {};
90
119
  activeIndex.value = normalizeIndex(mergedProps.value.index, mergedProps.value.files);
120
+ if (allFilesAreImages.value) {
121
+ imageViewerIndex.value = activeIndex.value;
122
+ imageViewerVisible.value = true;
123
+ return;
124
+ }
91
125
  if (!isDialog.value) return;
92
126
  nextTick(() => dialogRef.value?.show());
93
127
  }
94
128
  function hide() {
129
+ if (imageViewerVisible.value) imageViewerVisible.value = false;
95
130
  if (!isDialog.value) return;
96
131
  dialogRef.value?.hide();
97
132
  }
@@ -104,42 +139,52 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
104
139
  __expose({ show, hide });
105
140
  return (_ctx, _cache) => {
106
141
  return openBlock(), createBlock(resolveDynamicComponent(wrapperTag.value), mergeProps(wrapperBindings.value, {
107
- class: "qd-multi-file-viewer",
142
+ class: ["qd-multi-file-viewer", allFilesAreImages.value ? "qd-multi-file-viewer--image" : ""],
108
143
  ref_key: "dialogRef",
109
144
  ref: dialogRef
110
145
  }), {
111
146
  default: withCtx(() => [
112
- mergedProps.value.files?.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
113
- createVNode(unref(Menu), {
114
- value: activeIndex.value,
115
- class: "qd-multi-file-viewer__menu",
116
- onChange: handleMenuChange
117
- }, {
118
- default: withCtx(() => [
119
- (openBlock(true), createElementBlock(Fragment, null, renderList(mergedProps.value.files, (item, index) => {
120
- return openBlock(), createBlock(unref(MenuItem), {
121
- key: index,
122
- value: index
123
- }, {
124
- default: withCtx(() => [
125
- createTextVNode(toDisplayString(deriveName(item, index)), 1)
126
- ]),
127
- _: 2
128
- }, 1032, ["value"]);
129
- }), 128))
130
- ]),
131
- _: 1
132
- }, 8, ["value"]),
133
- createElementVNode("div", _hoisted_2, [
134
- activeViewerProps.value ? (openBlock(), createBlock(QdFileViewer, mergeProps({ key: activeIndex.value }, activeViewerProps.value), null, 16)) : createCommentVNode("", true)
135
- ])
136
- ])) : (openBlock(), createBlock(unref(Empty), {
147
+ !allFilesAreImages.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
148
+ mergedProps.value.files?.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
149
+ createVNode(unref(Menu), {
150
+ value: activeIndex.value,
151
+ class: "qd-multi-file-viewer__menu",
152
+ onChange: handleMenuChange
153
+ }, {
154
+ default: withCtx(() => [
155
+ (openBlock(true), createElementBlock(Fragment, null, renderList(mergedProps.value.files, (item, index) => {
156
+ return openBlock(), createBlock(unref(MenuItem), {
157
+ key: index,
158
+ value: index
159
+ }, {
160
+ default: withCtx(() => [
161
+ createTextVNode(toDisplayString(deriveName(item, index)), 1)
162
+ ]),
163
+ _: 2
164
+ }, 1032, ["value"]);
165
+ }), 128))
166
+ ]),
167
+ _: 1
168
+ }, 8, ["value"]),
169
+ createElementVNode("div", _hoisted_2, [
170
+ activeViewerProps.value ? (openBlock(), createBlock(QdFileViewer, mergeProps({ key: activeIndex.value }, activeViewerProps.value), null, 16)) : createCommentVNode("", true)
171
+ ])
172
+ ])) : (openBlock(), createBlock(unref(Empty), {
173
+ key: 1,
174
+ title: unref(t)("emptyText")
175
+ }, null, 8, ["title"]))
176
+ ], 64)) : (openBlock(), createBlock(unref(ImageViewer), {
137
177
  key: 1,
138
- title: unref(t)("emptyText")
139
- }, null, 8, ["title"]))
178
+ visible: imageViewerVisible.value,
179
+ "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => imageViewerVisible.value = $event),
180
+ index: imageViewerIndex.value,
181
+ "onUpdate:index": _cache[1] || (_cache[1] = ($event) => imageViewerIndex.value = $event),
182
+ images: imageViewerImages.value,
183
+ attach: imageViewerAttach.value
184
+ }, null, 8, ["visible", "index", "images", "attach"]))
140
185
  ]),
141
186
  _: 1
142
- }, 16);
187
+ }, 16, ["class"]);
143
188
  };
144
189
  }
145
190
  });
@@ -1,31 +1,31 @@
1
- .qd-dialog-table-select[data-v-814b91a7] {
1
+ .qd-dialog-table-select[data-v-cc0a2b83] {
2
2
  width: 100%;
3
3
  }
4
- .qd-dialog-table-select__trigger[data-v-814b91a7] {
4
+ .qd-dialog-table-select__trigger[data-v-cc0a2b83] {
5
5
  width: 100%;
6
6
  }
7
- .qd-dialog-table-select__trigger[data-v-814b91a7]:not(.qd-dialog-table-select__trigger--readonly):not(.qd-dialog-table-select__trigger--disabled) {
7
+ .qd-dialog-table-select__trigger[data-v-cc0a2b83]:not(.qd-dialog-table-select__trigger--readonly):not(.qd-dialog-table-select__trigger--disabled) {
8
8
  cursor: pointer;
9
9
  }
10
- .qd-dialog-table-select__input-trigger[data-v-814b91a7] {
10
+ .qd-dialog-table-select__input-trigger[data-v-cc0a2b83] {
11
11
  border-top-left-radius: 0;
12
12
  border-bottom-left-radius: 0;
13
13
  }
14
- .qd-dialog-table-select__table[data-v-814b91a7] .qd-crud-search > .t-loading__parent > .t-card__body,
15
- .qd-dialog-table-select__table[data-v-814b91a7] .qd-crud-table__body > .t-loading__parent > .t-card__body {
14
+ .qd-dialog-table-select__table[data-v-cc0a2b83] .qd-crud-search > .t-loading__parent > .t-card__body,
15
+ .qd-dialog-table-select__table[data-v-cc0a2b83] .qd-crud-table__body > .t-loading__parent > .t-card__body {
16
16
  padding: 0 !important;
17
17
  }
18
- .qd-dialog-table-select__table[data-v-814b91a7] .qd-crud-table__toolbar {
18
+ .qd-dialog-table-select__table[data-v-cc0a2b83] .qd-crud-table__toolbar {
19
19
  display: none;
20
20
  }
21
- .qd-dialog-table-select__table[data-v-814b91a7] .qd-service-table {
21
+ .qd-dialog-table-select__table[data-v-cc0a2b83] .qd-service-table {
22
22
  margin-top: 0;
23
23
  }
24
- .qd-dialog-table-select__table-add[data-v-814b91a7] {
24
+ .qd-dialog-table-select__table-add[data-v-cc0a2b83] {
25
25
  margin-top: var(--td-comp-margin-m);
26
26
  display: flex;
27
27
  }
28
- .qd-dialog-table-select__table-add .t-input__wrap[data-v-814b91a7] {
28
+ .qd-dialog-table-select__table-add .t-input__wrap[data-v-cc0a2b83] {
29
29
  flex: 1 1 0;
30
30
  overflow: hidden;
31
31
  margin-right: var(--td-comp-margin-m);
@@ -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 index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-814b91a7"]]);
5
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cc0a2b83"]]);
6
6
  export {
7
7
  index as default
8
8
  };
@@ -448,7 +448,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
448
448
  };
449
449
  const effectiveCreatable = mode === "input" || creatable;
450
450
  const quoteBtnOptions = merge({}, {
451
- content: "引用",
451
+ content: t("quoteText"),
452
452
  onClick: openDialog,
453
453
  disabled: tdReadonly.value || tdDisabled.value
454
454
  }, typeof quoteBtn === "string" ? {
@@ -4,7 +4,7 @@ import _sfc_main from "./index.vue2.mjs";
4
4
  /* empty css */
5
5
  /* empty css */
6
6
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
7
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2084d5ab"]]);
7
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c25d9fb5"]]);
8
8
  export {
9
9
  index as default
10
10
  };
@@ -457,7 +457,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
457
457
  };
458
458
  const effectiveCreatable = mode === "input" || creatable;
459
459
  const quoteBtnOptions = merge({}, {
460
- content: "引用",
460
+ content: t("quoteText"),
461
461
  onClick: openPopup,
462
462
  disabled: tdReadonly.value || tdDisabled.value
463
463
  }, typeof quoteBtn === "string" ? {
@@ -1,23 +1,23 @@
1
- .qd-popup-table-select__table[data-v-2084d5ab] .qd-crud-search > .t-loading__parent > .t-card__body,
2
- .qd-popup-table-select__table[data-v-2084d5ab] .qd-crud-table__body > .t-loading__parent > .t-card__body {
1
+ .qd-popup-table-select__table[data-v-c25d9fb5] .qd-crud-search > .t-loading__parent > .t-card__body,
2
+ .qd-popup-table-select__table[data-v-c25d9fb5] .qd-crud-table__body > .t-loading__parent > .t-card__body {
3
3
  padding: 0 !important;
4
4
  }
5
- .qd-popup-table-select__table[data-v-2084d5ab] .qd-crud-table__toolbar {
5
+ .qd-popup-table-select__table[data-v-c25d9fb5] .qd-crud-table__toolbar {
6
6
  display: none;
7
7
  }
8
- .qd-popup-table-select__table[data-v-2084d5ab] .qd-service-table {
8
+ .qd-popup-table-select__table[data-v-c25d9fb5] .qd-service-table {
9
9
  margin-top: 0;
10
10
  }
11
- .qd-popup-table-select__table-add[data-v-2084d5ab] {
11
+ .qd-popup-table-select__table-add[data-v-c25d9fb5] {
12
12
  margin-top: var(--td-comp-margin-m);
13
13
  display: flex;
14
14
  }
15
- .qd-popup-table-select__table-add .t-input__wrap[data-v-2084d5ab] {
15
+ .qd-popup-table-select__table-add .t-input__wrap[data-v-c25d9fb5] {
16
16
  flex: 1 1 0;
17
17
  overflow: hidden;
18
18
  margin-right: var(--td-comp-margin-m);
19
19
  }
20
- .qd-popup-table-select__input-trigger[data-v-2084d5ab] {
20
+ .qd-popup-table-select__input-trigger[data-v-c25d9fb5] {
21
21
  border-top-left-radius: 0;
22
22
  border-bottom-left-radius: 0;
23
23
  }
@@ -64,6 +64,7 @@ export declare const defaultPreviewers: {
64
64
  minHeight: number;
65
65
  immediateRender: boolean;
66
66
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
67
+ html: boolean;
67
68
  };
68
69
  };
69
70
  export declare const defaultShikiOptions: {
@@ -9,7 +9,7 @@ const Markmap = defineAsyncComponent({
9
9
  });
10
10
  const defaultPreviewers = {
11
11
  progressive: { echarts: true, markmap: true },
12
- components: { echarts: Echarts, markmap: Markmap }
12
+ components: { echarts: Echarts, markmap: Markmap, html: true }
13
13
  };
14
14
  const defaultShikiOptions = { langAlias: { echarts: "json", markmap: "markdown" } };
15
15
  export {
@@ -1,97 +1,97 @@
1
- .qd-upload[data-v-b4e62536] {
1
+ .qd-upload[data-v-987466f3] {
2
2
  width: 100%;
3
3
  outline: none;
4
4
  }
5
- .qd-upload[data-v-b4e62536] .t-image-viewer__trigger {
5
+ .qd-upload[data-v-987466f3] .t-image-viewer__trigger {
6
6
  display: none;
7
7
  }
8
- .qd-upload[data-v-b4e62536] .t-upload__dragger {
8
+ .qd-upload[data-v-987466f3] .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-b4e62536] .t-upload__flow {
14
+ .qd-upload[data-v-987466f3] .t-upload__flow {
15
15
  width: 100%;
16
16
  min-width: auto;
17
17
  max-width: 100%;
18
18
  }
19
- .qd-upload[data-v-b4e62536] .t-upload__flow-empty {
19
+ .qd-upload[data-v-987466f3] .t-upload__flow-empty {
20
20
  height: auto;
21
21
  min-height: 144px;
22
22
  }
23
- .qd-upload[data-v-b4e62536] .t-upload__flow-card-area,
24
- .qd-upload[data-v-b4e62536] .t-upload__flow-table {
23
+ .qd-upload[data-v-987466f3] .t-upload__flow-card-area,
24
+ .qd-upload[data-v-987466f3] .t-upload__flow-table {
25
25
  margin-top: var(--td-comp-margin-s);
26
26
  }
27
- .qd-upload[data-v-b4e62536] .t-upload__file-name__container {
27
+ .qd-upload[data-v-987466f3] .t-upload__file-name__container {
28
28
  display: flex;
29
29
  align-items: center;
30
30
  }
31
- .qd-upload[data-v-b4e62536] .t-upload__file-name-text {
31
+ .qd-upload[data-v-987466f3] .t-upload__file-name-text {
32
32
  cursor: pointer;
33
33
  }
34
- .qd-upload[data-v-b4e62536] .t-upload__file-thumbnail {
34
+ .qd-upload[data-v-987466f3] .t-upload__file-thumbnail {
35
35
  width: var(--td-comp-size-m);
36
36
  height: var(--td-comp-size-m);
37
37
  }
38
- .qd-upload[data-v-b4e62536] .t-upload__card-image {
38
+ .qd-upload[data-v-987466f3] .t-upload__card-image {
39
39
  width: 100%;
40
40
  height: 100%;
41
41
  }
42
- .qd-upload__popup-upload[data-v-b4e62536] .t-image-viewer__trigger {
42
+ .qd-upload__popup-upload[data-v-987466f3] .t-image-viewer__trigger {
43
43
  display: none;
44
44
  }
45
- .qd-upload__popup-upload[data-v-b4e62536] .t-upload__flow-table {
45
+ .qd-upload__popup-upload[data-v-987466f3] .t-upload__flow-table {
46
46
  margin-top: 0;
47
47
  }
48
- .qd-upload__popup-upload[data-v-b4e62536] .t-upload__file-name__container {
48
+ .qd-upload__popup-upload[data-v-987466f3] .t-upload__file-name__container {
49
49
  display: flex;
50
50
  align-items: center;
51
51
  }
52
- .qd-upload__popup-upload[data-v-b4e62536] .t-upload__file-name-text {
52
+ .qd-upload__popup-upload[data-v-987466f3] .t-upload__file-name-text {
53
53
  cursor: pointer;
54
54
  }
55
- .qd-upload__popup-upload[data-v-b4e62536] .t-upload__file-thumbnail {
55
+ .qd-upload__popup-upload[data-v-987466f3] .t-upload__file-thumbnail {
56
56
  width: var(--td-comp-size-m);
57
57
  height: var(--td-comp-size-m);
58
58
  }
59
- .qd-upload__popup-upload[data-v-b4e62536] .t-upload__card-image {
59
+ .qd-upload__popup-upload[data-v-987466f3] .t-upload__card-image {
60
60
  width: 100%;
61
61
  height: 100%;
62
62
  }
63
- .qd-upload__popup-upload--disabled[data-v-b4e62536] .t-upload__flow-table th:last-child,
64
- .qd-upload__popup-upload--disabled[data-v-b4e62536] .t-upload__flow-table td:last-child {
63
+ .qd-upload__popup-upload--disabled[data-v-987466f3] .t-upload__flow-table th:last-child,
64
+ .qd-upload__popup-upload--disabled[data-v-987466f3] .t-upload__flow-table td:last-child {
65
65
  display: none;
66
66
  }
67
- .qd-upload[data-v-b4e62536]:focus .t-upload__flow-card-area,
68
- .qd-upload[data-v-b4e62536]:focus .t-upload__flow-table {
67
+ .qd-upload[data-v-987466f3]:focus .t-upload__flow-card-area,
68
+ .qd-upload[data-v-987466f3]:focus .t-upload__flow-table {
69
69
  border-color: var(--td-brand-color);
70
70
  }
71
- .qd-upload--only-view[data-v-b4e62536] .t-upload__flow-empty,
72
- .qd-upload--only-view[data-v-b4e62536] .t-upload__card-mask-item-divider {
71
+ .qd-upload--only-view[data-v-987466f3] .t-upload__flow-empty,
72
+ .qd-upload--only-view[data-v-987466f3] .t-upload__card-mask-item-divider {
73
73
  display: none;
74
74
  }
75
- .qd-upload--only-view[data-v-b4e62536] .t-upload__flow-card-area {
75
+ .qd-upload--only-view[data-v-987466f3] .t-upload__flow-card-area {
76
76
  border-color: var(--td-component-border);
77
77
  }
78
- .qd-upload--only-view[data-v-b4e62536]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-op,
79
- .qd-upload--only-view[data-v-b4e62536]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__trigger,
80
- .qd-upload--only-view[data-v-b4e62536]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-bottom {
78
+ .qd-upload--only-view[data-v-987466f3]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-op,
79
+ .qd-upload--only-view[data-v-987466f3]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__trigger,
80
+ .qd-upload--only-view[data-v-987466f3]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-bottom {
81
81
  display: none;
82
82
  }
83
- .qd-upload--only-view[data-v-b4e62536]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-table,
84
- .qd-upload--only-view[data-v-b4e62536]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-card-area {
83
+ .qd-upload--only-view[data-v-987466f3]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-table,
84
+ .qd-upload--only-view[data-v-987466f3]:not(.qd-upload--btn-image-popup):not(.qd-upload--btn-file-popup) .t-upload__flow-card-area {
85
85
  margin-top: 0;
86
86
  }
87
- .qd-upload--hide-manual-upload[data-v-b4e62536] .t-upload__flow-bottom {
87
+ .qd-upload--hide-manual-upload[data-v-987466f3] .t-upload__flow-bottom {
88
88
  display: none;
89
89
  margin-top: 0;
90
90
  }
91
- .qd-upload--hide-progress[data-v-b4e62536] .t-upload__flow-table th:last-child,
92
- .qd-upload--hide-progress[data-v-b4e62536] .t-upload__flow-table td:last-child {
91
+ .qd-upload--hide-progress[data-v-987466f3] .t-upload__flow-table th:last-child,
92
+ .qd-upload--hide-progress[data-v-987466f3] .t-upload__flow-table td:last-child {
93
93
  display: none;
94
94
  }
95
- .qd-upload--disabled[data-v-b4e62536] .t-upload__flow-card-area {
95
+ .qd-upload--disabled[data-v-987466f3] .t-upload__flow-card-area {
96
96
  border-color: var(--td-component-border);
97
97
  }
@@ -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-b4e62536"]]);
5
+ const QdUpload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-987466f3"]]);
6
6
  export {
7
7
  QdUpload as default
8
8
  };
@@ -192,8 +192,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
192
192
  Object.assign(reSizeLimit, { message: t("sizeLimitMessage") }, sizeLimit);
193
193
  }
194
194
  }
195
- const reAccept = accept ? accept : theme.includes("image") ? qdUploadAcceptMap.image : qdUploadAcceptMap.default;
196
- const acceptStr = reAccept.join(",");
195
+ const isAcceptUnlimited = accept === "*" || accept?.length === 0;
196
+ const reAccept = isAcceptUnlimited ? void 0 : accept ? accept : theme.includes("image") ? qdUploadAcceptMap.image : qdUploadAcceptMap.default;
197
+ const acceptStr = reAccept?.join(",");
197
198
  const reBeforeUpload = (file) => {
198
199
  if (beforeUpload) return beforeUpload(file);
199
200
  if (reAccept && !isTypeByName(file.name, reAccept)) {
@@ -18,7 +18,7 @@ export interface QdUploadProps<F extends UploadFile = UploadFile, OR = unknown,
18
18
  convStr?: boolean | string;
19
19
  valueMode?: 'ossId' | 'url';
20
20
  theme?: TdUploadProps['theme'] | 'btn-file-popup' | 'btn-image-popup';
21
- accept?: string[];
21
+ accept?: string[] | '*';
22
22
  onlyView?: boolean;
23
23
  showManualButton?: boolean;
24
24
  listOssByIds?: {
@@ -330,6 +330,7 @@ declare const _default: {
330
330
  addText: string;
331
331
  addConfirmText: string;
332
332
  addCancelText: string;
333
+ quoteText: string;
333
334
  };
334
335
  importDialog: {
335
336
  fileSupport: string[];
@@ -71,7 +71,8 @@ const enUS = merge(enUS$1, {
71
71
  dialogTableSelect: {
72
72
  addText: "Can't select one? Click here to add one.",
73
73
  addConfirmText: "Confirm",
74
- addCancelText: "Cancel"
74
+ addCancelText: "Cancel",
75
+ quoteText: "Quote"
75
76
  },
76
77
  importDialog: {
77
78
  fileSupport: ["Supported", "formats"],
@@ -330,6 +330,7 @@ declare const _default: {
330
330
  addText: string;
331
331
  addConfirmText: string;
332
332
  addCancelText: string;
333
+ quoteText: string;
333
334
  };
334
335
  importDialog: {
335
336
  fileSupport: string[];
@@ -68,7 +68,8 @@ const zhCN = merge(zhCN$1, {
68
68
  dialogTableSelect: {
69
69
  addText: "选不到?点此新增",
70
70
  addConfirmText: "确认",
71
- addCancelText: "取消"
71
+ addCancelText: "取消",
72
+ quoteText: "引用"
72
73
  },
73
74
  importDialog: {
74
75
  fileSupport: ["支持", "格式"],
@@ -330,6 +330,7 @@ declare const _default: {
330
330
  addText: string;
331
331
  addConfirmText: string;
332
332
  addCancelText: string;
333
+ quoteText: string;
333
334
  };
334
335
  importDialog: {
335
336
  fileSupport: string[];
@@ -68,7 +68,8 @@ const zhTW = merge(zhTW$1, {
68
68
  dialogTableSelect: {
69
69
  addText: "選不到?點此新增",
70
70
  addConfirmText: "確認",
71
- addCancelText: "取消"
71
+ addCancelText: "取消",
72
+ quoteText: "引用"
72
73
  },
73
74
  importDialog: {
74
75
  fileSupport: ["支援", "格式"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qidian-vue-ui",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "基于 TDesign 的 QiDian Vue UI 组件库",
5
5
  "author": "qidian",
6
6
  "license": "MIT",
@@ -129,7 +129,7 @@
129
129
  "vue": "~3.5.26",
130
130
  "vue-codemirror": "^6.1.1",
131
131
  "vue-echarts": "^8.0.1",
132
- "vue-stream-markdown": "^1.0.0",
132
+ "vue-stream-markdown": "1.0.1-beta.1",
133
133
  "qidian-shared": "1.0.76"
134
134
  },
135
135
  "scripts": {