yc-vep-ui 0.3.73 → 0.3.75
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.
|
@@ -48,6 +48,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
48
48
|
readonly onChange?: ((file: any, files: import('./type').IUploadRawFile[]) => void) | undefined;
|
|
49
49
|
readonly accept?: string | undefined;
|
|
50
50
|
readonly showStatusIcon?: boolean | undefined;
|
|
51
|
+
readonly disabled?: boolean | undefined;
|
|
51
52
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
52
53
|
$attrs: import('vue').Attrs;
|
|
53
54
|
$refs: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createPropsRestProxy, createSlots, createTextVNode, createVNode, defineComponent, getCurrentInstance, h, isRef, isVNode, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onMounted, onUnmounted, openBlock, reactive, ref, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, setBlockTracking, shallowRef, toDisplayString, toRaw, toValue, unref, useAttrs, useCssVars, useModel, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
1
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createPropsRestProxy, createSlots, createTextVNode, createVNode, defineComponent, getCurrentInstance, h, isReactive, isRef, isVNode, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onMounted, onUnmounted, openBlock, reactive, ref, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, setBlockTracking, shallowRef, toDisplayString, toRaw, toRef, toValue, unref, useAttrs, useCssVars, useModel, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
2
2
|
import { AiEditor } from "aieditor";
|
|
3
3
|
//#region \0rolldown/runtime.js
|
|
4
4
|
var __defProp$1 = Object.defineProperty, __exportAll$1 = (e, n) => {
|
|
@@ -2240,7 +2240,8 @@ var _hoisted_1$4 = { style: {
|
|
|
2240
2240
|
action: {},
|
|
2241
2241
|
onChange: { type: Function },
|
|
2242
2242
|
accept: {},
|
|
2243
|
-
showStatusIcon: { type: Boolean }
|
|
2243
|
+
showStatusIcon: { type: Boolean },
|
|
2244
|
+
disabled: { type: Boolean }
|
|
2244
2245
|
},
|
|
2245
2246
|
setup(e) {
|
|
2246
2247
|
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(() => n.showStatusIcon !== !1), d = ref(n.fileList || []);
|
|
@@ -2365,7 +2366,8 @@ var _hoisted_1$4 = { style: {
|
|
|
2365
2366
|
action: {},
|
|
2366
2367
|
onChange: { type: Function },
|
|
2367
2368
|
accept: {},
|
|
2368
|
-
showStatusIcon: { type: Boolean }
|
|
2369
|
+
showStatusIcon: { type: Boolean },
|
|
2370
|
+
disabled: { type: Boolean }
|
|
2369
2371
|
},
|
|
2370
2372
|
emits: ["update:fileList"],
|
|
2371
2373
|
setup(e, { emit: n }) {
|
|
@@ -2429,6 +2431,7 @@ var _hoisted_1$4 = { style: {
|
|
|
2429
2431
|
onChange: { type: Function },
|
|
2430
2432
|
accept: {},
|
|
2431
2433
|
showStatusIcon: { type: Boolean },
|
|
2434
|
+
disabled: { type: Boolean },
|
|
2432
2435
|
data: {}
|
|
2433
2436
|
},
|
|
2434
2437
|
emits: [
|
|
@@ -2441,9 +2444,9 @@ var _hoisted_1$4 = { style: {
|
|
|
2441
2444
|
"remove"
|
|
2442
2445
|
],
|
|
2443
2446
|
setup(e, { emit: n }) {
|
|
2444
|
-
let r = n, i = e, { type: a = "file", onChange: o, limit: s, action: c, data: l, prop: u, fileList: d, accept: f,
|
|
2447
|
+
let r = n, i = e, { type: a = "file", onChange: o, limit: s, action: c, data: l, prop: u, fileList: d, accept: f, disabled: p, ...m } = i;
|
|
2445
2448
|
console.log("accept ->>", f);
|
|
2446
|
-
let
|
|
2449
|
+
let g = c || baseUrl + "/attachment/uploadAttachment", _ = { token: localStorage.getItem("TOKEN") || "" }, v = computed(() => {
|
|
2447
2450
|
if (!f) return null;
|
|
2448
2451
|
let e = [], n = [];
|
|
2449
2452
|
return f.split(",").forEach((r) => {
|
|
@@ -2453,25 +2456,25 @@ var _hoisted_1$4 = { style: {
|
|
|
2453
2456
|
extensions: e,
|
|
2454
2457
|
mimePrefixes: n
|
|
2455
2458
|
};
|
|
2456
|
-
}),
|
|
2457
|
-
if (!
|
|
2458
|
-
let { extensions: n, mimePrefixes: r } =
|
|
2459
|
+
}), y = (e) => {
|
|
2460
|
+
if (!v.value) return !0;
|
|
2461
|
+
let { extensions: n, mimePrefixes: r } = v.value, i = "." + (e.name.split(".").pop() || "").toLowerCase(), a = n.length === 0 || n.includes(i), o = r.length === 0 || r.some((n) => e.type.startsWith(n));
|
|
2459
2462
|
return !a || !o ? (VepMessage.warning(`只能上传 ${f} 格式的文件`), !1) : !0;
|
|
2460
|
-
},
|
|
2461
|
-
function
|
|
2463
|
+
}, b = computed(() => l && u && l[u] ? l[u] : i.fileList || []), x = computed(() => b.value.length);
|
|
2464
|
+
function S(e) {
|
|
2462
2465
|
r("update:fileList", e);
|
|
2463
2466
|
}
|
|
2464
|
-
function
|
|
2467
|
+
function C(e, n) {
|
|
2465
2468
|
let i = Array.isArray(n) ? n : [];
|
|
2466
2469
|
o?.(i, e), r("update:fileList", i), r("update:modelValue", i), r("change", i);
|
|
2467
2470
|
}
|
|
2468
|
-
function
|
|
2471
|
+
function w() {
|
|
2469
2472
|
s && VepMessage.warning(`最多只能上传 ${s} 个文件`);
|
|
2470
2473
|
}
|
|
2471
|
-
function
|
|
2474
|
+
function T(e, n) {
|
|
2472
2475
|
r("update:fileList", n), r("update:modelValue", n), r("remove", n);
|
|
2473
2476
|
}
|
|
2474
|
-
function
|
|
2477
|
+
function E(e, n) {
|
|
2475
2478
|
if (e?.code !== "ok") return VepMessage.error(e?.message);
|
|
2476
2479
|
let a = baseUrl + `/attachment/downloadAttachment?objectKey=${e.data?.objectKey}&fileName=${e.data?.fileName}&token=${localStorage.getItem("TOKEN") || ""}`, o = l && u && l[u] ? l[u] : i.fileList || [], s = o.some((r) => r?.uid === n.uid || r?.objectKey === e.data?.objectKey), c;
|
|
2477
2480
|
c = s ? o.map((r) => r.uid === n.uid ? {
|
|
@@ -2488,40 +2491,40 @@ var _hoisted_1$4 = { style: {
|
|
|
2488
2491
|
url: a
|
|
2489
2492
|
}], r("update:fileList", c), r("update:modelValue", c), r("success", c);
|
|
2490
2493
|
}
|
|
2491
|
-
function
|
|
2494
|
+
function D(e, n, i) {
|
|
2492
2495
|
r("update:fileList", i), r("update:modelValue", i);
|
|
2493
2496
|
}
|
|
2494
2497
|
return (e, n) => (openBlock(), createBlock(resolveDynamicComponent(unref(a) === "image" ? image_default : file_default), mergeProps({
|
|
2495
2498
|
ref: "uploadInstance",
|
|
2496
2499
|
name: "file",
|
|
2497
|
-
action: unref(
|
|
2498
|
-
headers:
|
|
2499
|
-
"on-change":
|
|
2500
|
-
"on-exceed":
|
|
2501
|
-
"on-remove":
|
|
2502
|
-
"on-success":
|
|
2503
|
-
"on-error":
|
|
2504
|
-
"file-list":
|
|
2505
|
-
"onUpdate:fileList":
|
|
2506
|
-
count:
|
|
2500
|
+
action: unref(g),
|
|
2501
|
+
headers: _,
|
|
2502
|
+
"on-change": C,
|
|
2503
|
+
"on-exceed": w,
|
|
2504
|
+
"on-remove": T,
|
|
2505
|
+
"on-success": E,
|
|
2506
|
+
"on-error": D,
|
|
2507
|
+
"file-list": b.value,
|
|
2508
|
+
"onUpdate:fileList": S,
|
|
2509
|
+
count: x.value,
|
|
2507
2510
|
limit: unref(s),
|
|
2508
|
-
"before-upload":
|
|
2509
|
-
accept: unref(f)
|
|
2510
|
-
|
|
2511
|
+
"before-upload": y,
|
|
2512
|
+
accept: unref(f),
|
|
2513
|
+
disabled: unref(p)
|
|
2514
|
+
}, m), null, 16, [
|
|
2511
2515
|
"action",
|
|
2512
2516
|
"file-list",
|
|
2513
2517
|
"count",
|
|
2514
2518
|
"limit",
|
|
2515
|
-
"accept"
|
|
2519
|
+
"accept",
|
|
2520
|
+
"disabled"
|
|
2516
2521
|
]));
|
|
2517
2522
|
}
|
|
2518
2523
|
}), Upload_exports = /* @__PURE__ */ __exportAll$1({ default: () => Upload_default }), Upload_default = index_vue_vue_type_script_setup_true_lang_default$2;
|
|
2519
2524
|
//#endregion
|
|
2520
2525
|
//#region src/hooks/useFetch.ts
|
|
2521
2526
|
function useFetch(e, n = {}) {
|
|
2522
|
-
let { immediate: r = !0, method: i = "GET", onBefore: a, onSuccess: o, onError: s, onFinally: c, ...l } = n;
|
|
2523
|
-
console.log("immediate ->>", r);
|
|
2524
|
-
let u = ref(!1), d = ref(null), f = ref(null), p = reactive({}), m = !1;
|
|
2527
|
+
let { immediate: r = !0, method: i = "GET", onBefore: a, onSuccess: o, onError: s, onFinally: c, ...l } = n, u = ref(!1), d = ref(null), f = ref(null), p = reactive({}), m = !1;
|
|
2525
2528
|
async function g(r) {
|
|
2526
2529
|
if (m) return Promise.reject(/* @__PURE__ */ Error("请求正在进行中,请勿重复触发"));
|
|
2527
2530
|
m = !0, u.value = !0, f.value = null;
|
|
@@ -2634,7 +2637,7 @@ function useDefaultTable(e, n) {
|
|
|
2634
2637
|
//#endregion
|
|
2635
2638
|
//#region src/hooks/useTable/common.ts
|
|
2636
2639
|
function useComTable(e, n) {
|
|
2637
|
-
let { defaultParams: r, ...i } = n, a = isRef(r) ? r : ref(r || {}), o = useDefaultTable(e, {
|
|
2640
|
+
let { defaultParams: r, ...i } = n, a = isRef(r) ? r : isReactive(r) ? toRef(r) : ref(r || {}), o = useDefaultTable(e, {
|
|
2638
2641
|
...i,
|
|
2639
2642
|
ready: computed(() => {
|
|
2640
2643
|
let e = isRef(n.ready) ? n.ready.value : n.ready, r = !!a.value?.tableId;
|
package/dist/hooks/index.js
CHANGED
|
@@ -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-
|
|
1
|
+
import { c as e, d as t, f as n, l as r, s as i, u as a } from "../entry-BRLKhMwg.js";
|
|
2
2
|
export { e as useDictionary, n as useFetch, r as useRoute, a as useRouter, t as useTable, i as useUser };
|
package/dist/utils/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { O as e, _ as t, b as n, v as r, y as i } from "../entry-
|
|
1
|
+
import { O as e, _ as t, b as n, v as r, y as i } from "../entry-BRLKhMwg.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-
|
|
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-BRLKhMwg.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 };
|