@dazhicheng/ui 1.5.219 → 1.5.220

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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as Me, useSlots as Ee, ref as Oe, computed as b, toValue as v, getCurrentInstance as Ae, onMounted as U, watch as O, onUnmounted as _e, createElementBlock as q, openBlock as G, normalizeClass as B, unref as a, createCommentVNode as ke, createElementVNode as Re, createVNode as A, renderSlot as g, createSlots as J, renderList as Q, withCtx as M, normalizeProps as X, guardReactiveProps as Y, mergeProps as Z, toHandlers as $e, nextTick as Be } from "vue";
1
+ import { defineComponent as Me, useSlots as Ee, ref as Oe, computed as b, toValue as S, getCurrentInstance as Ae, onMounted as U, watch as O, onUnmounted as _e, createElementBlock as q, openBlock as G, normalizeClass as B, unref as a, createCommentVNode as ke, createElementVNode as Re, createVNode as A, renderSlot as g, createSlots as J, renderList as Q, withCtx as M, normalizeProps as X, guardReactiveProps as Y, mergeProps as Z, toHandlers as $e, nextTick as Be } from "vue";
2
2
  import "../../tt-button/index.js";
3
3
  import "../../tt-checkbox/index.js";
4
4
  import "../../tt-empty/index.js";
@@ -99,21 +99,21 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
99
99
  const R = (N = t == null ? void 0 : t.useStore) == null ? void 0 : N.call(t), C = b(() => {
100
100
  var o;
101
101
  if (p.testId) return p.testId;
102
- const e = (o = v(R)) == null ? void 0 : o.table;
102
+ const e = (o = S(R)) == null ? void 0 : o.table;
103
103
  return e != null && e.api ? xe(e.api) : "table";
104
104
  }), se = b(() => _(C.value, "tableform")), ae = b(() => _(C.value, "search-form-header")), ie = b(() => _(C.value, "search-btn-query")), le = b(() => _(C.value, "search-btn-reset")), ne = b(() => ({
105
105
  submit: ie.value,
106
106
  reset: le.value
107
107
  }));
108
108
  qe(ne);
109
- const x = {}, u = Ae(), S = b(() => v(R)), { getFormSlotKeysFunc: me, getTableSlotKeysFunc: pe, replaceTableSlotKey: ue, replaceFormSlotKey: ce } = Ze(), {
109
+ const x = {}, u = Ae(), v = b(() => S(R)), { getFormSlotKeysFunc: me, getTableSlotKeysFunc: pe, replaceTableSlotKey: ue, replaceFormSlotKey: ce } = Ze(), {
110
110
  tableData: de,
111
111
  getFormProps: $,
112
112
  getTableProps: c,
113
113
  getTableToolProps: fe,
114
114
  handleSearchInfoChange: K
115
115
  } = Xe(
116
- S,
116
+ v,
117
117
  t.tableApi.reload,
118
118
  t.tableApi.getLoading,
119
119
  t.tableApi.getPagination,
@@ -134,7 +134,7 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
134
134
  200,
135
135
  { leading: !0 }
136
136
  ), [he, r] = De({
137
- ...v($),
137
+ ...S($),
138
138
  handleSubmit: ge,
139
139
  handleReset: be,
140
140
  submitOnEnter: !0,
@@ -144,10 +144,10 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
144
144
  showCollapseButton: !0,
145
145
  collapsed: !0,
146
146
  collapseTriggerResize: !0
147
- }), { initCustomSetting: Ce, saveColumns: Se } = Ye({
147
+ }), { initCustomSetting: Ce, saveColumns: ve } = Ye({
148
148
  getTableProps: c,
149
149
  tableMethods: t.tableApi,
150
- getProps: S
150
+ getProps: v
151
151
  }), j = async () => {
152
152
  await Be(), t.tableApi && t.tableApi.redoHeight();
153
153
  };
@@ -155,7 +155,7 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
155
155
  const o = Ke.camelCase(e);
156
156
  x[o] = (...s) => T(e, ...s);
157
157
  });
158
- const ve = {
158
+ const Se = {
159
159
  ...x
160
160
  };
161
161
  function Te(e) {
@@ -172,7 +172,7 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
172
172
  }
173
173
  const { run: we } = V(
174
174
  async (e) => {
175
- r.isMounted && a(S).useSearchForm ? r.validate().then(async (o) => {
175
+ r.isMounted && a(v).useSearchForm ? r.validate().then(async (o) => {
176
176
  if (o.valid) {
177
177
  const s = await r.getValues();
178
178
  await t.tableApi.reload({
@@ -199,22 +199,22 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
199
199
  setFormProps: r.setState,
200
200
  setProps: Te,
201
201
  reload: we,
202
- selectedKeys: b(() => v(t.tableApi.selectedKeys))
202
+ selectedKeys: b(() => S(t.tableApi.selectedKeys))
203
203
  };
204
204
  async function ye() {
205
- const { tableRefreshBefore: e } = S.value;
205
+ const { tableRefreshBefore: e } = v.value;
206
206
  e && Le(e) && await e(), E.reload();
207
207
  }
208
208
  async function Fe(e) {
209
209
  var d, m;
210
- const o = ((m = (d = S.value) == null ? void 0 : d.table) == null ? void 0 : m.columns) || [], s = new Map(o.map((n) => [n.field, n])), l = e.checkedModel.map((n) => s.get(n)).filter(Boolean);
210
+ const o = ((m = (d = v.value) == null ? void 0 : d.table) == null ? void 0 : m.columns) || [], s = new Map(o.map((n) => [n.field, n])), l = e.checkedModel.map((n) => s.get(n)).filter(Boolean);
211
211
  if (e.isExport) {
212
212
  T("export", e.checkedModel, e.modalApi);
213
213
  return;
214
214
  }
215
215
  e.modalApi.setModalProps({
216
216
  confirmLoading: !0
217
- }), c.value.useHttpCache && await Se(JSON.stringify(e.checkedModel)), t.tableApi.setTableColumns(l), e.modalApi.setModalProps({
217
+ }), c.value.useHttpCache && await ve(JSON.stringify(e.checkedModel)), t.tableApi.setTableColumns(l), e.modalApi.setModalProps({
218
218
  confirmLoading: !1
219
219
  }), e.modalApi.closeModal(), T("set-columns", l);
220
220
  }
@@ -222,7 +222,7 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
222
222
  var m, n, h, f, y, F, P, I;
223
223
  const { notSetColumnField: o, columns: s } = a(c), l = (f = (h = (n = ((m = t.tableApi.getTableInstance()) == null ? void 0 : m.getTableColumn()) || []) == null ? void 0 : n.visibleColumn) == null ? void 0 : h.map((i) => i.field)) == null ? void 0 : f.filter(Boolean), d = ((F = (y = a(s)) == null ? void 0 : y.filter((i) => i.visible === !0 || i.visible === void 0)) == null ? void 0 : F.map((i) => i.field)) || [];
224
224
  (P = w.value) == null || P.openModal({
225
- columns: v(s) || [],
225
+ columns: (S(s) || []).filter((i) => i.visible !== !1),
226
226
  displayFields: e ? d : l,
227
227
  disabledColumnField: o || []
228
228
  }), (I = w.value) == null || I.setModalProps({
@@ -233,7 +233,7 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
233
233
  var m, n, h, f, y, F, P, I;
234
234
  const { notSetColumnField: o, columns: s } = a(c), l = (f = (h = (n = ((m = t.tableApi.getTableInstance()) == null ? void 0 : m.getTableColumn()) || []) == null ? void 0 : n.visibleColumn) == null ? void 0 : h.map((i) => i.field)) == null ? void 0 : f.filter(Boolean), d = ((F = (y = a(s)) == null ? void 0 : y.filter((i) => i.visible === !0 || i.visible === void 0)) == null ? void 0 : F.map((i) => i.field)) || [];
235
235
  (P = w.value) == null || P.openModal({
236
- columns: v(s) || [],
236
+ columns: S(s) || [],
237
237
  displayFields: e ? d : l,
238
238
  disabledColumnField: o || [],
239
239
  isExport: !0
@@ -294,7 +294,7 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
294
294
  class: B(a(k)),
295
295
  "data-testid": se.value
296
296
  }, [
297
- S.value.useSearchForm ? (G(), q("div", {
297
+ v.value.useSearchForm ? (G(), q("div", {
298
298
  key: 0,
299
299
  class: B(`${a(k)}-header`),
300
300
  "data-testid": ae.value
@@ -325,7 +325,7 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
325
325
  "table-id": C.value,
326
326
  "form-api": a(r),
327
327
  "table-api": a(t).tableApi
328
- }, $e(ve)), J({ _: 2 }, [
328
+ }, $e(Se)), J({ _: 2 }, [
329
329
  Q(a(pe)(a(L)), (s) => ({
330
330
  name: a(ue)(s),
331
331
  fn: M((l) => [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dazhicheng/ui",
3
- "version": "1.5.219",
3
+ "version": "1.5.220",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -67,8 +67,8 @@
67
67
  "vue-router": "^5.0.2",
68
68
  "vxe-pc-ui": "^4.12.36",
69
69
  "vxe-table": "^4.17.48",
70
- "@dazhicheng/utils": "1.3.41",
71
- "@dazhicheng/hooks": "1.4.44"
70
+ "@dazhicheng/hooks": "1.4.44",
71
+ "@dazhicheng/utils": "1.3.41"
72
72
  },
73
73
  "files": [
74
74
  "dist"