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
- ...n?.ignoreAttrs || []
2580
- ], i = n?.replaceAttrs || {
2579
+ ...i || []
2580
+ ], s = a || {
2581
2581
  table: "table",
2582
2582
  total: "total"
2583
- }, a = shallowRef([]), o = reactive({
2583
+ }, c = shallowRef([]), l = reactive({
2584
2584
  total: 0,
2585
2585
  page: 1,
2586
2586
  pageSize: 10
2587
- }), s = ref([]), c = reactive({
2587
+ }), u = ref([]), d = reactive({
2588
2588
  page: 1,
2589
2589
  pageSize: 10
2590
2590
  });
2591
- if (n?.onBefore?.(c) === !1) return reactive({
2591
+ if (n?.onBefore?.(d) === !1) return reactive({
2592
2592
  loading: ref(!1),
2593
- data: a,
2594
- pagination: o,
2595
- selection: s,
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 l = useFetch(e, {
2601
+ let f = useFetch(e, {
2602
2602
  ...n,
2603
- defaultParams: c,
2603
+ defaultParams: d,
2604
2604
  immediate: !1,
2605
2605
  onSuccess: (e) => {
2606
- n?.onSuccess?.(e), o.total = e[i.total] || 0, a.value = e[i.table] || [];
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, r = toValue(n.defaultParams || {});
2611
- (o.page !== 1 || o.pageSize !== 10) && (o.page = 1, o.pageSize = 10);
2612
- let i = {};
2613
- for (let e in r) e !== "page" && e !== "pageSize" && (i[e] = r[e], c[e] = r[e]);
2614
- e && l.execute({
2615
- ...c,
2616
- ...i
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 u(e = {}) {
2620
- let { page: n, pageSize: i, ...a } = e;
2621
- o.page = n || 1, o.pageSize = i || 10;
2622
- let s = [];
2623
- Object.keys(c).forEach((e) => {
2624
- !r.includes(e) && !(e in a) && s.push(e);
2625
- }), s.forEach((e) => delete c[e]), Object.assign(c, a, {
2626
- page: o.page,
2627
- pageSize: o.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 d({ page: e, pageSize: n }) {
2631
- o.page = e, o.pageSize = n, c.page = e, c.pageSize = n;
2632
+ function m({ page: e, pageSize: n }) {
2633
+ l.page = e, l.pageSize = n, d.page = e, d.pageSize = n;
2632
2634
  }
2633
- function f(e) {
2634
- s.value = e;
2635
+ function g(e) {
2636
+ u.value = e;
2635
2637
  }
2636
2638
  return reactive({
2637
- ...l,
2638
- data: a,
2639
- pagination: o,
2640
- selection: s,
2641
- reset: u,
2642
- updatePagination: d,
2643
- selectionChange: f
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 = {};
@@ -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-CzsmZrlW.js";
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 };
@@ -1,2 +1,2 @@
1
- import { O as e, _ as t, b as n, v as r, y as i } from "../entry-CzsmZrlW.js";
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-CzsmZrlW.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-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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yc-vep-ui",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "type": "module",
5
5
  "description": "基于 Vue 3 + Element Plus 的企业级 UI 组件库",
6
6
  "keywords": [