yc-vep-ui 0.4.5 → 0.4.6
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.
|
@@ -2573,74 +2573,76 @@ function useFetch(e, n = {}) {
|
|
|
2573
2573
|
//#endregion
|
|
2574
2574
|
//#region src/hooks/useTable/default.ts
|
|
2575
2575
|
function useDefaultTable(e, n) {
|
|
2576
|
-
let r = [
|
|
2576
|
+
let { isManualExecuting: r, ignoreAttrs: i, replaceAttrs: a } = n, o = [
|
|
2577
2577
|
"tableName",
|
|
2578
2578
|
"sort",
|
|
2579
|
-
...
|
|
2580
|
-
],
|
|
2579
|
+
...i || []
|
|
2580
|
+
], s = a || {
|
|
2581
2581
|
table: "table",
|
|
2582
2582
|
total: "total"
|
|
2583
|
-
},
|
|
2583
|
+
}, c = shallowRef([]), l = reactive({
|
|
2584
2584
|
total: 0,
|
|
2585
2585
|
page: 1,
|
|
2586
2586
|
pageSize: 10
|
|
2587
|
-
}),
|
|
2587
|
+
}), u = ref([]), d = reactive({
|
|
2588
2588
|
page: 1,
|
|
2589
2589
|
pageSize: 10
|
|
2590
2590
|
});
|
|
2591
|
-
if (n?.onBefore?.(
|
|
2591
|
+
if (n?.onBefore?.(d) === !1) return reactive({
|
|
2592
2592
|
loading: ref(!1),
|
|
2593
|
-
data:
|
|
2594
|
-
pagination:
|
|
2595
|
-
selection:
|
|
2593
|
+
data: c,
|
|
2594
|
+
pagination: l,
|
|
2595
|
+
selection: u,
|
|
2596
2596
|
execute: () => {},
|
|
2597
2597
|
reset: () => {},
|
|
2598
2598
|
updatePagination: () => {},
|
|
2599
2599
|
selectionChange: () => {}
|
|
2600
2600
|
});
|
|
2601
|
-
let
|
|
2601
|
+
let f = useFetch(e, {
|
|
2602
2602
|
...n,
|
|
2603
|
-
defaultParams:
|
|
2603
|
+
defaultParams: d,
|
|
2604
2604
|
immediate: !1,
|
|
2605
2605
|
onSuccess: (e) => {
|
|
2606
|
-
n?.onSuccess?.(e),
|
|
2606
|
+
n?.onSuccess?.(e), l.total = e[s.total] || 0, c.value = e[s.table] || [];
|
|
2607
2607
|
}
|
|
2608
2608
|
});
|
|
2609
2609
|
watchEffect(() => {
|
|
2610
|
-
let e = toValue(n.ready) ?? !0,
|
|
2611
|
-
(
|
|
2612
|
-
let
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2610
|
+
let e = toValue(n.ready) ?? !0, i = r?.value || !1;
|
|
2611
|
+
if (!e || i) return;
|
|
2612
|
+
let a = toValue(n.defaultParams || {});
|
|
2613
|
+
(l.page !== 1 || l.pageSize !== 10) && (l.page = 1, l.pageSize = 10);
|
|
2614
|
+
let o = {};
|
|
2615
|
+
for (let e in a) e !== "page" && e !== "pageSize" && (o[e] = a[e], d[e] = a[e]);
|
|
2616
|
+
f.execute({
|
|
2617
|
+
...d,
|
|
2618
|
+
...o
|
|
2617
2619
|
});
|
|
2618
2620
|
}, { flush: "sync" });
|
|
2619
|
-
function
|
|
2620
|
-
let { page: n, pageSize:
|
|
2621
|
-
|
|
2622
|
-
let
|
|
2623
|
-
Object.keys(
|
|
2624
|
-
!
|
|
2625
|
-
}),
|
|
2626
|
-
page:
|
|
2627
|
-
pageSize:
|
|
2621
|
+
function p(e = {}) {
|
|
2622
|
+
let { page: n, pageSize: r, ...i } = e;
|
|
2623
|
+
l.page = n || 1, l.pageSize = r || 10;
|
|
2624
|
+
let a = [];
|
|
2625
|
+
Object.keys(d).forEach((e) => {
|
|
2626
|
+
!o.includes(e) && !(e in i) && a.push(e);
|
|
2627
|
+
}), a.forEach((e) => delete d[e]), Object.assign(d, i, {
|
|
2628
|
+
page: l.page,
|
|
2629
|
+
pageSize: l.pageSize
|
|
2628
2630
|
});
|
|
2629
2631
|
}
|
|
2630
|
-
function
|
|
2631
|
-
|
|
2632
|
+
function m({ page: e, pageSize: n }) {
|
|
2633
|
+
l.page = e, l.pageSize = n, d.page = e, d.pageSize = n;
|
|
2632
2634
|
}
|
|
2633
|
-
function
|
|
2634
|
-
|
|
2635
|
+
function g(e) {
|
|
2636
|
+
u.value = e;
|
|
2635
2637
|
}
|
|
2636
2638
|
return reactive({
|
|
2637
|
-
...
|
|
2638
|
-
data:
|
|
2639
|
-
pagination:
|
|
2640
|
-
selection:
|
|
2641
|
-
reset:
|
|
2642
|
-
updatePagination:
|
|
2643
|
-
selectionChange:
|
|
2639
|
+
...f,
|
|
2640
|
+
data: c,
|
|
2641
|
+
pagination: l,
|
|
2642
|
+
selection: u,
|
|
2643
|
+
reset: p,
|
|
2644
|
+
updatePagination: m,
|
|
2645
|
+
selectionChange: g
|
|
2644
2646
|
});
|
|
2645
2647
|
}
|
|
2646
2648
|
//#endregion
|
|
@@ -2662,7 +2664,8 @@ function useComTable(e, n) {
|
|
|
2662
2664
|
params: i
|
|
2663
2665
|
};
|
|
2664
2666
|
}),
|
|
2665
|
-
ignoreAttrs: o
|
|
2667
|
+
ignoreAttrs: o,
|
|
2668
|
+
isManualExecuting: s
|
|
2666
2669
|
});
|
|
2667
2670
|
function l(e = {}) {
|
|
2668
2671
|
let { tableId: n, ...r } = toValue(a), i = {};
|
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-1vDWqFVE.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-1vDWqFVE.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-1vDWqFVE.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 };
|