yc-vep-ui 0.3.55 → 0.3.56

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.
@@ -2212,37 +2212,38 @@ 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
2235
  return (e, r) => {
2236
- let c = resolveComponent("el-button"), y = resolveComponent("el-upload");
2237
- return openBlock(), createBlock(y, mergeProps(e.$attrs, {
2236
+ let l = resolveComponent("el-button"), b = resolveComponent("el-upload");
2237
+ return openBlock(), createBlock(b, mergeProps(e.$attrs, {
2238
2238
  style: { width: "100%" },
2239
2239
  action: n.action,
2240
- "file-list": u.value,
2241
- "onUpdate:fileList": r[0] ||= (e) => u.value = e,
2240
+ "file-list": d.value,
2241
+ "onUpdate:fileList": r[0] ||= (e) => d.value = e,
2242
2242
  limit: n.limit,
2243
+ accept: unref(s),
2243
2244
  class: {
2244
- "hide-upload-list": d.value,
2245
- "hide-upload-text": f.value
2245
+ "hide-upload-list": f.value,
2246
+ "hide-upload-text": p.value
2246
2247
  }
2247
2248
  }), createSlots({
2248
2249
  file: withCtx(({ file: e }) => [createElementVNode("div", { class: normalizeClass(["upload-file-item", { "is-success": e.status === "success" }]) }, [createElementVNode("div", _hoisted_1$3, [
@@ -2255,17 +2256,17 @@ var _hoisted_1$4 = { style: {
2255
2256
  fill: "currentColor"
2256
2257
  })])], -1),
2257
2258
  createElementVNode("span", _hoisted_2$1, toDisplayString(e.name), 1),
2258
- e.size ? (openBlock(), createElementBlock("span", _hoisted_3, "(" + toDisplayString(g(e.size)) + ")", 1)) : createCommentVNode("", !0),
2259
+ e.size ? (openBlock(), createElementBlock("span", _hoisted_3, "(" + toDisplayString(_(e.size)) + ")", 1)) : createCommentVNode("", !0),
2259
2260
  e.downloadUrl ? (openBlock(), createElementBlock("span", {
2260
2261
  key: 1,
2261
2262
  class: "download-btn",
2262
- onClick: withModifiers((n) => v(e), ["stop"])
2263
+ onClick: withModifiers((n) => y(e), ["stop"])
2263
2264
  }, "下载", 8, _hoisted_4)) : createCommentVNode("", !0),
2264
2265
  createElementVNode("span", {
2265
2266
  class: "remove-btn",
2266
- onClick: withModifiers((n) => _(e), ["stop"])
2267
+ onClick: withModifiers((n) => v(e), ["stop"])
2267
2268
  }, "删除", 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", {
2269
+ ]), createElementVNode("div", _hoisted_6, [u.value !== !1 && (e.status === "success" || !e.status) ? (openBlock(), createElementBlock("span", _hoisted_7, [...r[2] ||= [createElementVNode("svg", {
2269
2270
  viewBox: "0 0 1024 1024",
2270
2271
  width: "16",
2271
2272
  height: "16"
@@ -2275,15 +2276,15 @@ var _hoisted_1$4 = { style: {
2275
2276
  })], -1)]])) : createCommentVNode("", !0)])], 2)]),
2276
2277
  default: withCtx(() => [renderSlot(e.$slots, "tip", {}, void 0, !0)]),
2277
2278
  _: 2
2278
- }, [p.value ? void 0 : {
2279
+ }, [m.value ? void 0 : {
2279
2280
  name: "trigger",
2280
- fn: withCtx(() => [createVNode(c, {
2281
+ fn: withCtx(() => [createVNode(l, {
2281
2282
  type: "primary",
2282
2283
  plain: "",
2283
2284
  icon: unref(a),
2284
2285
  size: unref(o),
2285
- disabled: unref(s),
2286
- loading: m.value
2286
+ disabled: unref(c),
2287
+ loading: g.value
2287
2288
  }, {
2288
2289
  default: withCtx(() => [createTextVNode(toDisplayString(unref(i)), 1)]),
2289
2290
  _: 1
@@ -2298,11 +2299,12 @@ var _hoisted_1$4 = { style: {
2298
2299
  "action",
2299
2300
  "file-list",
2300
2301
  "limit",
2302
+ "accept",
2301
2303
  "class"
2302
2304
  ]);
2303
2305
  };
2304
2306
  }
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({
2307
+ }), file_default = /* @__PURE__ */ _plugin_vue_export_helper_default(file_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-a4cb786d"]]), _hoisted_1$2 = ["src"], image_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
2306
2308
  __name: "image",
2307
2309
  props: {
2308
2310
  icon: {},
@@ -2392,7 +2394,9 @@ var _hoisted_1$4 = { style: {
2392
2394
  "remove"
2393
2395
  ],
2394
2396
  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(() => {
2397
+ let r = n, i = e, { type: a = "file", onChange: o, limit: s, action: c, data: l, prop: u, fileList: d, accept: f, ...p } = i;
2398
+ console.log("accept ->>", f);
2399
+ let m = c || baseUrl + "/attachment/uploadAttachment", g = { token: localStorage.getItem("TOKEN") || "" }, _ = computed(() => {
2396
2400
  if (!f) return null;
2397
2401
  let e = [], n = [];
2398
2402
  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-CNSSdhjL.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-a4cb786d] .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-a4cb786d] .el-upload-list {
183
183
  display: none;
184
184
  }
185
- .upload-file-item[data-v-b275fceb] {
185
+ .upload-file-item[data-v-a4cb786d] {
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-a4cb786d] {
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-a4cb786d] {
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-a4cb786d] {
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-a4cb786d] {
218
218
  color: #909399;
219
219
  margin-left: 4px;
220
220
  font-size: 12px;
@@ -223,18 +223,18 @@
223
223
  display: inline-flex;
224
224
  align-items: center;
225
225
  }
226
- .file-actions[data-v-b275fceb] {
226
+ .file-actions[data-v-a4cb786d] {
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-a4cb786d] {
234
234
  display: flex;
235
235
  align-items: center;
236
236
  }
237
- .download-btn[data-v-b275fceb] {
237
+ .download-btn[data-v-a4cb786d] {
238
238
  display: inline-flex;
239
239
  align-items: center;
240
240
  cursor: pointer;
@@ -244,13 +244,13 @@
244
244
  font-size: 12px;
245
245
  margin-left: 15px;
246
246
  }
247
- .file-left:hover .download-btn[data-v-b275fceb] {
247
+ .file-left:hover .download-btn[data-v-a4cb786d] {
248
248
  opacity: 1;
249
249
  }
250
- .download-btn[data-v-b275fceb]:hover {
250
+ .download-btn[data-v-a4cb786d]:hover {
251
251
  color: #409eff;
252
252
  }
253
- .remove-btn[data-v-b275fceb] {
253
+ .remove-btn[data-v-a4cb786d] {
254
254
  display: inline-flex;
255
255
  align-items: center;
256
256
  cursor: pointer;
@@ -260,37 +260,37 @@
260
260
  font-size: 12px;
261
261
  margin-left: 15px;
262
262
  }
263
- .file-left:hover .remove-btn[data-v-b275fceb] {
263
+ .file-left:hover .remove-btn[data-v-a4cb786d] {
264
264
  opacity: 1;
265
265
  }
266
- .remove-btn[data-v-b275fceb]:hover {
266
+ .remove-btn[data-v-a4cb786d]:hover {
267
267
  color: #f56c6c;
268
268
  }
269
269
 
270
270
  /* 隐藏 Element Plus 默认的文件列表样式 */
271
- [data-v-b275fceb] .el-upload-list__item {
271
+ [data-v-a4cb786d] .el-upload-list__item {
272
272
  padding: 0;
273
273
  border: none;
274
274
  background: transparent;
275
275
  }
276
- [data-v-b275fceb] .el-upload-list__item-name {
276
+ [data-v-a4cb786d] .el-upload-list__item-name {
277
277
  display: none;
278
278
  }
279
- [data-v-b275fceb] .el-upload-list__item-status-label {
279
+ [data-v-a4cb786d] .el-upload-list__item-status-label {
280
280
  display: none;
281
281
  }
282
- [data-v-b275fceb] .el-upload-list__item .el-icon--close {
282
+ [data-v-a4cb786d] .el-upload-list__item .el-icon--close {
283
283
  display: none;
284
284
  }
285
- [data-v-b275fceb] .el-upload-list__item.is-success .el-upload-list__item-status-label {
285
+ [data-v-a4cb786d] .el-upload-list__item.is-success .el-upload-list__item-status-label {
286
286
  display: none;
287
287
  }
288
288
 
289
289
  /* 隐藏默认的圆点 */
290
- [data-v-b275fceb] .el-upload-list {
290
+ [data-v-a4cb786d] .el-upload-list {
291
291
  list-style: none;
292
292
  }
293
- [data-v-b275fceb] .el-upload-list__item::before {
293
+ [data-v-a4cb786d] .el-upload-list__item::before {
294
294
  display: none !important;
295
295
  }
296
296
 
@@ -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-CNSSdhjL.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-CNSSdhjL.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.56",
4
4
  "type": "module",
5
5
  "description": "基于 Vue 3 + Element Plus 的企业级 UI 组件库",
6
6
  "keywords": [