@qynpm/ui 1.0.42 → 1.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/qy-action-bar/index.cjs +1 -1
- package/dist/qy-action-bar/index.mjs +1 -1
- package/dist/qy-dialog/index.cjs +1 -1
- package/dist/qy-dialog/index.mjs +1 -1
- package/dist/qy-file-picker/index.cjs +1 -1
- package/dist/qy-file-picker/index.mjs +1 -1
- package/dist/qy-form-section/index.cjs +1 -1
- package/dist/qy-form-section/index.mjs +1 -1
- package/dist/qy-image-upload/index.cjs +1 -1
- package/dist/qy-image-upload/index.mjs +1 -1
- package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
- package/dist/qy-legacy-selection-dialog/index.mjs +1 -1
- package/dist/qy-pagination/index.cjs +1 -1
- package/dist/qy-pagination/index.mjs +1 -1
- package/dist/qy-record-quote-search/index.cjs +1 -1
- package/dist/qy-record-quote-search/index.mjs +1 -1
- package/dist/qy-remark-image/index.cjs +1 -1
- package/dist/qy-remark-image/index.mjs +1 -1
- package/dist/qy-remote-select/index.cjs +1 -1
- package/dist/qy-remote-select/index.mjs +1 -1
- package/dist/qy-search-input/index.cjs +1 -1
- package/dist/qy-search-input/index.mjs +1 -1
- package/dist/qy-selection-dialog/index.cjs +1 -1
- package/dist/qy-selection-dialog/index.mjs +1 -1
- package/dist/qy-upload/index.cjs +1 -1
- package/dist/qy-upload/index.mjs +1 -1
- package/dist/shared/{index-BPnHycGa.cjs → index-5dxbpQb_.cjs} +1 -1
- package/dist/shared/{index-BhvOSOfi.mjs → index-Bh9hxVFh.mjs} +2 -2
- package/dist/shared/{index-DAztNKSp.cjs → index-BweLwi2_.cjs} +1 -1
- package/dist/shared/index-C4F8hXzQ.mjs +338 -0
- package/dist/shared/index-CmgTSaFS.cjs +1 -0
- package/dist/shared/{index-DXZ6Y6wd.mjs → index-DNnWRAFl.mjs} +1 -1
- package/dist/shared/index-afOuq3YX.cjs +1 -0
- package/dist/shared/{index-QewoB6N4.mjs → index-rjciSHaR.mjs} +4 -4
- package/dist/shared/{index.vue_vue_type_style_index_0_lang-BXAUYDO7.mjs → index.vue_vue_type_style_index_0_lang-Bb3L64L8.mjs} +62 -60
- package/dist/shared/index.vue_vue_type_style_index_0_lang-D9-2GN18.cjs +1 -0
- package/package.json +2 -3
- package/dist/shared/index-DuP-b_eY.cjs +0 -1
- package/dist/shared/index-d76Z3yrB.cjs +0 -1
- package/dist/shared/index-zo5J-y0C.mjs +0 -157
- package/dist/shared/index.vue_vue_type_style_index_0_lang-Da67JRFL.cjs +0 -1
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import { defineComponent as x, computed as o, ref as y, onMounted as k, onUpdated as E, openBlock as S, createElementBlock as T, createVNode as _, unref as z, withCtx as N, createElementVNode as f, toDisplayString as P, createCommentVNode as B } from "vue";
|
|
2
|
+
import { ElConfigProvider as I, ElPagination as q } from "element-plus";
|
|
3
|
+
import { _ as w } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
var M = {
|
|
5
|
+
name: "zh-cn",
|
|
6
|
+
el: {
|
|
7
|
+
breadcrumb: { label: "面包屑" },
|
|
8
|
+
colorpicker: {
|
|
9
|
+
confirm: "确定",
|
|
10
|
+
clear: "清空",
|
|
11
|
+
defaultLabel: "颜色选择器",
|
|
12
|
+
description: "当前颜色 {color},按 Enter 键选择新颜色",
|
|
13
|
+
alphaLabel: "选择透明度的值",
|
|
14
|
+
alphaDescription: "透明度 {alpha}, 当前颜色 {color}",
|
|
15
|
+
hueLabel: "选择色相值",
|
|
16
|
+
hueDescription: "色相 {hue}, 当前颜色 {color}",
|
|
17
|
+
svLabel: "选择饱和度与明度的值",
|
|
18
|
+
svDescription: "饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",
|
|
19
|
+
predefineDescription: "选择 {value} 作为颜色"
|
|
20
|
+
},
|
|
21
|
+
datepicker: {
|
|
22
|
+
now: "此刻",
|
|
23
|
+
today: "今天",
|
|
24
|
+
cancel: "取消",
|
|
25
|
+
clear: "清空",
|
|
26
|
+
confirm: "确定",
|
|
27
|
+
dateTablePrompt: "使用方向键与 Enter 键可选择日期",
|
|
28
|
+
monthTablePrompt: "使用方向键与 Enter 键可选择月份",
|
|
29
|
+
quarterTablePrompt: "使用方向键与 Enter 键可选择季度",
|
|
30
|
+
yearTablePrompt: "使用方向键与 Enter 键可选择年份",
|
|
31
|
+
selectedDate: "已选日期",
|
|
32
|
+
selectDate: "选择日期",
|
|
33
|
+
selectTime: "选择时间",
|
|
34
|
+
startDate: "开始日期",
|
|
35
|
+
startTime: "开始时间",
|
|
36
|
+
endDate: "结束日期",
|
|
37
|
+
endTime: "结束时间",
|
|
38
|
+
prevYear: "前一年",
|
|
39
|
+
nextYear: "后一年",
|
|
40
|
+
prevMonth: "上个月",
|
|
41
|
+
nextMonth: "下个月",
|
|
42
|
+
year: "年",
|
|
43
|
+
month1: "1 月",
|
|
44
|
+
month2: "2 月",
|
|
45
|
+
month3: "3 月",
|
|
46
|
+
month4: "4 月",
|
|
47
|
+
month5: "5 月",
|
|
48
|
+
month6: "6 月",
|
|
49
|
+
month7: "7 月",
|
|
50
|
+
month8: "8 月",
|
|
51
|
+
month9: "9 月",
|
|
52
|
+
month10: "10 月",
|
|
53
|
+
month11: "11 月",
|
|
54
|
+
month12: "12 月",
|
|
55
|
+
weeks: {
|
|
56
|
+
sun: "日",
|
|
57
|
+
mon: "一",
|
|
58
|
+
tue: "二",
|
|
59
|
+
wed: "三",
|
|
60
|
+
thu: "四",
|
|
61
|
+
fri: "五",
|
|
62
|
+
sat: "六"
|
|
63
|
+
},
|
|
64
|
+
weeksFull: {
|
|
65
|
+
sun: "星期日",
|
|
66
|
+
mon: "星期一",
|
|
67
|
+
tue: "星期二",
|
|
68
|
+
wed: "星期三",
|
|
69
|
+
thu: "星期四",
|
|
70
|
+
fri: "星期五",
|
|
71
|
+
sat: "星期六"
|
|
72
|
+
},
|
|
73
|
+
months: {
|
|
74
|
+
jan: "一月",
|
|
75
|
+
feb: "二月",
|
|
76
|
+
mar: "三月",
|
|
77
|
+
apr: "四月",
|
|
78
|
+
may: "五月",
|
|
79
|
+
jun: "六月",
|
|
80
|
+
jul: "七月",
|
|
81
|
+
aug: "八月",
|
|
82
|
+
sep: "九月",
|
|
83
|
+
oct: "十月",
|
|
84
|
+
nov: "十一月",
|
|
85
|
+
dec: "十二月"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
input: { characters: "{count} / {max} 个字符" },
|
|
89
|
+
inputNumber: {
|
|
90
|
+
decrease: "减少数值",
|
|
91
|
+
increase: "增加数值"
|
|
92
|
+
},
|
|
93
|
+
select: {
|
|
94
|
+
loading: "加载中",
|
|
95
|
+
noMatch: "无匹配数据",
|
|
96
|
+
noData: "无数据",
|
|
97
|
+
placeholder: "请选择"
|
|
98
|
+
},
|
|
99
|
+
mention: { loading: "加载中" },
|
|
100
|
+
dropdown: { toggleDropdown: "切换下拉选项" },
|
|
101
|
+
cascader: {
|
|
102
|
+
noMatch: "无匹配数据",
|
|
103
|
+
loading: "加载中",
|
|
104
|
+
placeholder: "请选择",
|
|
105
|
+
noData: "暂无数据"
|
|
106
|
+
},
|
|
107
|
+
pagination: {
|
|
108
|
+
goto: "前往",
|
|
109
|
+
pagesize: "条/页",
|
|
110
|
+
total: "共 {total} 条",
|
|
111
|
+
pageClassifier: "页",
|
|
112
|
+
page: "页",
|
|
113
|
+
prev: "上一页",
|
|
114
|
+
next: "下一页",
|
|
115
|
+
currentPage: "第 {pager} 页",
|
|
116
|
+
prevPages: "向前 {pager} 页",
|
|
117
|
+
nextPages: "向后 {pager} 页",
|
|
118
|
+
deprecationWarning: "你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"
|
|
119
|
+
},
|
|
120
|
+
dialog: { close: "关闭此对话框" },
|
|
121
|
+
drawer: { close: "关闭此对话框" },
|
|
122
|
+
messagebox: {
|
|
123
|
+
title: "提示",
|
|
124
|
+
confirm: "确定",
|
|
125
|
+
cancel: "取消",
|
|
126
|
+
error: "输入的数据不合法!",
|
|
127
|
+
close: "关闭此对话框"
|
|
128
|
+
},
|
|
129
|
+
upload: {
|
|
130
|
+
deleteTip: "按 Delete 键可删除",
|
|
131
|
+
delete: "删除",
|
|
132
|
+
preview: "查看图片",
|
|
133
|
+
continue: "继续上传"
|
|
134
|
+
},
|
|
135
|
+
slider: {
|
|
136
|
+
defaultLabel: "滑块介于 {min} 至 {max}",
|
|
137
|
+
defaultRangeStartLabel: "选择起始值",
|
|
138
|
+
defaultRangeEndLabel: "选择结束值"
|
|
139
|
+
},
|
|
140
|
+
table: {
|
|
141
|
+
emptyText: "暂无数据",
|
|
142
|
+
confirmFilter: "筛选",
|
|
143
|
+
resetFilter: "重置",
|
|
144
|
+
clearFilter: "全部",
|
|
145
|
+
sumText: "合计",
|
|
146
|
+
selectAllLabel: "选择所有行",
|
|
147
|
+
selectRowLabel: "选择当前行",
|
|
148
|
+
expandRowLabel: "展开当前行",
|
|
149
|
+
collapseRowLabel: "收起当前行",
|
|
150
|
+
sortLabel: "按 {column} 排序",
|
|
151
|
+
filterLabel: "按 {column} 过滤"
|
|
152
|
+
},
|
|
153
|
+
tag: { close: "关闭此标签" },
|
|
154
|
+
tour: {
|
|
155
|
+
next: "下一步",
|
|
156
|
+
previous: "上一步",
|
|
157
|
+
finish: "结束导览",
|
|
158
|
+
close: "关闭此对话框"
|
|
159
|
+
},
|
|
160
|
+
tree: { emptyText: "暂无数据" },
|
|
161
|
+
transfer: {
|
|
162
|
+
noMatch: "无匹配数据",
|
|
163
|
+
noData: "无数据",
|
|
164
|
+
titles: ["列表 1", "列表 2"],
|
|
165
|
+
filterPlaceholder: "请输入搜索内容",
|
|
166
|
+
noCheckedFormat: "共 {total} 项",
|
|
167
|
+
hasCheckedFormat: "已选 {checked}/{total} 项"
|
|
168
|
+
},
|
|
169
|
+
image: { error: "加载失败" },
|
|
170
|
+
pageHeader: { title: "返回" },
|
|
171
|
+
popconfirm: {
|
|
172
|
+
confirmButtonText: "确定",
|
|
173
|
+
cancelButtonText: "取消"
|
|
174
|
+
},
|
|
175
|
+
carousel: {
|
|
176
|
+
leftArrow: "上一张幻灯片",
|
|
177
|
+
rightArrow: "下一张幻灯片",
|
|
178
|
+
indicator: "幻灯片切换至索引 {index}"
|
|
179
|
+
},
|
|
180
|
+
inputOTP: {
|
|
181
|
+
groupLabel: "一次性密码输入框",
|
|
182
|
+
defaultLabel: "请输入第 {index} 位 OTP 字符"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
const R = /* @__PURE__ */ x({
|
|
187
|
+
__name: "ElementPaginationRenderer",
|
|
188
|
+
props: {
|
|
189
|
+
total: {},
|
|
190
|
+
currentPage: {},
|
|
191
|
+
pageSize: {},
|
|
192
|
+
pageSizes: {},
|
|
193
|
+
disabled: { type: Boolean, default: !1 },
|
|
194
|
+
loading: { type: Boolean, default: !1 }
|
|
195
|
+
},
|
|
196
|
+
emits: ["page-change", "page-size-change"],
|
|
197
|
+
setup(r, { emit: v }) {
|
|
198
|
+
const a = r, p = v, u = o(() => a.disabled || a.loading), d = o(
|
|
199
|
+
() => a.pageSizes.length > 1 ? "sizes, prev, pager, next" : "prev, pager, next"
|
|
200
|
+
), i = y(null), h = y(null);
|
|
201
|
+
let s = 0;
|
|
202
|
+
function g() {
|
|
203
|
+
var n, c;
|
|
204
|
+
(c = (n = h.value) == null ? void 0 : n.querySelector('.el-pagination__sizes [role="combobox"]')) == null || c.setAttribute("aria-label", "每页条数");
|
|
205
|
+
}
|
|
206
|
+
k(g), E(g);
|
|
207
|
+
function b(n) {
|
|
208
|
+
if (!u.value) {
|
|
209
|
+
if (i.value !== null) {
|
|
210
|
+
i.value = null;
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
n !== a.currentPage && p("page-change", n);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
function m(n) {
|
|
217
|
+
if (u.value)
|
|
218
|
+
return;
|
|
219
|
+
i.value = n;
|
|
220
|
+
const c = ++s;
|
|
221
|
+
Promise.resolve().then(() => {
|
|
222
|
+
s === c && (i.value = null);
|
|
223
|
+
}), p("page-size-change", n);
|
|
224
|
+
}
|
|
225
|
+
return (n, c) => (S(), T("div", {
|
|
226
|
+
ref_key: "rendererRef",
|
|
227
|
+
ref: h,
|
|
228
|
+
class: "qy-pagination-element-renderer",
|
|
229
|
+
"data-testid": "qy-pagination-element-renderer"
|
|
230
|
+
}, [
|
|
231
|
+
_(z(I), { locale: z(M) }, {
|
|
232
|
+
default: N(() => [
|
|
233
|
+
_(z(q), {
|
|
234
|
+
layout: d.value,
|
|
235
|
+
total: r.total,
|
|
236
|
+
"current-page": r.currentPage,
|
|
237
|
+
"page-size": r.pageSize,
|
|
238
|
+
"page-sizes": [...r.pageSizes],
|
|
239
|
+
"pager-count": 7,
|
|
240
|
+
disabled: u.value,
|
|
241
|
+
teleported: !1,
|
|
242
|
+
"onUpdate:currentPage": b,
|
|
243
|
+
"onUpdate:pageSize": m
|
|
244
|
+
}, null, 8, ["layout", "total", "current-page", "page-size", "page-sizes", "disabled"])
|
|
245
|
+
]),
|
|
246
|
+
_: 1
|
|
247
|
+
}, 8, ["locale"])
|
|
248
|
+
], 512));
|
|
249
|
+
}
|
|
250
|
+
}), O = /* @__PURE__ */ w(R, [["__scopeId", "data-v-a27b6aaa"]]), F = ["aria-busy"], A = { class: "qy-pagination__info" }, U = { class: "qy-pagination__total" }, j = { class: "qy-pagination__summary" }, V = { class: "qy-pagination__controls" }, Y = /* @__PURE__ */ x({
|
|
251
|
+
__name: "index",
|
|
252
|
+
props: {
|
|
253
|
+
total: {},
|
|
254
|
+
page: {},
|
|
255
|
+
pageSize: {},
|
|
256
|
+
pageSizeOptions: { default: () => [10, 20, 50] },
|
|
257
|
+
hideOnSinglePage: { type: Boolean, default: !1 },
|
|
258
|
+
disabled: { type: Boolean },
|
|
259
|
+
loading: { type: Boolean },
|
|
260
|
+
binding: {}
|
|
261
|
+
},
|
|
262
|
+
emits: ["page-change", "page-size-change"],
|
|
263
|
+
setup(r, { emit: v }) {
|
|
264
|
+
const a = r, p = v;
|
|
265
|
+
function u(e, t) {
|
|
266
|
+
const l = Number(e);
|
|
267
|
+
return Number.isInteger(l) && l > 0 ? l : t;
|
|
268
|
+
}
|
|
269
|
+
const d = o(() => {
|
|
270
|
+
var t;
|
|
271
|
+
const e = Number(a.total ?? ((t = a.binding) == null ? void 0 : t.total) ?? 0);
|
|
272
|
+
return Number.isFinite(e) && e >= 0 ? e : 0;
|
|
273
|
+
}), i = o(
|
|
274
|
+
() => {
|
|
275
|
+
var e;
|
|
276
|
+
return u(a.pageSize ?? ((e = a.binding) == null ? void 0 : e.pageSize), 10);
|
|
277
|
+
}
|
|
278
|
+
), h = o(() => {
|
|
279
|
+
const t = (Array.isArray(a.pageSizeOptions) ? a.pageSizeOptions : []).map((l) => Number(l)).filter((l) => Number.isInteger(l) && l > 0);
|
|
280
|
+
return [.../* @__PURE__ */ new Set([...t, i.value])].sort(
|
|
281
|
+
(l, C) => l - C
|
|
282
|
+
);
|
|
283
|
+
}), s = o(
|
|
284
|
+
() => Math.max(1, Math.ceil(d.value / i.value))
|
|
285
|
+
), g = o(
|
|
286
|
+
() => {
|
|
287
|
+
var e;
|
|
288
|
+
return Math.min(
|
|
289
|
+
Math.max(1, u(a.page ?? ((e = a.binding) == null ? void 0 : e.page), 1)),
|
|
290
|
+
s.value
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
), b = o(() => {
|
|
294
|
+
var e;
|
|
295
|
+
return !!(a.disabled ?? ((e = a.binding) == null ? void 0 : e.disabled));
|
|
296
|
+
}), m = o(() => {
|
|
297
|
+
var e;
|
|
298
|
+
return !!(a.loading ?? ((e = a.binding) == null ? void 0 : e.loading));
|
|
299
|
+
}), n = o(() => b.value || m.value), c = o(
|
|
300
|
+
() => d.value > 0 && (!a.hideOnSinglePage || s.value > 1)
|
|
301
|
+
);
|
|
302
|
+
function L(e) {
|
|
303
|
+
var t;
|
|
304
|
+
n.value || !Number.isInteger(e) || e < 1 || e > s.value || e === g.value || ((t = a.binding) == null || t.setPage(e), p("page-change", e));
|
|
305
|
+
}
|
|
306
|
+
function D(e) {
|
|
307
|
+
var t;
|
|
308
|
+
n.value || !Number.isInteger(e) || e <= 0 || e === i.value || ((t = a.binding) == null || t.setPageSize(e), p("page-size-change", e));
|
|
309
|
+
}
|
|
310
|
+
return (e, t) => c.value ? (S(), T("nav", {
|
|
311
|
+
key: 0,
|
|
312
|
+
class: "qy-pagination",
|
|
313
|
+
"data-testid": "qy-pagination",
|
|
314
|
+
"aria-label": "分页",
|
|
315
|
+
"aria-busy": m.value ? "true" : void 0
|
|
316
|
+
}, [
|
|
317
|
+
f("div", A, [
|
|
318
|
+
f("span", U, "共 " + P(d.value) + " 条", 1),
|
|
319
|
+
f("span", j, " 第 " + P(g.value) + " / " + P(s.value) + " 页 ", 1)
|
|
320
|
+
]),
|
|
321
|
+
f("div", V, [
|
|
322
|
+
_(O, {
|
|
323
|
+
total: d.value,
|
|
324
|
+
"current-page": g.value,
|
|
325
|
+
"page-size": i.value,
|
|
326
|
+
"page-sizes": h.value,
|
|
327
|
+
disabled: b.value,
|
|
328
|
+
loading: m.value,
|
|
329
|
+
onPageChange: L,
|
|
330
|
+
onPageSizeChange: D
|
|
331
|
+
}, null, 8, ["total", "current-page", "page-size", "page-sizes", "disabled", "loading"])
|
|
332
|
+
])
|
|
333
|
+
], 8, F)) : B("", !0);
|
|
334
|
+
}
|
|
335
|
+
}), G = /* @__PURE__ */ w(Y, [["__scopeId", "data-v-b58990f5"]]);
|
|
336
|
+
export {
|
|
337
|
+
G as P
|
|
338
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),v=require("element-plus"),_=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");var x={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值",alphaDescription:"透明度 {alpha}, 当前颜色 {color}",hueLabel:"选择色相值",hueDescription:"色相 {hue}, 当前颜色 {color}",svLabel:"选择饱和度与明度的值",svDescription:"饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",predefineDescription:"选择 {value} 作为颜色"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",quarterTablePrompt:"使用方向键与 Enter 键可选择季度",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},input:{characters:"{count} / {max} 个字符"},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},mention:{loading:"加载中"},dropdown:{toggleDropdown:"切换下拉选项"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计",selectAllLabel:"选择所有行",selectRowLabel:"选择当前行",expandRowLabel:"展开当前行",collapseRowLabel:"收起当前行",sortLabel:"按 {column} 排序",filterLabel:"按 {column} 过滤"},tag:{close:"关闭此标签"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"},inputOTP:{groupLabel:"一次性密码输入框",defaultLabel:"请输入第 {index} 位 OTP 字符"}}};const S=e.defineComponent({__name:"ElementPaginationRenderer",props:{total:{},currentPage:{},pageSize:{},pageSizes:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["page-change","page-size-change"],setup(r,{emit:f}){const t=r,g=f,u=e.computed(()=>t.disabled||t.loading),d=e.computed(()=>t.pageSizes.length>1?"sizes, prev, pager, next":"prev, pager, next"),i=e.ref(null),h=e.ref(null);let s=0;function p(){var o,c;(c=(o=h.value)==null?void 0:o.querySelector('.el-pagination__sizes [role="combobox"]'))==null||c.setAttribute("aria-label","每页条数")}e.onMounted(p),e.onUpdated(p);function b(o){if(!u.value){if(i.value!==null){i.value=null;return}o!==t.currentPage&&g("page-change",o)}}function m(o){if(u.value)return;i.value=o;const c=++s;Promise.resolve().then(()=>{s===c&&(i.value=null)}),g("page-size-change",o)}return(o,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rendererRef",ref:h,class:"qy-pagination-element-renderer","data-testid":"qy-pagination-element-renderer"},[e.createVNode(e.unref(v.ElConfigProvider),{locale:e.unref(x)},{default:e.withCtx(()=>[e.createVNode(e.unref(v.ElPagination),{layout:d.value,total:r.total,"current-page":r.currentPage,"page-size":r.pageSize,"page-sizes":[...r.pageSizes],"pager-count":7,disabled:u.value,teleported:!1,"onUpdate:currentPage":b,"onUpdate:pageSize":m},null,8,["layout","total","current-page","page-size","page-sizes","disabled"])]),_:1},8,["locale"])],512))}}),D=_._export_sfc(S,[["__scopeId","data-v-a27b6aaa"]]),N=["aria-busy"],T={class:"qy-pagination__info"},w={class:"qy-pagination__total"},E={class:"qy-pagination__summary"},L={class:"qy-pagination__controls"},k=e.defineComponent({__name:"index",props:{total:{},page:{},pageSize:{},pageSizeOptions:{default:()=>[10,20,50]},hideOnSinglePage:{type:Boolean,default:!1},disabled:{type:Boolean},loading:{type:Boolean},binding:{}},emits:["page-change","page-size-change"],setup(r,{emit:f}){const t=r,g=f;function u(a,n){const l=Number(a);return Number.isInteger(l)&&l>0?l:n}const d=e.computed(()=>{var n;const a=Number(t.total??((n=t.binding)==null?void 0:n.total)??0);return Number.isFinite(a)&&a>=0?a:0}),i=e.computed(()=>{var a;return u(t.pageSize??((a=t.binding)==null?void 0:a.pageSize),10)}),h=e.computed(()=>{const n=(Array.isArray(t.pageSizeOptions)?t.pageSizeOptions:[]).map(l=>Number(l)).filter(l=>Number.isInteger(l)&&l>0);return[...new Set([...n,i.value])].sort((l,y)=>l-y)}),s=e.computed(()=>Math.max(1,Math.ceil(d.value/i.value))),p=e.computed(()=>{var a;return Math.min(Math.max(1,u(t.page??((a=t.binding)==null?void 0:a.page),1)),s.value)}),b=e.computed(()=>{var a;return!!(t.disabled??((a=t.binding)==null?void 0:a.disabled))}),m=e.computed(()=>{var a;return!!(t.loading??((a=t.binding)==null?void 0:a.loading))}),o=e.computed(()=>b.value||m.value),c=e.computed(()=>d.value>0&&(!t.hideOnSinglePage||s.value>1));function z(a){var n;o.value||!Number.isInteger(a)||a<1||a>s.value||a===p.value||((n=t.binding)==null||n.setPage(a),g("page-change",a))}function P(a){var n;o.value||!Number.isInteger(a)||a<=0||a===i.value||((n=t.binding)==null||n.setPageSize(a),g("page-size-change",a))}return(a,n)=>c.value?(e.openBlock(),e.createElementBlock("nav",{key:0,class:"qy-pagination","data-testid":"qy-pagination","aria-label":"分页","aria-busy":m.value?"true":void 0},[e.createElementVNode("div",T,[e.createElementVNode("span",w,"共 "+e.toDisplayString(d.value)+" 条",1),e.createElementVNode("span",E," 第 "+e.toDisplayString(p.value)+" / "+e.toDisplayString(s.value)+" 页 ",1)]),e.createElementVNode("div",L,[e.createVNode(D,{total:d.value,"current-page":p.value,"page-size":i.value,"page-sizes":h.value,disabled:b.value,loading:m.value,onPageChange:z,onPageSizeChange:P},null,8,["total","current-page","page-size","page-sizes","disabled","loading"])])],8,N)):e.createCommentVNode("",!0)}}),C=_._export_sfc(k,[["__scopeId","data-v-b58990f5"]]);exports.Pagination=C;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as q, ref as p, computed as B, openBlock as c, createElementBlock as u, normalizeClass as g, createVNode as S, withCtx as I, createElementVNode as h, withModifiers as t, withKeys as y, toDisplayString as K, createCommentVNode as k } from "vue";
|
|
2
|
-
import { U as M } from "./index-
|
|
2
|
+
import { U as M } from "./index-Bh9hxVFh.mjs";
|
|
3
3
|
import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
4
|
const U = ["tabindex", "aria-disabled", "onClick", "onKeydown"], _ = { class: "qy-file-picker__label" }, E = {
|
|
5
5
|
key: 0,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const C=require("element-plus"),l=require("vue"),de=require("@element-plus/icons-vue"),g=require("element-plus"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");/*! js-cookie v3.0.8 | MIT */function E(r){for(var x=1;x<arguments.length;x++){var k=arguments[x];for(var a in k)a!=="__proto__"&&(r[a]=k[a])}return r}var Ie={read:function(r){return r[0]==='"'&&(r=r.slice(1,-1)),r.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(r){return encodeURIComponent(r).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function H(r,x){function k(u,V,f){if(!(typeof document>"u")){f=E({},x,f),typeof f.expires=="number"&&(f.expires=new Date(Date.now()+f.expires*864e5)),f.expires&&(f.expires=f.expires.toUTCString()),u=encodeURIComponent(u).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var y="";for(var s in f)f[s]&&(y+="; "+s,f[s]!==!0&&(y+="="+f[s].split(";")[0]));return document.cookie=u+"="+r.write(V,u)+y}}function a(u){if(!(typeof document>"u"||arguments.length&&!u)){for(var V=document.cookie?document.cookie.split("; "):[],f={},y=0;y<V.length;y++){var s=V[y].split("="),S=s.slice(1).join("=");try{var b=decodeURIComponent(s[0]);if(b in f||(f[b]=r.read(S,b)),u===b)break}catch{}}return u?f[u]:f}}return Object.create({set:k,get:a,remove:function(u,V){k(u,"",E({},V,{expires:-1}))},withAttributes:function(u){return H(this.converter,E({},this.attributes,u))},withConverter:function(u){return H(E({},this.converter,u),this.attributes)}},{attributes:{value:Object.freeze(x)},converter:{value:Object.freeze(r)}})}var ce=H(Ie,{path:"/"});const Ae="Admin-Token";function Pe(r=Ae){return ce.get(r)}const _e=["accept","multiple","disabled"],Oe=["disabled"],$e={class:"qy-upload__hint"},Ke=["placeholder","disabled"],We=["src"],He={key:1,class:"qy-upload__tip"},Xe={class:"error"},Je={class:"error"},Qe=Object.assign({name:"QyUpload"},{__name:"index",props:{modelValue:{type:[Object,Array,String],default:void 0},selectedFiles:{type:Array,default:()=>[]},autoUpload:{type:Boolean,default:!0},variant:{type:String,default:"media-card"},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:()=>({})},uploadRequest:{type:Function,default:null}},emits:["update:modelValue","update:selectedFiles","selectedFilesChange","change","success","error","remove","invalid"],setup(r,{expose:x,emit:k}){const a=r,u=k,V=l.ref(null),f=l.ref(null),y=l.ref(null),s=l.ref([]),S=l.ref(null),b=l.ref(null),U=[],X=new WeakMap;let L=Date.now(),I=!1;const A=l.ref(!1),P=l.ref([]),J=l.ref(0),B=l.ref(!1),Q=l.ref(""),G=l.ref(""),q=new Set,D=l.ref(!1),h=l.ref(""),_=l.ref(!1);l.onMounted(()=>{a.modelValue!==void 0||!a.autoUpload||ee(a.defaultValue)});const pe=l.computed(()=>({large:"160px",default:"140px",small:"80px"})[a.size]??a.size),T=l.computed(()=>a.disabled),fe=l.computed(()=>s.value.some(e=>e.status==="uploading")),me=l.computed(()=>a.variant==="file-list"||a.supportVideo?"text":"picture-card"),ve=l.computed(()=>a.supportVideo?1:!a.autoUpload&&!a.multiple?2:a.limit),ge=l.computed(()=>{var e;return a.isShowTip&&(a.fileSize||((e=w.value)==null?void 0:e.length))}),w=l.computed(()=>{var e;return(e=a.fileType)!=null&&e.length?a.fileType.map(t=>String(t).trim().replace(/^\./,"").toLowerCase()).filter(Boolean):a.variant==="file-list"?[]:a.supportVideo?["mp4","mov","avi"]:["jpg","jpeg","png","gif","webp"]}),j=l.computed(()=>{if(!a.autoUpload&&!a.multiple)return!1;const e=a.supportVideo?1:a.limit;return s.value.length>=e}),Y=l.computed(()=>w.value.map(e=>`.${e}`).join(",")),ye=l.computed(()=>({"qy-upload--reached-limit":j.value,"qy-upload--disabled":a.disabled,"qy-upload--video":a.supportVideo,"qy-upload--without-text":!a.showText&&!a.showPasteInput}));l.watch(h,()=>{I||F()}),l.watch(()=>a.modelValue,e=>{a.autoUpload&&e!==void 0&&ee(e)},{immediate:!0,deep:!0}),l.watch(()=>[a.autoUpload,a.selectedFiles],([e,t])=>{e||(s.value=R(t))},{immediate:!0,deep:!0});function Z(e){return Array.isArray(e)?e.filter(Boolean):e?String(e).split(",").filter(Boolean):[]}function he(e){return Array.isArray(e)?{files:e,text:""}:typeof e=="string"?{files:Z(e),text:""}:e&&typeof e=="object"?{files:Z(e.files),text:e.text??""}:{files:[],text:""}}function we(e=[]){return e.map((t,n)=>({name:String(t).split("/").pop()||`file-${n}`,url:t,status:"success",uid:Date.now()+n}))}function R(e=[]){return e.filter(Boolean).map((t,n)=>{const i=l.toRaw(t);return{name:i.name,raw:i,status:"ready",uid:xe(i,n)}})}function xe(e,t){if(e.uid!=null)return e.uid;const n=X.get(e);return n??(L+=t+1,X.set(e,L),L)}function O(e=s.value){return e.map(t=>{const n=t.raw??(t instanceof File?t:null);return n?l.toRaw(n):null}).filter(Boolean)}function z(e){u("update:selectedFiles",e),u("selectedFilesChange",e)}function Ve(e,t){if(a.autoUpload)return;const n=e==null?void 0:e.raw;if(n&&!$(n)){s.value=R(a.selectedFiles);return}const i=O(t);n&&!i.includes(n)&&i.push(n);const o=a.multiple?i:i.slice(-1);s.value=R(o),z(o)}function ke(e){const t=new Set(e.map(i=>i.url)),n=s.value.filter(i=>(i.status==="ready"||i.status==="uploading")&&!t.has(i.url));return[...e,...n]}function ee(e){const t=he(e);I=!0,h.value=t.text,s.value=ke(we(t.files)),l.nextTick(()=>{I=!1})}function te(e){return a.valueFormat==="array"?e.files:a.valueFormat==="string"?e.files.join(","):e}function be(){var e;(e=S.value)==null||e.focus()}function Ue(e){e.target.value=""}function F(e){const i={files:(e??s.value).filter(o=>o.status==="success"&&o.url).map(o=>o.url),text:h.value};u("update:modelValue",te(i)),u("change",i),a.callBack&&a.callBack(i)}function Ce(e,t){if(!a.autoUpload){const n=O(t);s.value=R(n),z(n),u("remove",e,t);return}F(t),u("remove",e,t)}function le(e){var n;const t=(e==null?void 0:e.name)||"";return t.includes(".")&&((n=t.split(".").pop())==null?void 0:n.toLowerCase())||""}function ne(e){var o,d,p;const t=((d=(o=e==null?void 0:e.type)==null?void 0:o.toLowerCase)==null?void 0:d.call(o))||"",n={"image/jpeg":["jpg","jpeg"],"image/png":["png"],"image/gif":["gif"],"image/bmp":["bmp"],"image/webp":["webp"],"video/mp4":["mp4"],"video/quicktime":["mov"],"video/x-msvideo":["avi"],"video/webm":["webm"]};if(n[t])return n[t];const i=(p=t.split("/")[1])==null?void 0:p.split("+")[0];return i?[i]:[]}function Be(e){if(!w.value.length)return!0;const t=le(e),n=ne(e);return[t,...n].some(i=>w.value.includes(i))}function $(e){if(a.fileSize>0&&e.size>a.fileSize*1024*1024){const n={code:"size",file:e,message:`文件大小不能超过${a.fileSize}M`};return g.ElMessage.warning(n.message),u("invalid",n),!1}if(!Be(e)){const n={code:"extension",file:e,message:`格式不支持,仅允许: ${w.value.join("/")}`};return g.ElMessage.warning(n.message),u("invalid",n),!1}return!0}async function Re(e,t,n,i){const o=ae(e);try{const d=await a.uploadRequest({file:e,formData:o,api:a.api,name:a.name,tokenKey:a.tokenKey,extraData:a.extraData}),p=Fe(d);if(!p){const c=new Error("上传失败,未返回文件地址");g.ElMessage.error(c.message),u("error",c),n==null||n(c);return}g.ElMessage.success("上传成功"),t==null||t({...typeof d=="object"&&d?d:{},url:p})}catch(d){g.ElMessage.error("上传失败"),u("error",d),n==null||n(d)}finally{i.close()}}function ae(e){const t=new FormData;return t.append(a.name,e),a.extraData&&Object.entries(a.extraData).forEach(([n,i])=>t.append(n,i)),t}function Fe(e){var i,o;if(typeof e=="string")return e;const t=e||{},n=t.urls??t.url??((i=t.data)==null?void 0:i.urls)??((o=t.data)==null?void 0:o.url)??"";return Array.isArray(n)?n[0]||"":n||""}function ie(e,t,n,i){const o=g.ElLoading.service({target:f.value,text:"上传中",background:"rgba(255,255,255,0.7)"});if(a.uploadRequest){Re(e,n,i,o);return}const d=a.api.startsWith("http")?a.api:window.location.origin+a.api.replace(/^([^/])/,"/$1"),p=ae(e),c=new XMLHttpRequest;U.push(c);const N=()=>{const m=U.indexOf(c);m!==-1&&U.splice(m,1),o.close()};c.open("POST",d);const v=Pe(a.tokenKey);v&&c.setRequestHeader("Authorization",`Bearer ${v}`),c.upload.onprogress=m=>{m.total>0&&(t==null||t({percent:m.loaded/m.total*100}))},c.onload=()=>{if(N(),c.status<200||c.status>=300){const m=`上传失败 (HTTP ${c.status})`;g.ElMessage.error(m),u("error",{msg:m,status:c.status}),i==null||i(new Error(m));return}try{const m=JSON.parse(c.responseText);m.code===200&&m.urls?(g.ElMessage.success("上传成功"),n==null||n({...m,url:m.urls})):(g.ElMessage.error(m.msg||"上传失败"),u("error",m),i==null||i(m))}catch{g.ElMessage.error("上传失败,响应格式错误"),u("error",new Error("Response parse error")),i==null||i(new Error("Response parse error"))}},c.onerror=()=>{N(),g.ElMessage.error("上传失败,网络异常"),u("error",new Error("Network error")),i==null||i(new Error("Network error"))},c.send(p)}function oe(e){return a.disabled?!1:$(e)}function Me(e,t){const n=s.value.find(i=>{var o;return i.uid===(e==null?void 0:e.uid)||((o=i.raw)==null?void 0:o.uid)===(e==null?void 0:e.uid)});n&&(n.url=t,n.status="success")}function Ne(e){ie(e.file,e.onProgress,t=>{Me(e.file,t.url),e.onSuccess(t),F(),u("success",t)},t=>e.onError(t))}function Se(e){var i;if(!e.url)return;const t=((i=e.url.split(".").pop())==null?void 0:i.toLowerCase())||"";if(["mp4","mov","avi","webm"].includes(t)){Q.value=e.url,G.value=e.name||"视频预览",B.value=!0;return}const n=s.value.filter(o=>{var d;return o.status==="success"&&o.url&&!["mp4","mov","avi","webm"].includes((d=o.url.split(".").pop())==null?void 0:d.toLowerCase())});P.value=n.map(o=>o.url),J.value=n.findIndex(o=>o.uid===e.uid)||0,A.value=!0}function qe(){A.value=!1,P.value=[]}function De(e,t){if(e.name&&le(e))return e;const n=ne(e).find(i=>w.value.includes(i));return n?new File([e],`paste-${Date.now()+t}.${n}`,{type:e.type,lastModified:e.lastModified}):e}function K(e){if(!a.autoUpload){const t=O(),n=e.filter(o=>$(o));if(!n.length)return;const i=a.multiple?[...t,...n].slice(0,a.limit):n.slice(-1);s.value=R(i),z(i);return}for(let t=0;t<e.length;t++){const n=De(e[t],t);if(!oe(n))continue;const i=Date.now()+t,o=URL.createObjectURL(n);q.add(o),s.value.push({uid:i,name:n.name||`file-${i}`,status:"uploading",percentage:0,url:o}),ie(n,d=>{const p=s.value.find(c=>c.uid===i);p&&(p.percentage=d.percent)},d=>{const p=s.value.find(c=>c.uid===i);p&&(p.status="success",p.url=d.url,F(),u("success",d))},()=>ze(i))}}function Te(e){const t=e.target,n=Array.from(t.files||[]);if(t.value="",a.disabled||!n.length)return;const i=a.supportVideo||!a.multiple?n.slice(0,1):n;K(i)}function je(e){const t=Array.from((e==null?void 0:e.files)||[]).filter(d=>{var p;return(p=d.type)==null?void 0:p.startsWith("image/")});if(t.length)return t;const n=e==null?void 0:e.items;if(!n)return[];const i=[],o=new Set;for(let d=0;d<n.length;d++){const p=n[d];if(p.kind==="file"&&p.type.startsWith("image/")){const c=p.getAsFile();c&&!o.has(c)&&(o.add(c),i.push(c))}}return i}function M(e){if(a.disabled)return;const t=je(e.clipboardData);t.length&&(e.preventDefault(),K(t))}function re(){a.disabled||a.disableDrag||(D.value=!0)}function se(){D.value=!1}function ue(e){var n;if(D.value=!1,a.disabled||a.disableDrag||j.value)return;const t=Array.from(((n=e.dataTransfer)==null?void 0:n.files)||[]);t.length&&K(t)}function ze(e){var n;const t=s.value.findIndex(i=>i.uid===e);t!==-1&&((n=s.value[t].url)!=null&&n.startsWith("blob:")&&(URL.revokeObjectURL(s.value[t].url),q.delete(s.value[t].url)),s.value.splice(t,1))}l.onBeforeUnmount(()=>{U.forEach(e=>e.abort()),U.length=0,q.forEach(e=>URL.revokeObjectURL(e)),q.clear()});function W(){var e;a.disabled||j.value||(e=y.value)==null||e.click()}function Ee(){s.value=[],h.value="",z([]),a.autoUpload&&F()}return x({openFileDialog:W,getPathList:()=>s.value.filter(e=>e.status==="success").map(e=>e.url),clearFiles:Ee,getValue:()=>({files:s.value.filter(e=>e.status==="success"&&e.url).map(e=>e.url),text:h.value}),getModelValue:()=>te({files:s.value.filter(e=>e.status==="success"&&e.url).map(e=>e.url),text:h.value})}),(e,t)=>{var N;const n=C.ElIcon,i=C.ElInput,o=C.ElPopover,d=C.ElUpload,p=C.ElImageViewer,c=C.ElDialog;return l.openBlock(),l.createElementBlock("div",{ref_key:"rootRef",ref:f,class:l.normalizeClass(["qy-upload",ye.value]),style:l.normalizeStyle({"--qy-upload-size":pe.value})},[l.createElementVNode("input",{ref_key:"nativeInputRef",ref:y,class:"qy-upload__native-input",type:"file",accept:Y.value,multiple:r.supportVideo?!1:r.multiple,disabled:T.value,onChange:Te},null,40,_e),l.createVNode(d,{ref_key:"uploadRef",ref:V,"file-list":s.value,"onUpdate:fileList":t[7]||(t[7]=v=>s.value=v),action:"#",multiple:r.supportVideo?!1:r.multiple,limit:ve.value,"auto-upload":r.autoUpload,"list-type":me.value,accept:Y.value,disabled:T.value,"http-request":Ne,"before-upload":oe,"on-change":Ve,"on-preview":Se,"on-remove":Ce},l.createSlots({default:l.withCtx(()=>[r.variant!=="file-list"&&!j.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["qy-upload__trigger",{"is-dragover":D.value}]),onPaste:M,onDragover:l.withModifiers(re,["prevent"]),onDragleave:l.withModifiers(se,["prevent"]),onDrop:l.withModifiers(ue,["prevent"])},[l.createVNode(n,{class:"qy-upload__icon"},{default:l.withCtx(()=>[l.createVNode(l.unref(de.Plus))]),_:1}),r.supportVideo?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[t[10]||(t[10]=l.createElementVNode("span",{class:"qy-upload__label"},"点击上传视频",-1)),l.createElementVNode("span",$e,"支持 "+l.toDisplayString(w.value.join(" / "))+",不超过 "+l.toDisplayString(r.fileSize)+"MB",1)],64)):l.createCommentVNode("",!0),r.showText?(l.openBlock(),l.createElementBlock("div",{key:1,class:"qy-upload__text",onClick:t[4]||(t[4]=l.withModifiers(()=>{},["stop"])),onPaste:l.withModifiers(M,["stop"])},[l.createVNode(o,{visible:_.value,"onUpdate:visible":t[3]||(t[3]=v=>_.value=v),placement:"bottom-start",width:220,trigger:"click","popper-class":"qy-upload__text-popover",onAfterEnter:be},{reference:l.withCtx(()=>[l.createElementVNode("div",{class:l.normalizeClass(["qy-upload__text-preview",{"is-placeholder":!h.value}])},l.toDisplayString(h.value||r.pastePlaceholder),3)]),default:l.withCtx(()=>[l.createVNode(i,{ref_key:"inputRef",ref:S,modelValue:h.value,"onUpdate:modelValue":t[1]||(t[1]=v=>h.value=v),type:"textarea",autosize:{minRows:2,maxRows:5},placeholder:r.pastePlaceholder,disabled:r.disabled,onBlur:t[2]||(t[2]=v=>_.value=!1),onPaste:l.withModifiers(M,["stop"])},null,8,["modelValue","placeholder","disabled"])]),_:1},8,["visible"])],32)):r.showPasteInput?(l.openBlock(),l.createElementBlock("div",{key:2,class:"qy-upload__text",onClick:t[6]||(t[6]=l.withModifiers(()=>{},["stop"])),onPaste:l.withModifiers(M,["stop"])},[l.createElementVNode("input",{ref_key:"pasteInputRef",ref:b,class:"qy-upload__paste-input",placeholder:r.pastePlaceholder,disabled:r.disabled,onPaste:l.withModifiers(M,["stop"]),onInput:Ue,onClick:t[5]||(t[5]=l.withModifiers(()=>{},["stop"]))},null,40,Ke)],32)):l.createCommentVNode("",!0)],34)):l.createCommentVNode("",!0)]),_:2},[r.variant==="file-list"?{name:"trigger",fn:l.withCtx(()=>[l.createElementVNode("div",{class:"qy-upload__file-trigger",onClick:t[0]||(t[0]=l.withModifiers(()=>{},["stop"])),onDragover:l.withModifiers(re,["prevent"]),onDragleave:l.withModifiers(se,["prevent"]),onDrop:l.withModifiers(ue,["prevent"])},[l.renderSlot(e.$slots,"trigger",{open:W,disabled:T.value,uploading:fe.value},()=>[l.createElementVNode("button",{class:"qy-upload__file-button",type:"button",disabled:T.value,onClick:W}," 选择文件 ",8,Oe)],!0)],32)]),key:"0"}:void 0]),1032,["file-list","multiple","limit","auto-upload","list-type","accept","disabled"]),A.value?(l.openBlock(),l.createBlock(p,{key:0,"url-list":P.value,"initial-index":J.value,onClose:qe},null,8,["url-list","initial-index"])):l.createCommentVNode("",!0),l.createVNode(c,{modelValue:B.value,"onUpdate:modelValue":t[8]||(t[8]=v=>B.value=v),title:G.value,width:"640px","append-to-body":"","destroy-on-close":"",onClose:t[9]||(t[9]=v=>B.value=!1)},{default:l.withCtx(()=>[B.value?(l.openBlock(),l.createElementBlock("video",{key:0,src:Q.value,controls:"",autoplay:"",style:{width:"100%","max-height":"400px","border-radius":"4px"}},null,8,We)):l.createCommentVNode("",!0)]),_:1},8,["modelValue","title"]),ge.value?(l.openBlock(),l.createElementBlock("div",He,[l.createVNode(n,null,{default:l.withCtx(()=>[l.createVNode(l.unref(de.InfoFilled))]),_:1}),l.createElementVNode("span",null,[t[13]||(t[13]=l.createTextVNode(" 请上传 ",-1)),r.fileSize?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[t[11]||(t[11]=l.createTextVNode("大小不超过 ",-1)),l.createElementVNode("b",Xe,l.toDisplayString(r.fileSize)+"MB",1)],64)):l.createCommentVNode("",!0),(N=w.value)!=null&&N.length?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[t[12]||(t[12]=l.createTextVNode(",格式为 ",-1)),l.createElementVNode("b",Je,l.toDisplayString(w.value.join("/")),1)],64)):l.createCommentVNode("",!0),t[14]||(t[14]=l.createTextVNode(" 的文件。 ",-1))])])):l.createCommentVNode("",!0)],6)}}}),Ge=Le._export_sfc(Qe,[["__scopeId","data-v-3c99c409"]]);exports.Upload=Ge;exports.api=ce;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as Be } from "./index.vue_vue_type_style_index_0_lang-
|
|
2
|
-
import { U as Ke, a as va } from "./index-
|
|
1
|
+
import { _ as Be } from "./index.vue_vue_type_style_index_0_lang-Bb3L64L8.mjs";
|
|
2
|
+
import { U as Ke, a as va } from "./index-Bh9hxVFh.mjs";
|
|
3
3
|
import { I as ba } from "./index-CGq7Q_hV.mjs";
|
|
4
4
|
import { _ as Qa } from "./index.vue_vue_type_script_setup_true_lang-IyZesuKm.mjs";
|
|
5
5
|
import { useAttrs as ve, ref as z, computed as A, openBlock as v, createBlock as Z, mergeProps as ce, unref as S, defineComponent as he, watch as ae, onMounted as Sa, nextTick as qe, onUnmounted as wa, createElementBlock as I, normalizeStyle as _e, normalizeClass as pe, createElementVNode as X, withCtx as h, Fragment as $e, renderList as Te, createCommentVNode as T, createVNode as D, createTextVNode as ne, onBeforeUnmount as ka, createSlots as Ie, renderSlot as k, normalizeProps as Me, guardReactiveProps as Ee, withKeys as Fe, toDisplayString as ue, useSlots as $a, getCurrentInstance as Ca, reactive as Ae, withModifiers as Re, withDirectives as Le, vShow as Va } from "vue";
|
|
@@ -23,7 +23,7 @@ import { S as Oe } from "./index-Co84fsS5.mjs";
|
|
|
23
23
|
import { T as We } from "./index-CiE6qJCJ.mjs";
|
|
24
24
|
import { ElLoadingDirective as Ga } from "element-plus/es";
|
|
25
25
|
import { T as Pe } from "./index-B3YHS3Aa.mjs";
|
|
26
|
-
import { F as Ha } from "./index-
|
|
26
|
+
import { F as Ha } from "./index-DNnWRAFl.mjs";
|
|
27
27
|
import { S as Ja } from "./index-BEcS8y8g.mjs";
|
|
28
28
|
import { _ as Za } from "./index.vue_vue_type_script_lang-DIKHRo0o.mjs";
|
|
29
29
|
import { _ as Xa } from "./index.vue_vue_type_style_index_0_lang-CPxbKjvY.mjs";
|
|
@@ -62,7 +62,7 @@ import { _ as qo } from "./index.vue_vue_type_script_lang-BGAdXWIL.mjs";
|
|
|
62
62
|
import { _ as To } from "./index.vue_vue_type_script_lang-BnmY1ndj.mjs";
|
|
63
63
|
import { _ as Io } from "./index.vue_vue_type_script_lang-DOOT2grg.mjs";
|
|
64
64
|
import { _ as Fo } from "./index.vue_vue_type_style_index_0_lang-KHk9wRYT.mjs";
|
|
65
|
-
import { P as Ro } from "./index-
|
|
65
|
+
import { P as Ro } from "./index-C4F8hXzQ.mjs";
|
|
66
66
|
import { w as c } from "./install-CxBnxbuN.mjs";
|
|
67
67
|
import { v as Oo, Q as He } from "./index-B1zDCCqy.mjs";
|
|
68
68
|
import { _ as xo } from "./index.vue_vue_type_script_setup_true_lang-wG7OTsWa.mjs";
|