yc-vep-ui 0.3.70 → 0.3.71
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.
|
@@ -1206,7 +1206,7 @@ var _hoisted_1$11 = { style: {
|
|
|
1206
1206
|
"update:modelValue"
|
|
1207
1207
|
],
|
|
1208
1208
|
setup(e, { expose: n, emit: r }) {
|
|
1209
|
-
useCssVars((e) => ({
|
|
1209
|
+
useCssVars((e) => ({ v7feff3ec: unref(f) / 2 }));
|
|
1210
1210
|
let i = r, a = e, { labelWidth: o = "100px", valueWidth: s = "auto", omitFields: c = [], rules: l = reactive({}), labelPosition: u = "top", valueModel: d = "default", column: f = 24 } = a, p = ref(0), m = ref(), g = computed(() => a.modelValue !== void 0), _ = reactive({}), v = computed(() => g.value ? a.modelValue : a.model || _), y = computed({
|
|
1211
1211
|
get: () => v.value,
|
|
1212
1212
|
set: (e) => g.value && i("update:model", e)
|
|
@@ -1367,7 +1367,7 @@ var _hoisted_1$11 = { style: {
|
|
|
1367
1367
|
]))], 64);
|
|
1368
1368
|
};
|
|
1369
1369
|
}
|
|
1370
|
-
}), Form_exports = /* @__PURE__ */ __exportAll$1({ default: () => Form_default }), Form_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_vue_vue_type_script_setup_true_lang_default$9, [["__scopeId", "data-v-
|
|
1370
|
+
}), Form_exports = /* @__PURE__ */ __exportAll$1({ default: () => Form_default }), Form_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_vue_vue_type_script_setup_true_lang_default$9, [["__scopeId", "data-v-1e3d36b7"]]), _hoisted_1$9 = ["disabled"], index_vue_vue_type_script_setup_true_lang_default$8 = /* @__PURE__ */ defineComponent({
|
|
1371
1371
|
__name: "index",
|
|
1372
1372
|
props: /* @__PURE__ */ mergeModels({
|
|
1373
1373
|
defaultValue: { default: "" },
|
|
@@ -2521,19 +2521,20 @@ function useFetch(e, n = {}) {
|
|
|
2521
2521
|
let { immediate: r = !0, method: i = "GET", onBefore: a, onSuccess: o, onError: s, onFinally: c, ...l } = n;
|
|
2522
2522
|
console.log("immediate ->>", r);
|
|
2523
2523
|
let u = ref(!1), d = ref(null), f = ref(null), p = reactive({}), m = !1;
|
|
2524
|
-
async function g() {
|
|
2524
|
+
async function g(r) {
|
|
2525
2525
|
if (m) return Promise.reject(/* @__PURE__ */ Error("请求正在进行中,请勿重复触发"));
|
|
2526
2526
|
m = !0, u.value = !0, f.value = null;
|
|
2527
2527
|
try {
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2528
|
+
let s = toRaw(r || p);
|
|
2529
|
+
_ = JSON.stringify(s), v = isRef(n.ready) ? n.ready.value : n.ready ?? !0;
|
|
2530
|
+
let c = e, l = {};
|
|
2531
|
+
if (a?.(s) === !1) return Promise.reject(/* @__PURE__ */ Error("请求被 onBefore 钩子取消"));
|
|
2531
2532
|
if (i === "GET") {
|
|
2532
|
-
let e = new URLSearchParams(
|
|
2533
|
-
e && (
|
|
2534
|
-
} else
|
|
2535
|
-
let
|
|
2536
|
-
return
|
|
2533
|
+
let e = new URLSearchParams(s).toString();
|
|
2534
|
+
e && (c = `${c}?${e}`);
|
|
2535
|
+
} else l = s;
|
|
2536
|
+
let u = await request_default?.[i?.toLocaleLowerCase?.()](c, l);
|
|
2537
|
+
return u.code ? ["return.optSuccess", "ok"].includes(u.code) || VepMessage.error(u.message || "未知错误!") : (!u.data?.success || !u?.success) && VepMessage.error(u.message || "未知错误!"), d.value = u, o?.(u), u;
|
|
2537
2538
|
} catch (e) {
|
|
2538
2539
|
let n = e instanceof Error ? e : Error(String(e));
|
|
2539
2540
|
throw f.value = n, console.error("请求发生错误:", n), s?.(n), n;
|
|
@@ -2541,17 +2542,16 @@ function useFetch(e, n = {}) {
|
|
|
2541
2542
|
u.value = !1, m = !1, c?.();
|
|
2542
2543
|
}
|
|
2543
2544
|
}
|
|
2544
|
-
let _ =
|
|
2545
|
+
let _ = "", v;
|
|
2545
2546
|
watchEffect(() => {
|
|
2546
2547
|
let e = toValue(l.defaultParams);
|
|
2547
2548
|
Object.keys(p).forEach((e) => delete p[e]), Object.assign(p, e || {});
|
|
2548
2549
|
let i = isRef(n.ready) ? n.ready.value : n.ready ?? !0;
|
|
2549
|
-
i &&
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
function b(e) {
|
|
2550
|
+
i && v === !1 && (_ = ""), v = i;
|
|
2551
|
+
let a = JSON.stringify(toRaw(p));
|
|
2552
|
+
r && v && !m && a !== _ && (_ = a, g());
|
|
2553
|
+
}, { flush: "sync" });
|
|
2554
|
+
function y(e) {
|
|
2555
2555
|
for (let e in p) p[e] = void 0;
|
|
2556
2556
|
Object.assign(p, e);
|
|
2557
2557
|
}
|
|
@@ -2561,7 +2561,7 @@ function useFetch(e, n = {}) {
|
|
|
2561
2561
|
data: d,
|
|
2562
2562
|
error: f,
|
|
2563
2563
|
params: p,
|
|
2564
|
-
setParams:
|
|
2564
|
+
setParams: y
|
|
2565
2565
|
};
|
|
2566
2566
|
}
|
|
2567
2567
|
//#endregion
|
|
@@ -2601,7 +2601,7 @@ function useDefaultTable(e, n) {
|
|
|
2601
2601
|
let e = toValue(n.defaultParams || {});
|
|
2602
2602
|
a.page = 1, a.pageSize = 10;
|
|
2603
2603
|
for (let n in e) n !== "page" && n !== "pageSize" && (s[n] = e[n]);
|
|
2604
|
-
});
|
|
2604
|
+
}, { flush: "sync" });
|
|
2605
2605
|
function l(e = {}) {
|
|
2606
2606
|
a.page = 1, a.pageSize = 10, e && (Object.keys(s).forEach((n) => {
|
|
2607
2607
|
r.ignoreAttrs?.includes(n) || Object.keys(e).includes(n) || delete s[n];
|
|
@@ -2702,7 +2702,7 @@ function useComTable(e, n) {
|
|
|
2702
2702
|
});
|
|
2703
2703
|
return watchEffect(() => {
|
|
2704
2704
|
Object.assign(f, o, { reset: s });
|
|
2705
|
-
}), f;
|
|
2705
|
+
}, { flush: "sync" }), f;
|
|
2706
2706
|
}
|
|
2707
2707
|
//#endregion
|
|
2708
2708
|
//#region src/hooks/useTable/index.ts
|
|
@@ -4842,8 +4842,10 @@ function useDetail(e) {
|
|
|
4842
4842
|
let e = d.data, r = {
|
|
4843
4843
|
...n.query,
|
|
4844
4844
|
instanceId: e
|
|
4845
|
-
}
|
|
4846
|
-
|
|
4845
|
+
}, i = n.mode === "hash" ? `${window.location.hash.split("?")[0]}?${new URLSearchParams(r).toString()}` : `${window.location.pathname}?${new URLSearchParams(r).toString()}`;
|
|
4846
|
+
setTimeout(() => {
|
|
4847
|
+
window.location.href = i, window.location.reload();
|
|
4848
|
+
}, 1500);
|
|
4847
4849
|
} else VepMessage.error(d?.message || "提交失败");
|
|
4848
4850
|
}
|
|
4849
4851
|
async function p(e) {
|
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-BCmXn1Hk.js";
|
|
2
2
|
export { e as useDictionary, n as useFetch, r as useRoute, a as useRouter, t as useTable, i as useUser };
|
|
@@ -20,6 +20,6 @@ export declare function useDictionary(props: IProps): {
|
|
|
20
20
|
data: ITableData[];
|
|
21
21
|
options: IOptions[];
|
|
22
22
|
update: (params: MergeDictionaryValueRequest) => Promise<any>;
|
|
23
|
-
execute: () => Promise<unknown>;
|
|
23
|
+
execute: (params?: Record<string, any>) => Promise<unknown>;
|
|
24
24
|
};
|
|
25
25
|
export {};
|
package/dist/hooks/useFetch.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ type Response<T> = {
|
|
|
3
3
|
code: string;
|
|
4
4
|
data: T | T[] | any;
|
|
5
5
|
message: string;
|
|
6
|
+
success?: boolean;
|
|
6
7
|
};
|
|
7
8
|
export interface FetchOptions<T> {
|
|
8
9
|
/** 是否立即执行请求 */
|
|
@@ -26,7 +27,7 @@ export interface FetchOptions<T> {
|
|
|
26
27
|
}
|
|
27
28
|
export interface UseFetchReturn<T> {
|
|
28
29
|
/** 手动触发请求 */
|
|
29
|
-
execute: () => Promise<T>;
|
|
30
|
+
execute: (params?: Record<string, any>) => Promise<T>;
|
|
30
31
|
/** 请求中状态 */
|
|
31
32
|
loading: Ref<boolean>;
|
|
32
33
|
/** 响应数据 */
|
package/dist/index.css
CHANGED
|
@@ -43,24 +43,24 @@
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.ui-form-buttons[data-v-
|
|
46
|
+
.ui-form-buttons[data-v-1e3d36b7] {
|
|
47
47
|
display: flex;
|
|
48
48
|
justify-content: flex-start;
|
|
49
49
|
align-items: center;
|
|
50
50
|
}
|
|
51
51
|
.ui-form {
|
|
52
|
-
&[data-v-
|
|
52
|
+
&[data-v-1e3d36b7] {
|
|
53
53
|
display: grid;
|
|
54
|
-
grid-template-columns: repeat(var(--
|
|
54
|
+
grid-template-columns: repeat(var(--v7feff3ec), minmax(0, 1fr));
|
|
55
55
|
gap: 0px 40px;
|
|
56
56
|
}
|
|
57
|
-
&[data-v-
|
|
57
|
+
&[data-v-1e3d36b7] .el-form-item__label {
|
|
58
58
|
margin-bottom: 0;
|
|
59
59
|
font-weight: bold;
|
|
60
60
|
font-size: 0.8em;
|
|
61
61
|
color: #6b7280;
|
|
62
62
|
}
|
|
63
|
-
&[data-v-
|
|
63
|
+
&[data-v-1e3d36b7] .el-form-item__content {
|
|
64
64
|
display: flex;
|
|
65
65
|
flex-wrap: inherit;
|
|
66
66
|
width: 100%;
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
|
|
79
79
|
/* 下划线样式 */
|
|
80
80
|
.underline {
|
|
81
|
-
&[data-v-
|
|
82
|
-
&[data-v-
|
|
81
|
+
&[data-v-1e3d36b7] .el-input__wrapper,
|
|
82
|
+
&[data-v-1e3d36b7] .el-textarea__inner {
|
|
83
83
|
box-shadow: 0px 1px 0px var(--el-input-border-color, var(--el-border-color));
|
|
84
84
|
}
|
|
85
85
|
}
|
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-BCmXn1Hk.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-BCmXn1Hk.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 };
|