yc-vep-ui 0.3.55 → 0.3.57

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.
@@ -2192,7 +2192,7 @@ var _hoisted_1$4 = { style: {
2192
2192
  }), StaffSelect_exports = /* @__PURE__ */ __exportAll$1({ default: () => StaffSelect_default }), StaffSelect_default = index_vue_vue_type_script_setup_true_lang_default$3, _hoisted_1$3 = { class: "file-left" }, _hoisted_2$1 = { class: "file-name" }, _hoisted_3 = {
2193
2193
  key: 0,
2194
2194
  class: "file-size"
2195
- }, _hoisted_4 = ["onClick"], _hoisted_5 = ["onClick"], _hoisted_6 = { class: "file-actions" }, _hoisted_7 = {
2195
+ }, _hoisted_4 = ["onClick"], _hoisted_5 = ["onClick"], _hoisted_6 = ["onClick"], _hoisted_7 = { class: "file-actions" }, _hoisted_8 = {
2196
2196
  key: 0,
2197
2197
  class: "success-icon"
2198
2198
  }, file_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
@@ -2212,37 +2212,41 @@ var _hoisted_1$4 = { style: {
2212
2212
  showSuccessStatus: { type: Boolean }
2213
2213
  },
2214
2214
  setup(e) {
2215
- let n = e, r = useAttrs(), { text: i = "选择文件", icon: a = void 0, size: o = "default" } = n, s = r.disabled, c = r.onRemove, l = computed(() => r.showSuccessStatus !== !1), u = ref(n.fileList || []);
2215
+ let n = e, r = useAttrs(), { text: i = "选择文件", icon: a = void 0, size: o = "default", accept: s } = n, c = r.disabled, l = r.onRemove, u = computed(() => r.showSuccessStatus !== !1), d = ref(n.fileList || []);
2216
2216
  watch(() => n.fileList, (e) => {
2217
- u.value = e || [];
2217
+ d.value = e || [];
2218
2218
  }, {
2219
2219
  immediate: !0,
2220
2220
  deep: !0
2221
2221
  });
2222
- let d = computed(() => !1), f = computed(() => n.limit !== void 0 && r.count >= n.limit), p = computed(() => n.limit !== void 0 && r.count >= n.limit), m = computed(() => u.value.some((e) => e.status === "uploading"));
2223
- function g(e) {
2224
- return e < 1024 ? e + "B" : e < 1024 * 1024 ? (e / 1024).toFixed(2) + "KB" : e < 1024 * 1024 * 1024 ? (e / (1024 * 1024)).toFixed(2) + "MB" : (e / (1024 * 1024 * 1024)).toFixed(2) + "GB";
2225
- }
2222
+ let f = computed(() => !1), p = computed(() => n.limit !== void 0 && r.count >= n.limit), m = computed(() => n.limit !== void 0 && r.count >= n.limit), g = computed(() => d.value.some((e) => e.status === "uploading"));
2226
2223
  function _(e) {
2227
- let n = u.value.indexOf(e);
2228
- n > -1 && (u.value.splice(n, 1), c && c(e, [...u.value]));
2224
+ return e < 1024 ? e + "B" : e < 1024 * 1024 ? (e / 1024).toFixed(2) + "KB" : e < 1024 * 1024 * 1024 ? (e / (1024 * 1024)).toFixed(2) + "MB" : (e / (1024 * 1024 * 1024)).toFixed(2) + "GB";
2229
2225
  }
2230
2226
  function v(e) {
2227
+ let n = d.value.indexOf(e);
2228
+ n > -1 && (d.value.splice(n, 1), l && l(e, [...d.value]));
2229
+ }
2230
+ function y(e) {
2231
2231
  if (!e.downloadUrl) return;
2232
2232
  let n = document.createElement("a");
2233
2233
  n.href = e.downloadUrl, n.download = e.name || "download", document.body.appendChild(n), n.click(), document.body.removeChild(n);
2234
2234
  }
2235
+ function b(e) {
2236
+ e.downloadUrl && navigator.clipboard.writeText(e.downloadUrl);
2237
+ }
2235
2238
  return (e, r) => {
2236
- let c = resolveComponent("el-button"), y = resolveComponent("el-upload");
2237
- return openBlock(), createBlock(y, mergeProps(e.$attrs, {
2239
+ let l = resolveComponent("el-button"), x = resolveComponent("el-upload");
2240
+ return openBlock(), createBlock(x, mergeProps(e.$attrs, {
2238
2241
  style: { width: "100%" },
2239
2242
  action: n.action,
2240
- "file-list": u.value,
2241
- "onUpdate:fileList": r[0] ||= (e) => u.value = e,
2243
+ "file-list": d.value,
2244
+ "onUpdate:fileList": r[0] ||= (e) => d.value = e,
2242
2245
  limit: n.limit,
2246
+ accept: unref(s),
2243
2247
  class: {
2244
- "hide-upload-list": d.value,
2245
- "hide-upload-text": f.value
2248
+ "hide-upload-list": f.value,
2249
+ "hide-upload-text": p.value
2246
2250
  }
2247
2251
  }), createSlots({
2248
2252
  file: withCtx(({ file: e }) => [createElementVNode("div", { class: normalizeClass(["upload-file-item", { "is-success": e.status === "success" }]) }, [createElementVNode("div", _hoisted_1$3, [
@@ -2255,17 +2259,22 @@ var _hoisted_1$4 = { style: {
2255
2259
  fill: "currentColor"
2256
2260
  })])], -1),
2257
2261
  createElementVNode("span", _hoisted_2$1, toDisplayString(e.name), 1),
2258
- e.size ? (openBlock(), createElementBlock("span", _hoisted_3, "(" + toDisplayString(g(e.size)) + ")", 1)) : createCommentVNode("", !0),
2262
+ e.size ? (openBlock(), createElementBlock("span", _hoisted_3, "(" + toDisplayString(_(e.size)) + ")", 1)) : createCommentVNode("", !0),
2259
2263
  e.downloadUrl ? (openBlock(), createElementBlock("span", {
2260
2264
  key: 1,
2261
2265
  class: "download-btn",
2262
- onClick: withModifiers((n) => v(e), ["stop"])
2266
+ onClick: withModifiers((n) => y(e), ["stop"])
2263
2267
  }, "下载", 8, _hoisted_4)) : createCommentVNode("", !0),
2268
+ e.downloadUrl ? (openBlock(), createElementBlock("span", {
2269
+ key: 2,
2270
+ class: "copy-btn",
2271
+ onClick: withModifiers((n) => b(e), ["stop"])
2272
+ }, "复制", 8, _hoisted_5)) : createCommentVNode("", !0),
2264
2273
  createElementVNode("span", {
2265
2274
  class: "remove-btn",
2266
- onClick: withModifiers((n) => _(e), ["stop"])
2267
- }, "删除", 8, _hoisted_5)
2268
- ]), createElementVNode("div", _hoisted_6, [l.value !== !1 && (e.status === "success" || !e.status) ? (openBlock(), createElementBlock("span", _hoisted_7, [...r[2] ||= [createElementVNode("svg", {
2275
+ onClick: withModifiers((n) => v(e), ["stop"])
2276
+ }, "删除", 8, _hoisted_6)
2277
+ ]), createElementVNode("div", _hoisted_7, [u.value !== !1 && (e.status === "success" || !e.status) ? (openBlock(), createElementBlock("span", _hoisted_8, [...r[2] ||= [createElementVNode("svg", {
2269
2278
  viewBox: "0 0 1024 1024",
2270
2279
  width: "16",
2271
2280
  height: "16"
@@ -2275,15 +2284,15 @@ var _hoisted_1$4 = { style: {
2275
2284
  })], -1)]])) : createCommentVNode("", !0)])], 2)]),
2276
2285
  default: withCtx(() => [renderSlot(e.$slots, "tip", {}, void 0, !0)]),
2277
2286
  _: 2
2278
- }, [p.value ? void 0 : {
2287
+ }, [m.value ? void 0 : {
2279
2288
  name: "trigger",
2280
- fn: withCtx(() => [createVNode(c, {
2289
+ fn: withCtx(() => [createVNode(l, {
2281
2290
  type: "primary",
2282
2291
  plain: "",
2283
2292
  icon: unref(a),
2284
2293
  size: unref(o),
2285
- disabled: unref(s),
2286
- loading: m.value
2294
+ disabled: unref(c),
2295
+ loading: g.value
2287
2296
  }, {
2288
2297
  default: withCtx(() => [createTextVNode(toDisplayString(unref(i)), 1)]),
2289
2298
  _: 1
@@ -2298,11 +2307,12 @@ var _hoisted_1$4 = { style: {
2298
2307
  "action",
2299
2308
  "file-list",
2300
2309
  "limit",
2310
+ "accept",
2301
2311
  "class"
2302
2312
  ]);
2303
2313
  };
2304
2314
  }
2305
- }), file_default = /* @__PURE__ */ _plugin_vue_export_helper_default(file_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-b275fceb"]]), _hoisted_1$2 = ["src"], image_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
2315
+ }), file_default = /* @__PURE__ */ _plugin_vue_export_helper_default(file_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-4574e399"]]), _hoisted_1$2 = ["src"], image_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
2306
2316
  __name: "image",
2307
2317
  props: {
2308
2318
  icon: {},
@@ -2392,7 +2402,9 @@ var _hoisted_1$4 = { style: {
2392
2402
  "remove"
2393
2403
  ],
2394
2404
  setup(e, { emit: n }) {
2395
- let r = n, i = e, { type: a = "file", onChange: o, limit: s, action: c, data: l, prop: u, fileList: d, accept: f, ...p } = i, m = c || baseUrl + "/attachment/uploadAttachment", g = { token: localStorage.getItem("TOKEN") || "" }, _ = computed(() => {
2405
+ let r = n, i = e, { type: a = "file", onChange: o, limit: s, action: c, data: l, prop: u, fileList: d, accept: f, ...p } = i;
2406
+ console.log("accept ->>", f);
2407
+ let m = c || baseUrl + "/attachment/uploadAttachment", g = { token: localStorage.getItem("TOKEN") || "" }, _ = computed(() => {
2396
2408
  if (!f) return null;
2397
2409
  let e = [], n = [];
2398
2410
  return f.split(",").forEach((r) => {
@@ -1,2 +1,2 @@
1
- import { c as e, d as t, f as n, l as r, s as i, u as a } from "../entry-BxTCv3y1.js";
1
+ import { c as e, d as t, f as n, l as r, s as i, u as a } from "../entry-Bf4oz2ae.js";
2
2
  export { e as useDictionary, n as useFetch, r as useRoute, a as useRouter, t as useTable, i as useUser };
package/dist/index.css CHANGED
@@ -176,13 +176,13 @@
176
176
  }
177
177
  }
178
178
 
179
- .hide-upload-text[data-v-b275fceb] .el-upload--text {
179
+ .hide-upload-text[data-v-4574e399] .el-upload--text {
180
180
  display: none;
181
181
  }
182
- .hide-upload-list[data-v-b275fceb] .el-upload-list {
182
+ .hide-upload-list[data-v-4574e399] .el-upload-list {
183
183
  display: none;
184
184
  }
185
- .upload-file-item[data-v-b275fceb] {
185
+ .upload-file-item[data-v-4574e399] {
186
186
  display: flex;
187
187
  align-items: center;
188
188
  justify-content: space-between;
@@ -190,13 +190,13 @@
190
190
  font-size: 14px;
191
191
  line-height: 1.5;
192
192
  }
193
- .file-left[data-v-b275fceb] {
193
+ .file-left[data-v-4574e399] {
194
194
  display: flex;
195
195
  align-items: center;
196
196
  flex: 1;
197
197
  overflow: hidden;
198
198
  }
199
- .file-icon[data-v-b275fceb] {
199
+ .file-icon[data-v-4574e399] {
200
200
  display: flex;
201
201
  align-items: center;
202
202
  margin-right: 8px;
@@ -205,7 +205,7 @@
205
205
  width: 14px;
206
206
  height: auto;
207
207
  }
208
- .file-name[data-v-b275fceb] {
208
+ .file-name[data-v-4574e399] {
209
209
  color: #606266;
210
210
  overflow: hidden;
211
211
  text-overflow: ellipsis;
@@ -214,7 +214,7 @@
214
214
  display: inline-flex;
215
215
  align-items: center;
216
216
  }
217
- .file-size[data-v-b275fceb] {
217
+ .file-size[data-v-4574e399] {
218
218
  color: #909399;
219
219
  margin-left: 4px;
220
220
  font-size: 12px;
@@ -223,18 +223,20 @@
223
223
  display: inline-flex;
224
224
  align-items: center;
225
225
  }
226
- .file-actions[data-v-b275fceb] {
226
+ .file-actions[data-v-4574e399] {
227
227
  display: flex;
228
228
  align-items: center;
229
229
  gap: 8px;
230
230
  margin-left: 8px;
231
231
  flex-shrink: 0;
232
232
  }
233
- .success-icon[data-v-b275fceb] {
233
+ .success-icon[data-v-4574e399] {
234
234
  display: flex;
235
235
  align-items: center;
236
236
  }
237
- .download-btn[data-v-b275fceb] {
237
+ .download-btn[data-v-4574e399],
238
+ .copy-btn[data-v-4574e399],
239
+ .remove-btn[data-v-4574e399] {
238
240
  display: inline-flex;
239
241
  align-items: center;
240
242
  cursor: pointer;
@@ -242,55 +244,45 @@
242
244
  opacity: 0;
243
245
  transition: opacity 0.3s, color 0.3s;
244
246
  font-size: 12px;
245
- margin-left: 15px;
247
+ margin-left: 10px;
246
248
  }
247
- .file-left:hover .download-btn[data-v-b275fceb] {
249
+ .file-left:hover .download-btn[data-v-4574e399],
250
+ .file-left:hover .copy-btn[data-v-4574e399],
251
+ .file-left:hover .remove-btn[data-v-4574e399] {
248
252
  opacity: 1;
249
253
  }
250
- .download-btn[data-v-b275fceb]:hover {
254
+ .download-btn[data-v-4574e399]:hover,
255
+ .copy-btn[data-v-4574e399]:hover {
251
256
  color: #409eff;
252
257
  }
253
- .remove-btn[data-v-b275fceb] {
254
- display: inline-flex;
255
- align-items: center;
256
- cursor: pointer;
257
- color: #909399;
258
- opacity: 0;
259
- transition: opacity 0.3s, color 0.3s;
260
- font-size: 12px;
261
- margin-left: 15px;
262
- }
263
- .file-left:hover .remove-btn[data-v-b275fceb] {
264
- opacity: 1;
265
- }
266
- .remove-btn[data-v-b275fceb]:hover {
258
+ .remove-btn[data-v-4574e399]:hover {
267
259
  color: #f56c6c;
268
260
  }
269
261
 
270
262
  /* 隐藏 Element Plus 默认的文件列表样式 */
271
- [data-v-b275fceb] .el-upload-list__item {
263
+ [data-v-4574e399] .el-upload-list__item {
272
264
  padding: 0;
273
265
  border: none;
274
266
  background: transparent;
275
267
  }
276
- [data-v-b275fceb] .el-upload-list__item-name {
268
+ [data-v-4574e399] .el-upload-list__item-name {
277
269
  display: none;
278
270
  }
279
- [data-v-b275fceb] .el-upload-list__item-status-label {
271
+ [data-v-4574e399] .el-upload-list__item-status-label {
280
272
  display: none;
281
273
  }
282
- [data-v-b275fceb] .el-upload-list__item .el-icon--close {
274
+ [data-v-4574e399] .el-upload-list__item .el-icon--close {
283
275
  display: none;
284
276
  }
285
- [data-v-b275fceb] .el-upload-list__item.is-success .el-upload-list__item-status-label {
277
+ [data-v-4574e399] .el-upload-list__item.is-success .el-upload-list__item-status-label {
286
278
  display: none;
287
279
  }
288
280
 
289
281
  /* 隐藏默认的圆点 */
290
- [data-v-b275fceb] .el-upload-list {
282
+ [data-v-4574e399] .el-upload-list {
291
283
  list-style: none;
292
284
  }
293
- [data-v-b275fceb] .el-upload-list__item::before {
285
+ [data-v-4574e399] .el-upload-list__item::before {
294
286
  display: none !important;
295
287
  }
296
288
 
@@ -1,2 +1,2 @@
1
- import { O as e, _ as t, b as n, v as r, y as i } from "../entry-BxTCv3y1.js";
1
+ import { O as e, _ as t, b as n, v as r, y as i } from "../entry-Bf4oz2ae.js";
2
2
  export { t as baseUrl, n as request, e as tempToRender, r as uniq, i as uniqBy };
package/dist/vep-ui.js CHANGED
@@ -1,2 +1,2 @@
1
- import { A as e, C as t, D as n, E as r, S as i, T as a, a as o, g as s, h as c, i as l, k as u, m as d, n as f, o as p, p as m, r as h, t as g, w as _, x as v } from "./entry-BxTCv3y1.js";
1
+ import { A as e, C as t, D as n, E as r, S as i, T as a, a as o, g as s, h as c, i as l, k as u, m as d, n as f, o as p, p as m, r as h, t as g, w as _, x as v } from "./entry-Bf4oz2ae.js";
2
2
  export { e as UiCard, i as UiDescriptions, v as UiDialog, a as UiEditor, n as UiFilter, r as UiForm, t as UiInfiniteScroll, d as UiStaffSelect, u as UiTable, _ as UiTree, m as UiUpload, s as WcUtils, o as YcApproval, c as YcMessage, l as YcPageAgent, h as default, h as ycPlugin, g as getHostVue, p as hooks, f as setHostVue };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yc-vep-ui",
3
- "version": "0.3.55",
3
+ "version": "0.3.57",
4
4
  "type": "module",
5
5
  "description": "基于 Vue 3 + Element Plus 的企业级 UI 组件库",
6
6
  "keywords": [
@@ -38,6 +38,12 @@
38
38
  "dist",
39
39
  "README.md"
40
40
  ],
41
+ "scripts": {
42
+ "dev": "vite",
43
+ "build": "vue-tsc && vite build",
44
+ "build:lib": "vite build && node scripts/generate-entry-dts.cjs",
45
+ "preview": "vite preview"
46
+ },
41
47
  "dependencies": {
42
48
  "aieditor": "^1.4.0",
43
49
  "jsencrypt": "^3.5.4",
@@ -67,11 +73,5 @@
67
73
  },
68
74
  "sideEffects": [
69
75
  "**/*.css"
70
- ],
71
- "scripts": {
72
- "dev": "vite",
73
- "build": "vue-tsc && vite build",
74
- "build:lib": "vite build && node scripts/generate-entry-dts.cjs",
75
- "preview": "vite preview"
76
- }
77
- }
76
+ ]
77
+ }