@qynpm/ui 1.0.5 → 1.0.7

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 (110) hide show
  1. package/README.md +228 -228
  2. package/dist/index.cjs +2 -1
  3. package/dist/index.mjs +18 -18
  4. package/dist/qy-action-bar/index.cjs +1 -1
  5. package/dist/qy-action-bar/index.mjs +2 -4
  6. package/dist/qy-dialog/index.cjs +1 -1
  7. package/dist/qy-dialog/index.mjs +2 -5
  8. package/dist/qy-form-section/index.cjs +1 -1
  9. package/dist/qy-form-section/index.mjs +2 -4
  10. package/dist/qy-input/index.cjs +1 -1
  11. package/dist/qy-input/index.mjs +2 -4
  12. package/dist/qy-money-input/index.cjs +1 -1
  13. package/dist/qy-money-input/index.mjs +2 -4
  14. package/dist/qy-radio-group/index.cjs +1 -1
  15. package/dist/qy-radio-group/index.mjs +2 -4
  16. package/dist/qy-record-quote-search/index.cjs +1 -1
  17. package/dist/qy-record-quote-search/index.mjs +2 -4
  18. package/dist/qy-remark-image/index.cjs +1 -2
  19. package/dist/qy-remark-image/index.mjs +2 -5
  20. package/dist/qy-remote-select/index.cjs +1 -1
  21. package/dist/qy-remote-select/index.mjs +2 -4
  22. package/dist/qy-search-input/index.cjs +1 -1
  23. package/dist/qy-search-input/index.mjs +2 -4
  24. package/dist/qy-select/index.cjs +1 -1
  25. package/dist/qy-select/index.mjs +2 -4
  26. package/dist/qy-upload/index.cjs +1 -1
  27. package/dist/qy-upload/index.mjs +2 -4
  28. package/dist/qy-voucher-upload/index.cjs +1 -1
  29. package/dist/qy-voucher-upload/index.mjs +2 -4
  30. package/dist/shared/index-CbFvRxuh.mjs +2592 -0
  31. package/dist/shared/index-GDrnDY44.cjs +1 -0
  32. package/index.d.ts +20 -20
  33. package/package.json +1 -1
  34. package/qy-action-bar/index.js +1 -4
  35. package/qy-dialog/index.js +1 -4
  36. package/qy-form-section/index.js +1 -4
  37. package/qy-input/index.js +1 -4
  38. package/qy-money-input/index.d.ts +12 -12
  39. package/qy-money-input/index.js +1 -15
  40. package/qy-radio-group/index.d.ts +12 -12
  41. package/qy-radio-group/index.js +1 -15
  42. package/qy-record-quote-search/index.js +1 -4
  43. package/qy-remark-image/index.js +1 -4
  44. package/qy-remote-select/index.d.ts +12 -12
  45. package/qy-remote-select/index.js +1 -15
  46. package/qy-search-input/index.js +1 -4
  47. package/qy-select/index.js +1 -4
  48. package/qy-upload/index.js +1 -4
  49. package/qy-voucher-upload/index.d.ts +12 -12
  50. package/qy-voucher-upload/index.js +1 -15
  51. package/dist/_virtual/_plugin-vue_export-helper.cjs +0 -1
  52. package/dist/_virtual/_plugin-vue_export-helper.mjs +0 -9
  53. package/dist/lib/dialog/index.vue.cjs +0 -1
  54. package/dist/lib/dialog/index.vue.mjs +0 -325
  55. package/dist/lib/dialog/index.vue3.cjs +0 -1
  56. package/dist/lib/dialog/index.vue3.mjs +0 -5
  57. package/dist/lib/index.cjs +0 -1
  58. package/dist/lib/index.mjs +0 -53
  59. package/dist/lib/qy-action-bar/index.vue.cjs +0 -1
  60. package/dist/lib/qy-action-bar/index.vue.mjs +0 -7
  61. package/dist/lib/qy-action-bar/index.vue2.cjs +0 -1
  62. package/dist/lib/qy-action-bar/index.vue2.mjs +0 -55
  63. package/dist/lib/qy-form-section/index.vue.cjs +0 -1
  64. package/dist/lib/qy-form-section/index.vue.mjs +0 -7
  65. package/dist/lib/qy-form-section/index.vue2.cjs +0 -1
  66. package/dist/lib/qy-form-section/index.vue2.mjs +0 -87
  67. package/dist/lib/qy-input/index.vue.cjs +0 -1
  68. package/dist/lib/qy-input/index.vue.mjs +0 -143
  69. package/dist/lib/qy-input/index.vue2.cjs +0 -1
  70. package/dist/lib/qy-input/index.vue2.mjs +0 -4
  71. package/dist/lib/qy-money-input/index.vue.cjs +0 -1
  72. package/dist/lib/qy-money-input/index.vue.mjs +0 -171
  73. package/dist/lib/qy-money-input/index.vue2.cjs +0 -1
  74. package/dist/lib/qy-money-input/index.vue2.mjs +0 -4
  75. package/dist/lib/qy-radio-group/index.vue.cjs +0 -1
  76. package/dist/lib/qy-radio-group/index.vue.mjs +0 -90
  77. package/dist/lib/qy-radio-group/index.vue2.cjs +0 -1
  78. package/dist/lib/qy-radio-group/index.vue2.mjs +0 -4
  79. package/dist/lib/qy-record-quote-search/index.vue.cjs +0 -1
  80. package/dist/lib/qy-record-quote-search/index.vue.mjs +0 -7
  81. package/dist/lib/qy-record-quote-search/index.vue2.cjs +0 -1
  82. package/dist/lib/qy-record-quote-search/index.vue2.mjs +0 -204
  83. package/dist/lib/qy-remote-select/index.vue.cjs +0 -1
  84. package/dist/lib/qy-remote-select/index.vue.mjs +0 -214
  85. package/dist/lib/qy-remote-select/index.vue2.cjs +0 -1
  86. package/dist/lib/qy-remote-select/index.vue2.mjs +0 -4
  87. package/dist/lib/qy-search-input/index.vue.cjs +0 -1
  88. package/dist/lib/qy-search-input/index.vue.mjs +0 -7
  89. package/dist/lib/qy-search-input/index.vue2.cjs +0 -1
  90. package/dist/lib/qy-search-input/index.vue2.mjs +0 -276
  91. package/dist/lib/qy-select/index.vue.cjs +0 -1
  92. package/dist/lib/qy-select/index.vue.mjs +0 -162
  93. package/dist/lib/qy-select/index.vue2.cjs +0 -1
  94. package/dist/lib/qy-select/index.vue2.mjs +0 -4
  95. package/dist/lib/qy-voucher-upload/index.vue.cjs +0 -1
  96. package/dist/lib/qy-voucher-upload/index.vue.mjs +0 -123
  97. package/dist/lib/remark-image/index.vue.cjs +0 -1
  98. package/dist/lib/remark-image/index.vue.mjs +0 -7
  99. package/dist/lib/remark-image/index.vue2.cjs +0 -1
  100. package/dist/lib/remark-image/index.vue2.mjs +0 -197
  101. package/dist/lib/remark-image/utils.cjs +0 -1
  102. package/dist/lib/remark-image/utils.mjs +0 -22
  103. package/dist/lib/upload/index.vue.cjs +0 -1
  104. package/dist/lib/upload/index.vue.mjs +0 -482
  105. package/dist/lib/utils/auth.cjs +0 -1
  106. package/dist/lib/utils/auth.mjs +0 -8
  107. package/dist/lib/utils/install.cjs +0 -1
  108. package/dist/lib/utils/install.mjs +0 -8
  109. package/dist/node_modules/.pnpm/js-cookie@3.0.5/node_modules/js-cookie/dist/js.cookie.cjs +0 -1
  110. package/dist/node_modules/.pnpm/js-cookie@3.0.5/node_modules/js-cookie/dist/js.cookie.mjs +0 -74
@@ -1,162 +0,0 @@
1
- import { defineComponent as E, useAttrs as P, useSlots as F, ref as O, computed as n, Comment as R, watch as I, createBlock as p, openBlock as o, unref as f, mergeProps as U, createSlots as W, withCtx as u, renderSlot as d, createElementBlock as j, Fragment as q, renderList as D, normalizeProps as L, guardReactiveProps as M } from "vue";
2
- import { ElSelect as N, ElOption as Q } from "element-plus";
3
- const J = /* @__PURE__ */ E({
4
- name: "QySelect",
5
- inheritAttrs: !1,
6
- __name: "index",
7
- props: {
8
- modelValue: { type: [String, Number, Boolean, Array, null], default: void 0 },
9
- options: { default: () => [] },
10
- labelKey: { default: "label" },
11
- valueKey: { default: "value" },
12
- disabledKey: { default: "disabled" },
13
- placeholder: { default: "请选择" },
14
- disabled: { type: Boolean, default: !1 },
15
- clearable: { type: Boolean, default: !0 },
16
- filterable: { type: Boolean, default: !1 },
17
- multiple: { type: Boolean, default: !1 },
18
- collapseTags: { type: Boolean, default: !1 },
19
- collapseTagsTooltip: { type: Boolean, default: !1 },
20
- autoSelectSingle: { type: Boolean, default: !1 },
21
- size: { default: "default" },
22
- teleported: { type: Boolean, default: !0 },
23
- appendTo: { default: "body" },
24
- fitInputWidth: { type: Boolean, default: !0 },
25
- popperClass: { default: "" }
26
- },
27
- emits: ["update:modelValue", "change", "clear", "visible-change", "focus", "blur"],
28
- setup(c, { expose: m, emit: b }) {
29
- const a = c, s = b, y = P(), g = F(), r = O(null), h = n(
30
- () => ["qy-select__popper", a.popperClass].filter(Boolean).join(" ")
31
- ), i = n(
32
- () => (a.options || []).map((e) => ({
33
- raw: e,
34
- label: (e == null ? void 0 : e[a.labelKey]) ?? (e == null ? void 0 : e.label) ?? (e == null ? void 0 : e.value) ?? "",
35
- value: (e == null ? void 0 : e[a.valueKey]) ?? (e == null ? void 0 : e.value) ?? (e == null ? void 0 : e.label),
36
- disabled: !!(e != null && e[a.disabledKey])
37
- }))
38
- ), v = n(() => {
39
- const e = g.default;
40
- return e ? e().some((l) => l.type !== R) : !1;
41
- });
42
- function B(e) {
43
- return Array.isArray(e) ? e.length === 0 : e === "" || e === null || e === void 0;
44
- }
45
- I(
46
- [
47
- i,
48
- () => a.modelValue,
49
- () => a.autoSelectSingle,
50
- () => a.disabled,
51
- () => a.multiple
52
- ],
53
- ([e]) => {
54
- if (!a.autoSelectSingle || a.disabled || !B(a.modelValue) || e.length !== 1) return;
55
- const [l] = e;
56
- if (l.disabled) return;
57
- const t = a.multiple ? [l.value] : l.value;
58
- s("update:modelValue", t), s("change", t);
59
- },
60
- { immediate: !0 }
61
- );
62
- function S(e, l) {
63
- return `${String(e.value ?? e.label ?? "")}-${l}`;
64
- }
65
- function C(e) {
66
- s("update:modelValue", e);
67
- }
68
- function V(e) {
69
- s("change", e);
70
- }
71
- function k() {
72
- s("clear");
73
- }
74
- function $(e) {
75
- s("visible-change", e);
76
- }
77
- function T(e) {
78
- s("focus", e);
79
- }
80
- function K(e) {
81
- s("blur", e);
82
- }
83
- function z() {
84
- var e, l;
85
- (l = (e = r.value) == null ? void 0 : e.focus) == null || l.call(e);
86
- }
87
- function w() {
88
- var e, l;
89
- (l = (e = r.value) == null ? void 0 : e.blur) == null || l.call(e);
90
- }
91
- return m({
92
- // 仅暴露业务常用焦点方法,复杂下拉行为仍交给 Element Plus 自身处理。
93
- focus: z,
94
- blur: w
95
- }), (e, l) => (o(), p(f(N), U({
96
- ref_key: "selectRef",
97
- ref: r
98
- }, f(y), {
99
- "model-value": e.modelValue,
100
- placeholder: e.placeholder,
101
- disabled: e.disabled,
102
- clearable: e.clearable,
103
- filterable: e.filterable,
104
- multiple: e.multiple,
105
- "collapse-tags": e.collapseTags,
106
- "collapse-tags-tooltip": e.collapseTagsTooltip,
107
- size: e.size,
108
- teleported: e.teleported,
109
- "fit-input-width": e.fitInputWidth,
110
- "popper-class": h.value,
111
- "append-to": e.appendTo,
112
- "onUpdate:modelValue": C,
113
- onChange: V,
114
- onClear: k,
115
- onVisibleChange: $,
116
- onFocus: T,
117
- onBlur: K
118
- }), W({
119
- default: u(() => [
120
- v.value ? d(e.$slots, "default", { key: 0 }) : (o(!0), j(q, { key: 1 }, D(i.value, (t, A) => (o(), p(f(Q), {
121
- key: S(t, A),
122
- label: t.label,
123
- value: t.value,
124
- disabled: t.disabled
125
- }, null, 8, ["label", "value", "disabled"]))), 128))
126
- ]),
127
- _: 2
128
- }, [
129
- e.$slots.prefix ? {
130
- name: "prefix",
131
- fn: u(() => [
132
- d(e.$slots, "prefix")
133
- ]),
134
- key: "0"
135
- } : void 0,
136
- e.$slots.empty ? {
137
- name: "empty",
138
- fn: u(() => [
139
- d(e.$slots, "empty")
140
- ]),
141
- key: "1"
142
- } : void 0,
143
- e.$slots.loading ? {
144
- name: "loading",
145
- fn: u(() => [
146
- d(e.$slots, "loading")
147
- ]),
148
- key: "2"
149
- } : void 0,
150
- e.$slots.tag ? {
151
- name: "tag",
152
- fn: u((t) => [
153
- d(e.$slots, "tag", L(M(t)))
154
- ]),
155
- key: "3"
156
- } : void 0
157
- ]), 1040, ["model-value", "placeholder", "disabled", "clearable", "filterable", "multiple", "collapse-tags", "collapse-tags-tooltip", "size", "teleported", "fit-input-width", "popper-class", "append-to"]));
158
- }
159
- });
160
- export {
161
- J as default
162
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.vue.cjs");exports.default=e.default;
@@ -1,4 +0,0 @@
1
- import f from "./index.vue.mjs";
2
- export {
3
- f as default
4
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("vue"),k=require("../upload/index.vue.cjs"),S=Object.assign({name:"QyVoucherUpload",inheritAttrs:!1},{__name:"index",props:{modelValue:{type:Array,default:()=>[]},api:{type:String,default:"/permission-api/common/uploads"},name:{type:String,default:"files"},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},fileType:{type:Array,default:()=>[]},fileSize:{type:Number,default:10},limit:{type:Number,default:9},isShowTip:{type:Boolean,default:!1},tokenKey:{type:String,default:"Admin-Token"},supportVideo:{type:Boolean,default:!1},size:{type:String,default:"90px"},disableDrag:{type:Boolean,default:!1},callBack:{type:Function,default:null},extraData:{type:Object,default:()=>({})},pastePlaceholder:{type:String,default:"粘贴图片上传"}},emits:["update:modelValue","change","success","error","remove"],setup(t,{expose:r,emit:d}){const i=d,s=l.useAttrs(),n=l.ref(null);function o(e){return Array.isArray(e)?e:[]}function c(e){i("update:modelValue",o(e))}function f(e){const a=o(e==null?void 0:e.files);i("change",a)}function m(e){i("success",e)}function p(e){i("error",e)}function y(e,a){i("remove",e,a)}function h(){var e,a;(a=(e=n.value)==null?void 0:e.openFileDialog)==null||a.call(e)}function u(){var e,a;return((a=(e=n.value)==null?void 0:e.getPathList)==null?void 0:a.call(e))||[]}function g(){var e,a;(a=(e=n.value)==null?void 0:e.clearFiles)==null||a.call(e)}function b(){return u()}return r({openFileDialog:h,getPathList:u,clearFiles:g,getValue:b}),(e,a)=>(l.openBlock(),l.createBlock(k.default,l.mergeProps({ref_key:"uploadRef",ref:n},l.unref(s),{"model-value":t.modelValue,"value-format":"array",api:t.api,name:t.name,multiple:t.multiple,disabled:t.disabled,"file-type":t.fileType,"file-size":t.fileSize,limit:t.limit,"is-show-tip":t.isShowTip,"token-key":t.tokenKey,"support-video":t.supportVideo,size:t.size,"disable-drag":t.disableDrag,"call-back":t.callBack,"extra-data":t.extraData,"show-text":!1,"show-paste-input":!0,"paste-placeholder":t.pastePlaceholder,"onUpdate:modelValue":c,onChange:f,onSuccess:m,onError:p,onRemove:y}),null,16,["model-value","api","name","multiple","disabled","file-type","file-size","limit","is-show-tip","token-key","support-video","size","disable-drag","call-back","extra-data","paste-placeholder"]))}});exports.default=S;
@@ -1,123 +0,0 @@
1
- import { useAttrs as b, ref as k, createBlock as S, openBlock as V, mergeProps as x, unref as z } from "vue";
2
- import B from "../upload/index.vue.mjs";
3
- const w = /* @__PURE__ */ Object.assign({
4
- name: "QyVoucherUpload",
5
- inheritAttrs: !1
6
- }, {
7
- __name: "index",
8
- props: {
9
- /** 凭证图片 URL 数组。 */
10
- modelValue: { type: Array, default: () => [] },
11
- /** 上传接口路径。 */
12
- api: { type: String, default: "/permission-api/common/uploads" },
13
- /** 凭证上传沿用老业务字段名 files。 */
14
- name: { type: String, default: "files" },
15
- /** 是否多选。 */
16
- multiple: { type: Boolean, default: !0 },
17
- /** 是否禁用。 */
18
- disabled: { type: Boolean, default: !1 },
19
- /** 允许的文件类型后缀。 */
20
- fileType: { type: Array, default: () => [] },
21
- /** 单个文件大小限制(MB)。 */
22
- fileSize: { type: Number, default: 10 },
23
- /** 文件数量限制。 */
24
- limit: { type: Number, default: 9 },
25
- /** 是否显示格式/大小提示。 */
26
- isShowTip: { type: Boolean, default: !1 },
27
- /** token 读取 key。 */
28
- tokenKey: { type: String, default: "Admin-Token" },
29
- /** 是否支持视频模式。 */
30
- supportVideo: { type: Boolean, default: !1 },
31
- /** 凭证默认尺寸,贴近财审凭证里的紧凑图片格。 */
32
- size: { type: String, default: "90px" },
33
- /** 禁用拖拽。 */
34
- disableDrag: { type: Boolean, default: !1 },
35
- /** 成功回调。 */
36
- callBack: { type: Function, default: null },
37
- /** 上传时附加的额外 FormData 字段。 */
38
- extraData: { type: Object, default: () => ({}) },
39
- /** 凭证上传底部提示文案,默认对齐 CopyImgUpload 的旧交互。 */
40
- pastePlaceholder: { type: String, default: "粘贴图片上传" }
41
- },
42
- emits: [
43
- "update:modelValue",
44
- "change",
45
- "success",
46
- "error",
47
- "remove"
48
- ],
49
- setup(a, { expose: u, emit: r }) {
50
- const l = r, d = b(), i = k(null);
51
- function n(e) {
52
- return Array.isArray(e) ? e : [];
53
- }
54
- function s(e) {
55
- l("update:modelValue", n(e));
56
- }
57
- function f(e) {
58
- const t = n(e == null ? void 0 : e.files);
59
- l("change", t);
60
- }
61
- function c(e) {
62
- l("success", e);
63
- }
64
- function m(e) {
65
- l("error", e);
66
- }
67
- function p(e, t) {
68
- l("remove", e, t);
69
- }
70
- function y() {
71
- var e, t;
72
- (t = (e = i.value) == null ? void 0 : e.openFileDialog) == null || t.call(e);
73
- }
74
- function o() {
75
- var e, t;
76
- return ((t = (e = i.value) == null ? void 0 : e.getPathList) == null ? void 0 : t.call(e)) || [];
77
- }
78
- function h() {
79
- var e, t;
80
- (t = (e = i.value) == null ? void 0 : e.clearFiles) == null || t.call(e);
81
- }
82
- function g() {
83
- return o();
84
- }
85
- return u({
86
- openFileDialog: y,
87
- getPathList: o,
88
- clearFiles: h,
89
- getValue: g
90
- }), (e, t) => (V(), S(B, x({
91
- ref_key: "uploadRef",
92
- ref: i
93
- }, z(d), {
94
- "model-value": a.modelValue,
95
- "value-format": "array",
96
- api: a.api,
97
- name: a.name,
98
- multiple: a.multiple,
99
- disabled: a.disabled,
100
- "file-type": a.fileType,
101
- "file-size": a.fileSize,
102
- limit: a.limit,
103
- "is-show-tip": a.isShowTip,
104
- "token-key": a.tokenKey,
105
- "support-video": a.supportVideo,
106
- size: a.size,
107
- "disable-drag": a.disableDrag,
108
- "call-back": a.callBack,
109
- "extra-data": a.extraData,
110
- "show-text": !1,
111
- "show-paste-input": !0,
112
- "paste-placeholder": a.pastePlaceholder,
113
- "onUpdate:modelValue": s,
114
- onChange: f,
115
- onSuccess: c,
116
- onError: m,
117
- onRemove: p
118
- }), null, 16, ["model-value", "api", "name", "multiple", "disabled", "file-type", "file-size", "limit", "is-show-tip", "token-key", "support-video", "size", "disable-drag", "call-back", "extra-data", "paste-placeholder"]));
119
- }
120
- });
121
- export {
122
- w as default
123
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=require("../../_virtual/_plugin-vue_export-helper.cjs"),u=t.default(e.default,[["__scopeId","data-v-dd0a0a37"]]);exports.default=u;
@@ -1,7 +0,0 @@
1
- import a from "./index.vue2.mjs";
2
- /* empty css */
3
- import o from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const e = /* @__PURE__ */ o(a, [["__scopeId", "data-v-dd0a0a37"]]);
5
- export {
6
- e as default
7
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("element-plus"),z=require("../../node_modules/.pnpm/js-cookie@3.0.5/node_modules/js-cookie/dist/js.cookie.cjs"),u=require("./utils.cjs"),C={class:"qy-remark-image__field"},P={class:"qy-remark-image__upload-anchor"},R={key:0,class:"icon-[line-md--loading-twotone-loop]",role:"img","aria-hidden":"true"},S={key:1,class:"icon-[ion--cloud-upload-outline]",role:"img","aria-hidden":"true"},U={key:2,class:"icon-[ph--images-thin]",role:"img","aria-hidden":"true"},A={class:"qy-remark-image__popover"},M=["src"],j={class:"qy-remark-image__popover-footer"},D=e.defineComponent({__name:"index",props:{defaultValue:{default:""},defaultImage:{default:""},rows:{default:6},width:{default:""},autosize:{type:[Boolean,Object],default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:"粘贴图片上传"},type:{default:"textarea"},api:{default:"/permission-api/common/uploads"},tokenKey:{default:"Admin-Token"}},emits:["change"],setup(E,{expose:b,emit:x}){const l=E,V=x,q=e.useAttrs(),p=e.ref(null),s=e.ref(""),o=e.ref(""),c=e.ref(!1),B=e.computed(()=>l.type==="text"?"text":"textarea"),T=e.computed(()=>{if(l.width)return{width:typeof l.width=="number"?`${l.width}px`:l.width}});e.watch(()=>l.defaultValue,a=>{const t=u.parseRemarkText(a||"");s.value=t.text,o.value=t.imageUrl||l.defaultImage||""},{immediate:!0}),e.watch(()=>l.defaultImage,a=>{a!==void 0&&!u.parseRemarkText(l.defaultValue||"").imageUrl&&(o.value=a||"")},{immediate:!0}),e.onMounted(()=>{e.nextTick(N)}),e.onUnmounted(()=>{const a=y();a&&a.removeEventListener("paste",v)});function y(){var a,t;return((a=p.value)==null?void 0:a.textarea)||((t=p.value)==null?void 0:t.input)||null}function N(){const a=y();a&&(a.removeEventListener("paste",v),a.addEventListener("paste",v))}function I(a){s.value=u.formatRemarkText(a||"")}function k(){o.value="",g()}async function v(a){var d;const i=Array.from(((d=a.clipboardData)==null?void 0:d.files)||[]).find(m=>m.type.startsWith("image/"));i&&(a.preventDefault(),await _({file:i,onError:()=>{},onProgress:()=>{},onSuccess:()=>{}}))}async function _(a){var t,i,d,m;if(a.file.size>51200*1e3)return n.ElMessage.error("图片过大"),!1;c.value=!0;try{const f=new FormData;f.append("files",a.file);const w=z.default.get(l.tokenKey),r=await(await fetch(l.api,{method:"POST",body:f,credentials:"include",headers:w?{Authorization:`Bearer ${w}`}:void 0})).json(),h=(r==null?void 0:r.urls)??((t=r==null?void 0:r.data)==null?void 0:t.urls)??((i=r==null?void 0:r.data)==null?void 0:i.url)??(r==null?void 0:r.url)??"";return o.value=Array.isArray(h)?h[0]:h,g(),n.ElMessage.success("上传图片成功"),(d=a.onSuccess)==null||d.call(a,r),!0}catch(f){return(m=a.onError)==null||m.call(a,f),n.ElMessage.error("上传失败"),!1}finally{c.value=!1}}function g(){V("change",u.parseRemarkWithImage(s.value||"",o.value||""),o.value||"")}return b({deleteImage:k,getValue:()=>({text:s.value||"",imageUrl:o.value||"",value:u.parseRemarkWithImage(s.value||"",o.value||"")})}),(a,t)=>(e.openBlock(),e.createElementBlock("div",{class:"qy-remark-image",style:e.normalizeStyle(T.value)},[e.createElementVNode("div",C,[e.createVNode(e.unref(n.ElInput),e.mergeProps({ref_key:"inputRef",ref:p,"model-value":s.value,type:B.value,rows:a.rows,autosize:a.autosize,disabled:a.disabled,placeholder:a.placeholder},e.unref(q),{"onUpdate:modelValue":I,onBlur:g}),null,16,["model-value","type","rows","autosize","disabled","placeholder"]),e.createVNode(e.unref(n.ElPopover),{placement:"top-start",width:400,trigger:"hover",disabled:!o.value},{reference:e.withCtx(()=>[e.createElementVNode("div",P,[e.createVNode(e.unref(n.ElUpload),{disabled:c.value||a.disabled,class:"qy-remark-image__upload","show-file-list":!1,"http-request":_},{default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("span",R)):o.value?(e.openBlock(),e.createElementBlock("span",U)):(e.openBlock(),e.createElementBlock("span",S))]),_:1},8,["disabled"])])]),default:e.withCtx(()=>[e.createElementVNode("div",A,[e.createElementVNode("img",{src:o.value,class:"qy-remark-image__preview-img"},null,8,M),e.createElementVNode("div",j,[t[1]||(t[1]=e.createElementVNode("span",{class:"qy-remark-image__popover-tip"},"再次点击按钮可更换图片",-1)),e.createVNode(e.unref(n.ElButton),{link:"",size:"small",type:"danger",disabled:a.disabled,onClick:k},{default:e.withCtx(()=>t[0]||(t[0]=[e.createTextVNode(" 删除图片 ",-1)])),_:1,__:[0]},8,["disabled"])])])]),_:1},8,["disabled"])])],4))}});exports.default=D;
@@ -1,197 +0,0 @@
1
- import { defineComponent as j, useAttrs as F, ref as f, computed as z, watch as I, onMounted as K, nextTick as M, onUnmounted as O, createElementBlock as p, openBlock as v, normalizeStyle as W, createElementVNode as i, createVNode as g, unref as d, mergeProps as $, withCtx as h, createTextVNode as G } from "vue";
2
- import { ElMessage as b, ElInput as H, ElPopover as J, ElButton as Q, ElUpload as X } from "element-plus";
3
- import Y from "../../node_modules/.pnpm/js-cookie@3.0.5/node_modules/js-cookie/dist/js.cookie.mjs";
4
- import { parseRemarkText as V, parseRemarkWithImage as B, formatRemarkText as Z } from "./utils.mjs";
5
- const ee = { class: "qy-remark-image__field" }, ae = { class: "qy-remark-image__upload-anchor" }, te = {
6
- key: 0,
7
- class: "icon-[line-md--loading-twotone-loop]",
8
- role: "img",
9
- "aria-hidden": "true"
10
- }, re = {
11
- key: 1,
12
- class: "icon-[ion--cloud-upload-outline]",
13
- role: "img",
14
- "aria-hidden": "true"
15
- }, le = {
16
- key: 2,
17
- class: "icon-[ph--images-thin]",
18
- role: "img",
19
- "aria-hidden": "true"
20
- }, oe = { class: "qy-remark-image__popover" }, ie = ["src"], se = { class: "qy-remark-image__popover-footer" }, fe = /* @__PURE__ */ j({
21
- __name: "index",
22
- props: {
23
- defaultValue: { default: "" },
24
- defaultImage: { default: "" },
25
- rows: { default: 6 },
26
- width: { default: "" },
27
- autosize: { type: [Boolean, Object], default: !1 },
28
- disabled: { type: Boolean, default: !1 },
29
- placeholder: { default: "粘贴图片上传" },
30
- type: { default: "textarea" },
31
- api: { default: "/permission-api/common/uploads" },
32
- tokenKey: { default: "Admin-Token" }
33
- },
34
- emits: ["change"],
35
- setup(U, { expose: A, emit: P }) {
36
- const r = U, C = P, R = F(), y = f(null), o = f(""), l = f(""), u = f(!1), S = z(
37
- () => r.type === "text" ? "text" : "textarea"
38
- ), D = z(() => {
39
- if (r.width)
40
- return {
41
- width: typeof r.width == "number" ? `${r.width}px` : r.width
42
- };
43
- });
44
- I(
45
- () => r.defaultValue,
46
- (e) => {
47
- const a = V(e || "");
48
- o.value = a.text, l.value = a.imageUrl || r.defaultImage || "";
49
- },
50
- { immediate: !0 }
51
- ), I(
52
- () => r.defaultImage,
53
- (e) => {
54
- e !== void 0 && !V(r.defaultValue || "").imageUrl && (l.value = e || "");
55
- },
56
- { immediate: !0 }
57
- ), K(() => {
58
- M(L);
59
- }), O(() => {
60
- const e = x();
61
- e && e.removeEventListener("paste", _);
62
- });
63
- function x() {
64
- var e, a;
65
- return ((e = y.value) == null ? void 0 : e.textarea) || ((a = y.value) == null ? void 0 : a.input) || null;
66
- }
67
- function L() {
68
- const e = x();
69
- e && (e.removeEventListener("paste", _), e.addEventListener("paste", _));
70
- }
71
- function N(e) {
72
- o.value = Z(e || "");
73
- }
74
- function E() {
75
- l.value = "", k();
76
- }
77
- async function _(e) {
78
- var n;
79
- const s = Array.from(((n = e.clipboardData) == null ? void 0 : n.files) || []).find((m) => m.type.startsWith("image/"));
80
- s && (e.preventDefault(), await T({
81
- file: s,
82
- onError: () => {
83
- },
84
- onProgress: () => {
85
- },
86
- onSuccess: () => {
87
- }
88
- }));
89
- }
90
- async function T(e) {
91
- var a, s, n, m;
92
- if (e.file.size > 51200 * 1e3)
93
- return b.error("图片过大"), !1;
94
- u.value = !0;
95
- try {
96
- const c = new FormData();
97
- c.append("files", e.file);
98
- const q = Y.get(r.tokenKey), t = await (await fetch(r.api, {
99
- method: "POST",
100
- body: c,
101
- credentials: "include",
102
- headers: q ? { Authorization: `Bearer ${q}` } : void 0
103
- })).json(), w = (t == null ? void 0 : t.urls) ?? ((a = t == null ? void 0 : t.data) == null ? void 0 : a.urls) ?? ((s = t == null ? void 0 : t.data) == null ? void 0 : s.url) ?? (t == null ? void 0 : t.url) ?? "";
104
- return l.value = Array.isArray(w) ? w[0] : w, k(), b.success("上传图片成功"), (n = e.onSuccess) == null || n.call(e, t), !0;
105
- } catch (c) {
106
- return (m = e.onError) == null || m.call(e, c), b.error("上传失败"), !1;
107
- } finally {
108
- u.value = !1;
109
- }
110
- }
111
- function k() {
112
- C(
113
- "change",
114
- B(o.value || "", l.value || ""),
115
- l.value || ""
116
- );
117
- }
118
- return A({
119
- deleteImage: E,
120
- // 给表单保存或外部调试读取当前拆分值。
121
- getValue: () => ({
122
- text: o.value || "",
123
- imageUrl: l.value || "",
124
- value: B(o.value || "", l.value || "")
125
- })
126
- }), (e, a) => (v(), p("div", {
127
- class: "qy-remark-image",
128
- style: W(D.value)
129
- }, [
130
- i("div", ee, [
131
- g(d(H), $({
132
- ref_key: "inputRef",
133
- ref: y,
134
- "model-value": o.value,
135
- type: S.value,
136
- rows: e.rows,
137
- autosize: e.autosize,
138
- disabled: e.disabled,
139
- placeholder: e.placeholder
140
- }, d(R), {
141
- "onUpdate:modelValue": N,
142
- onBlur: k
143
- }), null, 16, ["model-value", "type", "rows", "autosize", "disabled", "placeholder"]),
144
- g(d(J), {
145
- placement: "top-start",
146
- width: 400,
147
- trigger: "hover",
148
- disabled: !l.value
149
- }, {
150
- reference: h(() => [
151
- i("div", ae, [
152
- g(d(X), {
153
- disabled: u.value || e.disabled,
154
- class: "qy-remark-image__upload",
155
- "show-file-list": !1,
156
- "http-request": T
157
- }, {
158
- default: h(() => [
159
- u.value ? (v(), p("span", te)) : l.value ? (v(), p("span", le)) : (v(), p("span", re))
160
- ]),
161
- _: 1
162
- }, 8, ["disabled"])
163
- ])
164
- ]),
165
- default: h(() => [
166
- i("div", oe, [
167
- i("img", {
168
- src: l.value,
169
- class: "qy-remark-image__preview-img"
170
- }, null, 8, ie),
171
- i("div", se, [
172
- a[1] || (a[1] = i("span", { class: "qy-remark-image__popover-tip" }, "再次点击按钮可更换图片", -1)),
173
- g(d(Q), {
174
- link: "",
175
- size: "small",
176
- type: "danger",
177
- disabled: e.disabled,
178
- onClick: E
179
- }, {
180
- default: h(() => a[0] || (a[0] = [
181
- G(" 删除图片 ", -1)
182
- ])),
183
- _: 1,
184
- __: [0]
185
- }, 8, ["disabled"])
186
- ])
187
- ])
188
- ]),
189
- _: 1
190
- }, 8, ["disabled"])
191
- ])
192
- ], 4));
193
- }
194
- });
195
- export {
196
- fe as default
197
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function e(t){const r=t==null?void 0:t.match(/(\[url\:(.*?)\])(.*)/);return r?{imageUrl:r[2],text:r[3]}:{imageUrl:"",text:t||""}}function a(t){const r=String(t||"").match(/(\[url\:.*?\])([\s\S]*)/);return r?r[2]:t}function n(t,r){return r?`[url:${r}]${t}`:t}exports.formatRemarkText=a;exports.parseRemarkText=e;exports.parseRemarkWithImage=n;
@@ -1,22 +0,0 @@
1
- function r(t) {
2
- const n = t == null ? void 0 : t.match(/(\[url\:(.*?)\])(.*)/);
3
- return n ? {
4
- imageUrl: n[2],
5
- text: n[3]
6
- } : {
7
- imageUrl: "",
8
- text: t || ""
9
- };
10
- }
11
- function u(t) {
12
- const n = String(t || "").match(/(\[url\:.*?\])([\s\S]*)/);
13
- return n ? n[2] : t;
14
- }
15
- function c(t, n) {
16
- return n ? `[url:${n}]${t}` : t;
17
- }
18
- export {
19
- u as formatRemarkText,
20
- r as parseRemarkText,
21
- c as parseRemarkWithImage
22
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const x=require("element-plus/es"),t=require("vue"),H=require("@element-plus/icons-vue"),g=require("element-plus"),ge=require("../utils/auth.cjs");;/* empty css */;/* empty css */const ye=require("../../_virtual/_plugin-vue_export-helper.cjs"),xe={class:"qy-upload__hint"},he=["placeholder","disabled"],Ve=["src"],we={key:1,class:"qy-upload__tip"},be={class:"error"},ke={class:"error"},Be=Object.assign({name:"QyUpload"},{__name:"index",props:{modelValue:{type:[Object,Array,String],default:void 0},defaultValue:{type:Object,default:()=>({files:"",text:""})},valueFormat:{type:String,default:"object"},showText:{type:Boolean,default:!0},showPasteInput:{type:Boolean,default:!1},pastePlaceholder:{type:String,default:"输入文字"},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},fileType:{type:Array,default:()=>[]},fileSize:{type:Number,default:10},limit:{type:Number,default:9},isShowTip:{type:Boolean,default:!1},api:{type:String,default:"/permission-api/common/uploads"},name:{type:String,default:"file"},tokenKey:{type:String,default:"Admin-Token"},supportVideo:{type:Boolean,default:!1},size:{type:String,default:"default"},disableDrag:{type:Boolean,default:!1},callBack:{type:Function,default:null},extraData:{type:Object,default:()=>({})}},emits:["update:modelValue","change","success","error","remove"],setup(d,{expose:W,emit:X}){const o=d,m=X,k=t.ref(null),r=t.ref([]),U=t.ref(null),K=t.ref(null),h=[];let C=!1;const M=t.ref(!1),D=t.ref([]),E=t.ref(0),V=t.ref(!1),L=t.ref(""),R=t.ref(""),B=new Set,N=t.ref(!1),f=t.ref(""),T=t.ref(!1);t.onMounted(()=>{o.modelValue===void 0&&j(o.defaultValue)});const Q=t.computed(()=>({large:"160px",default:"140px",small:"80px"})[o.size]??o.size),J=t.computed(()=>o.disabled),G=t.computed(()=>{var e;return o.isShowTip&&(o.fileSize||((e=v.value)==null?void 0:e.length))}),v=t.computed(()=>{var e;return(e=o.fileType)!=null&&e.length?o.fileType.map(l=>l.toLowerCase()):o.supportVideo?["mp4","mov","avi"]:["jpg","jpeg","png","gif","webp"]}),S=t.computed(()=>{const e=o.supportVideo?1:o.limit;return r.value.length>=e}),Y=t.computed(()=>v.value.map(e=>`.${e}`).join(",")),Z=t.computed(()=>({"qy-upload--reached-limit":S.value,"qy-upload--disabled":o.disabled,"qy-upload--video":o.supportVideo,"qy-upload--without-text":!o.showText&&!o.showPasteInput}));t.watch(f,()=>{C||w()}),t.watch(()=>o.modelValue,e=>{e!==void 0&&j(e)},{immediate:!0,deep:!0});function P(e){return Array.isArray(e)?e.filter(Boolean):e?String(e).split(",").filter(Boolean):[]}function ee(e){return Array.isArray(e)?{files:e,text:""}:typeof e=="string"?{files:P(e),text:""}:e&&typeof e=="object"?{files:P(e.files),text:e.text??""}:{files:[],text:""}}function te(e=[]){return e.map((l,i)=>({name:String(l).split("/").pop()||`file-${i}`,url:l,status:"success",uid:Date.now()+i}))}function le(e){const l=new Set(e.map(a=>a.url)),i=r.value.filter(a=>a.status==="uploading"&&!l.has(a.url));return[...e,...i]}function j(e){const l=ee(e);C=!0,f.value=l.text,r.value=le(te(l.files)),t.nextTick(()=>{C=!1})}function z(e){return o.valueFormat==="array"?e.files:o.valueFormat==="string"?e.files.join(","):e}function ae(){var e;(e=U.value)==null||e.focus()}function oe(e){e.target.value=""}function w(e){const a={files:(e??r.value).filter(n=>n.status==="success"&&n.url).map(n=>n.url),text:f.value};m("update:modelValue",z(a)),m("change",a),o.callBack&&o.callBack(a)}function ie(e,l){w(l),m("remove",e,l)}function ne(e){var a;if(!(e.size/1024/1024<o.fileSize))return g.ElMessage.warning(`文件大小不能超过${o.fileSize}M`),!1;const i=((a=e.name.split(".").pop())==null?void 0:a.toLowerCase())||"";return v.value.includes(i)?!0:(g.ElMessage.warning(`格式不支持,仅允许: ${v.value.join("/")}`),!1)}function I(e,l,i,a){var F,_;const n=o.api.startsWith("http")?o.api:window.location.origin+o.api.replace(/^([^/])/,"/$1"),c=new FormData;c.append(o.name,e),o.extraData&&Object.entries(o.extraData).forEach(([u,ve])=>c.append(u,ve));const s=new XMLHttpRequest;h.push(s);const y=((F=k.value)==null?void 0:F.$el.querySelector(".el-upload--picture-card"))||((_=k.value)==null?void 0:_.$el),q=g.ElLoading.service({target:y,text:"上传中",background:"rgba(255,255,255,0.7)"}),p=()=>{const u=h.indexOf(s);u!==-1&&h.splice(u,1),q.close()};s.open("POST",n);const A=ge.getToken(o.tokenKey);A&&s.setRequestHeader("Authorization",`Bearer ${A}`),s.upload.onprogress=u=>{u.total>0&&(l==null||l({percent:u.loaded/u.total*100}))},s.onload=()=>{if(p(),s.status<200||s.status>=300){const u=`上传失败 (HTTP ${s.status})`;g.ElMessage.error(u),m("error",{msg:u,status:s.status}),a==null||a(new Error(u));return}try{const u=JSON.parse(s.responseText);u.code===200&&u.urls?(g.ElMessage.success("上传成功"),i==null||i({...u,url:u.urls})):(g.ElMessage.error(u.msg||"上传失败"),m("error",u),a==null||a(u))}catch{g.ElMessage.error("上传失败,响应格式错误"),m("error",new Error("Response parse error")),a==null||a(new Error("Response parse error"))}},s.onerror=()=>{p(),g.ElMessage.error("上传失败,网络异常"),m("error",new Error("Network error")),a==null||a(new Error("Network error"))},s.send(c)}function O(e){return o.disabled?!1:ne(e)}function se(e,l){const i=r.value.find(a=>{var n;return a.uid===(e==null?void 0:e.uid)||((n=a.raw)==null?void 0:n.uid)===(e==null?void 0:e.uid)});i&&(i.url=l,i.status="success")}function re(e){I(e.file,e.onProgress,l=>{se(e.file,l.url),e.onSuccess(l),w(),m("success",l)},l=>e.onError(l))}function ue(e){var a;if(!e.url)return;const l=((a=e.url.split(".").pop())==null?void 0:a.toLowerCase())||"";if(["mp4","mov","avi","webm"].includes(l)){L.value=e.url,R.value=e.name||"视频预览",V.value=!0;return}const i=r.value.filter(n=>{var c;return n.status==="success"&&n.url&&!["mp4","mov","avi","webm"].includes((c=n.url.split(".").pop())==null?void 0:c.toLowerCase())});D.value=i.map(n=>n.url),E.value=i.findIndex(n=>n.uid===e.uid)||0,M.value=!0}function de(){M.value=!1,D.value=[]}function $(e){for(let l=0;l<e.length;l++){const i=e[l];if(!O(i))continue;const a=Date.now()+l,n=URL.createObjectURL(i);B.add(n),r.value.push({uid:a,name:i.name||`file-${a}`,status:"uploading",percentage:0,url:n}),I(i,c=>{const s=r.value.find(y=>y.uid===a);s&&(s.percentage=c.percent)},c=>{const s=r.value.find(y=>y.uid===a);s&&(s.status="success",s.url=c.url,w(),m("success",c))},()=>me(a))}}function b(e){var a;if(o.disabled)return;const l=(a=e.clipboardData)==null?void 0:a.items;if(!l)return;const i=[];for(let n=0;n<l.length;n++){const c=l[n];if(c.kind==="file"&&c.type.startsWith("image/")){const s=c.getAsFile();s&&i.push(s)}}i.length&&(e.preventDefault(),$(i))}function ce(){o.disabled||o.disableDrag||(N.value=!0)}function pe(){N.value=!1}function fe(e){var i;if(N.value=!1,o.disabled||o.disableDrag||S.value)return;const l=Array.from(((i=e.dataTransfer)==null?void 0:i.files)||[]).filter(a=>{var n;return v.value.includes((n=a.name.split(".").pop())==null?void 0:n.toLowerCase())});l.length&&$(l)}function me(e){var i;const l=r.value.findIndex(a=>a.uid===e);l!==-1&&((i=r.value[l].url)!=null&&i.startsWith("blob:")&&(URL.revokeObjectURL(r.value[l].url),B.delete(r.value[l].url)),r.value.splice(l,1))}return t.onBeforeUnmount(()=>{h.forEach(e=>e.abort()),h.length=0,B.forEach(e=>URL.revokeObjectURL(e)),B.clear()}),W({openFileDialog:()=>{var e,l;o.disabled||S.value||(l=(e=k.value)==null?void 0:e.$el.querySelector('input[type="file"]'))==null||l.click()},getPathList:()=>r.value.filter(e=>e.status==="success").map(e=>e.url),clearFiles:()=>{r.value=[],f.value="",w()},getValue:()=>({files:r.value.filter(e=>e.status==="success"&&e.url).map(e=>e.url),text:f.value}),getModelValue:()=>z({files:r.value.filter(e=>e.status==="success"&&e.url).map(e=>e.url),text:f.value})}),(e,l)=>{var q;const i=x.ElIcon,a=x.ElInput,n=x.ElPopover,c=x.ElUpload,s=x.ElImageViewer,y=x.ElDialog;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["qy-upload",Z.value]),style:t.normalizeStyle({"--qy-upload-size":Q.value})},[t.createVNode(c,{ref_key:"uploadRef",ref:k,"file-list":r.value,"onUpdate:fileList":l[6]||(l[6]=p=>r.value=p),action:"#",multiple:d.supportVideo?!1:d.multiple,limit:d.supportVideo?1:d.limit,"list-type":d.supportVideo?"text":"picture-card",accept:Y.value,disabled:J.value,"http-request":re,"before-upload":O,"on-preview":ue,"on-remove":ie},{default:t.withCtx(()=>[S.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["qy-upload__trigger",{"is-dragover":N.value}]),onPaste:b,onDragover:t.withModifiers(ce,["prevent"]),onDragleave:t.withModifiers(pe,["prevent"]),onDrop:t.withModifiers(fe,["prevent"])},[t.createVNode(i,{class:"qy-upload__icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(H.Plus))]),_:1}),d.supportVideo?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[l[9]||(l[9]=t.createElementVNode("span",{class:"qy-upload__label"},"点击上传视频",-1)),t.createElementVNode("span",xe,"支持 "+t.toDisplayString(v.value.join(" / "))+",不超过 "+t.toDisplayString(d.fileSize)+"MB",1)],64)):t.createCommentVNode("",!0),d.showText?(t.openBlock(),t.createElementBlock("div",{key:1,class:"qy-upload__text",onClick:l[3]||(l[3]=t.withModifiers(()=>{},["stop"])),onPaste:t.withModifiers(b,["stop"])},[t.createVNode(n,{visible:T.value,"onUpdate:visible":l[2]||(l[2]=p=>T.value=p),placement:"bottom-start",width:220,trigger:"click","popper-class":"qy-upload__text-popover",onAfterEnter:ae},{reference:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["qy-upload__text-preview",{"is-placeholder":!f.value}])},t.toDisplayString(f.value||d.pastePlaceholder),3)]),default:t.withCtx(()=>[t.createVNode(a,{ref_key:"inputRef",ref:U,modelValue:f.value,"onUpdate:modelValue":l[0]||(l[0]=p=>f.value=p),type:"textarea",autosize:{minRows:2,maxRows:5},placeholder:d.pastePlaceholder,disabled:d.disabled,onBlur:l[1]||(l[1]=p=>T.value=!1),onPaste:t.withModifiers(b,["stop"])},null,8,["modelValue","placeholder","disabled"])]),_:1},8,["visible"])],32)):d.showPasteInput?(t.openBlock(),t.createElementBlock("div",{key:2,class:"qy-upload__text",onClick:l[5]||(l[5]=t.withModifiers(()=>{},["stop"])),onPaste:t.withModifiers(b,["stop"])},[t.createElementVNode("input",{ref_key:"pasteInputRef",ref:K,class:"qy-upload__paste-input",placeholder:d.pastePlaceholder,disabled:d.disabled,onPaste:t.withModifiers(b,["stop"]),onInput:oe,onClick:l[4]||(l[4]=t.withModifiers(()=>{},["stop"]))},null,40,he)],32)):t.createCommentVNode("",!0)],34))]),_:1},8,["file-list","multiple","limit","list-type","accept","disabled"]),M.value?(t.openBlock(),t.createBlock(s,{key:0,"url-list":D.value,"initial-index":E.value,onClose:de},null,8,["url-list","initial-index"])):t.createCommentVNode("",!0),t.createVNode(y,{modelValue:V.value,"onUpdate:modelValue":l[7]||(l[7]=p=>V.value=p),title:R.value,width:"640px","append-to-body":"","destroy-on-close":"",onClose:l[8]||(l[8]=p=>V.value=!1)},{default:t.withCtx(()=>[V.value?(t.openBlock(),t.createElementBlock("video",{key:0,src:L.value,controls:"",autoplay:"",style:{width:"100%","max-height":"400px","border-radius":"4px"}},null,8,Ve)):t.createCommentVNode("",!0)]),_:1},8,["modelValue","title"]),G.value?(t.openBlock(),t.createElementBlock("div",we,[t.createVNode(i,null,{default:t.withCtx(()=>[t.createVNode(t.unref(H.InfoFilled))]),_:1}),t.createElementVNode("span",null,[l[12]||(l[12]=t.createTextVNode(" 请上传 ",-1)),d.fileSize?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[l[10]||(l[10]=t.createTextVNode("大小不超过 ",-1)),t.createElementVNode("b",be,t.toDisplayString(d.fileSize)+"MB",1)],64)):t.createCommentVNode("",!0),(q=v.value)!=null&&q.length?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[l[11]||(l[11]=t.createTextVNode(",格式为 ",-1)),t.createElementVNode("b",ke,t.toDisplayString(v.value.join("/")),1)],64)):t.createCommentVNode("",!0),l[13]||(l[13]=t.createTextVNode(" 的文件。 ",-1))])])):t.createCommentVNode("",!0)],6)}}}),Ne=ye.default(Be,[["__scopeId","data-v-1d6de9b6"]]);exports.default=Ne;