@aplus-frontend/ui 0.6.0-beta.13 → 0.6.0-beta.14

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.
Files changed (32) hide show
  1. package/es/src/ap-grid/editable/form-item.vue.mjs +38 -35
  2. package/es/src/ap-grid/editable/index.vue.mjs +13 -10
  3. package/es/src/ap-grid/index.vue.mjs +110 -95
  4. package/es/src/ap-grid/interface.d.ts +10 -0
  5. package/es/src/ap-grid/utils/table.mjs +15 -14
  6. package/es/src/business/ap-copy/ApCopy.mjs +43 -43
  7. package/es/src/business/ap-product-info/ApProductInfo.mjs +23 -24
  8. package/es/src/business/ap-view/ap-view.vue.d.ts +4 -1
  9. package/es/src/business/ap-view/ap-view.vue2.mjs +96 -84
  10. package/es/src/business/ap-view/index.d.ts +12 -3
  11. package/es/src/business/ap-view/interface.d.ts +7 -0
  12. package/es/src/business/hooks/usePageListApGrid.mjs +17 -20
  13. package/es/src/version.d.ts +1 -1
  14. package/es/src/version.mjs +1 -1
  15. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  16. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  17. package/lib/src/ap-grid/index.vue.js +1 -1
  18. package/lib/src/ap-grid/interface.d.ts +10 -0
  19. package/lib/src/ap-grid/utils/table.js +1 -1
  20. package/lib/src/business/ap-copy/ApCopy.js +1 -1
  21. package/lib/src/business/ap-product-info/ApProductInfo.js +1 -1
  22. package/lib/src/business/ap-view/ap-view.vue.d.ts +4 -1
  23. package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
  24. package/lib/src/business/ap-view/index.d.ts +12 -3
  25. package/lib/src/business/ap-view/interface.d.ts +7 -0
  26. package/lib/src/business/hooks/usePageListApGrid.js +1 -1
  27. package/lib/src/version.d.ts +1 -1
  28. package/lib/src/version.js +1 -1
  29. package/package.json +4 -3
  30. package/theme/ap-copy/ap-copy.css +2 -0
  31. package/theme/ap-copy/ap-copy.less +2 -0
  32. package/theme/index.css +2 -0
@@ -1,4 +1,4 @@
1
- import { defineComponent as A, useSlots as H, toRef as W, ref as h, unref as r, watch as G, nextTick as U, createBlock as $, openBlock as q, mergeProps as y, withCtx as g, createVNode as J, createSlots as Q, renderList as X, renderSlot as Y, normalizeProps as Z, guardReactiveProps as I } from "vue";
1
+ import { defineComponent as P, useSlots as A, toRef as W, ref as h, unref as r, watch as G, nextTick as U, createBlock as $, openBlock as q, mergeProps as y, withCtx as g, createVNode as J, createSlots as Q, renderList as X, renderSlot as Y, normalizeProps as Z, guardReactiveProps as I } from "vue";
2
2
  import { ApForm as C } from "../../ap-form/index.mjs";
3
3
  import { isArray as w, isUndefined as M, isNumber as m, cloneDeep as ee, omit as oe } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
@@ -7,9 +7,9 @@ import { useGetEditableColumns as te } from "../hooks/use-editable-columns.mjs";
7
7
  import "../index.vue2.mjs";
8
8
  import { useInjectForm as ae } from "../../ap-form/context.mjs";
9
9
  import { useNamespace as le } from "../../config-provider/hooks/use-namespace.mjs";
10
- import { useGlobalConfig as fe } from "../../config-provider/hooks/use-global-config.mjs";
11
- import ne from "../index.vue.mjs";
12
- const Ce = /* @__PURE__ */ A({
10
+ import { useGlobalConfig as ne } from "../../config-provider/hooks/use-global-config.mjs";
11
+ import fe from "../index.vue.mjs";
12
+ const Ce = /* @__PURE__ */ P({
13
13
  name: "EditableGrid",
14
14
  __name: "form-item",
15
15
  props: {
@@ -145,6 +145,9 @@ const Ce = /* @__PURE__ */ A({
145
145
  },
146
146
  expandable: {},
147
147
  value: {},
148
+ rowHighlightable: {
149
+ type: [Boolean, Function]
150
+ },
148
151
  columns: {},
149
152
  defaultValue: {},
150
153
  "onUpdate:value": {},
@@ -160,11 +163,11 @@ const Ce = /* @__PURE__ */ A({
160
163
  setup(x, {
161
164
  expose: R
162
165
  }) {
163
- const B = H(), l = x, {
166
+ const B = A(), l = x, {
164
167
  b: S
165
168
  } = le("editable-grid");
166
169
  function F(e, t) {
167
- return w(t) ? t.reduce((f, a) => f == null ? void 0 : f[a], e) : e == null ? void 0 : e[t];
170
+ return w(t) ? t.reduce((n, a) => n == null ? void 0 : n[a], e) : e == null ? void 0 : e[t];
168
171
  }
169
172
  const {
170
173
  internalInstance: o,
@@ -176,11 +179,11 @@ const Ce = /* @__PURE__ */ A({
176
179
  }, {
177
180
  deep: !0
178
181
  });
179
- const c = h(), D = fe("valueTypeMap"), V = te(l, D);
182
+ const c = h(), D = ne("valueTypeMap"), V = te(l, D);
180
183
  function L(e, t) {
181
- var n;
182
- const f = ((n = r(d)) == null ? void 0 : n.length) || 0;
183
- if (b(l.maxLength) && f >= l.maxLength)
184
+ var f;
185
+ const n = ((f = r(d)) == null ? void 0 : f.length) || 0;
186
+ if (b(l.maxLength) && n >= l.maxLength)
184
187
  return;
185
188
  const a = {
186
189
  ...e || {}
@@ -195,29 +198,29 @@ const Ce = /* @__PURE__ */ A({
195
198
  }
196
199
  function T(e, t = "suffix") {
197
200
  var s;
198
- const f = ((s = r(d)) == null ? void 0 : s.length) || 0, a = m(e) ? e : e.length;
199
- if (b(l.maxLength) && f + a > l.maxLength)
201
+ const n = ((s = r(d)) == null ? void 0 : s.length) || 0, a = m(e) ? e : e.length;
202
+ if (b(l.maxLength) && n + a > l.maxLength)
200
203
  return;
201
- const n = m(e) ? new Array(e).fill(0).map(() => ({})) : ee(e);
202
- o == null || o.setFieldValue(l.name, n, !0, (u, i) => {
204
+ const f = m(e) ? new Array(e).fill(0).map(() => ({})) : ee(e);
205
+ o == null || o.setFieldValue(l.name, f, !0, (u, i) => {
203
206
  if (!u[i]) {
204
- u[i] = [...n];
207
+ u[i] = [...f];
205
208
  return;
206
209
  }
207
- t === "suffix" ? u[i].push(...n) : u[i].unshift(...n);
210
+ t === "suffix" ? u[i].push(...f) : u[i].unshift(...f);
208
211
  });
209
212
  }
210
213
  function k(e) {
211
214
  const t = new Set(m(e) ? [e] : e);
212
- o == null || o.setFieldValue(l.name, void 0, !0, (f, a) => {
213
- f[a] = f[a].filter((n, s) => !t.has(s));
215
+ o == null || o.setFieldValue(l.name, void 0, !0, (n, a) => {
216
+ n[a] = n[a].filter((f, s) => !t.has(s));
214
217
  });
215
218
  }
216
219
  function _(e) {
217
- var f;
220
+ var n;
218
221
  const t = new Set(w(e) ? e : [e]);
219
- t.size !== 0 && ((f = o == null ? void 0 : o.setFieldValue) == null || f.call(o, l.name, void 0, !0, (a, n) => {
220
- a[n] = a[n].filter((s) => !t.has(s[l.rowKey]));
222
+ t.size !== 0 && ((n = o == null ? void 0 : o.setFieldValue) == null || n.call(o, l.name, void 0, !0, (a, f) => {
223
+ a[f] = a[f].filter((s) => !t.has(s[l.rowKey]));
221
224
  }));
222
225
  }
223
226
  function j() {
@@ -227,15 +230,15 @@ const Ce = /* @__PURE__ */ A({
227
230
  var t;
228
231
  return (t = r(d)) == null ? void 0 : t[e];
229
232
  }
230
- function O(e, t, f = !0) {
231
- o == null || o.setFieldValue(l.name, void 0, !0, (a, n) => {
232
- if (!(!a[n] || !a[n][e])) {
233
- if (!f) {
234
- const s = Object.keys(a[n][e]);
233
+ function O(e, t, n = !0) {
234
+ o == null || o.setFieldValue(l.name, void 0, !0, (a, f) => {
235
+ if (!(!a[f] || !a[f][e])) {
236
+ if (!n) {
237
+ const s = Object.keys(a[f][e]);
235
238
  for (const u of s)
236
- u !== l.rowKey && delete a[n][e][u];
239
+ u !== l.rowKey && delete a[f][e][u];
237
240
  }
238
- Object.assign(a[n][e], {
241
+ Object.assign(a[f][e], {
239
242
  ...t
240
243
  });
241
244
  }
@@ -245,11 +248,11 @@ const Ce = /* @__PURE__ */ A({
245
248
  o == null || o.setFieldValue(l.name, e);
246
249
  }
247
250
  function K(e) {
248
- var f;
251
+ var n;
249
252
  const t = e === "end" ? d.value.length - 1 : e;
250
- (f = c.value) == null || f.scrollToRow(t);
253
+ (n = c.value) == null || n.scrollToRow(t);
251
254
  }
252
- function P() {
255
+ function H() {
253
256
  var e;
254
257
  (e = o == null ? void 0 : o.setFieldValue) == null || e.call(o, l.name, []);
255
258
  }
@@ -262,13 +265,13 @@ const Ce = /* @__PURE__ */ A({
262
265
  addMultiple: T,
263
266
  scrollTo: K,
264
267
  setTableData: z,
265
- clear: P,
268
+ clear: H,
266
269
  removeByKey: _
267
270
  }), (e, t) => (q(), $(r(C).FormItem, y(e.formItem, {
268
271
  name: e.name,
269
272
  label: e.label
270
273
  }), {
271
- default: g(() => [J(ne, y(r(oe)(l, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "formItem"]), {
274
+ default: g(() => [J(fe, y(r(oe)(l, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue", "formItem"]), {
272
275
  ref_key: "tableRef",
273
276
  ref: c,
274
277
  class: r(S)(),
@@ -277,9 +280,9 @@ const Ce = /* @__PURE__ */ A({
277
280
  "search-form": !1
278
281
  }), Q({
279
282
  _: 2
280
- }, [X(B, (f, a) => ({
283
+ }, [X(B, (n, a) => ({
281
284
  name: a,
282
- fn: g((n) => [Y(e.$slots, a, Z(I(n || {})))])
285
+ fn: g((f) => [Y(e.$slots, a, Z(I(f || {})))])
283
286
  }))]), 1040, ["class", "columns", "data-source"])]),
284
287
  _: 3
285
288
  }, 16, ["name", "label"]));
@@ -146,6 +146,9 @@ const Re = /* @__PURE__ */ $({
146
146
  },
147
147
  expandable: {},
148
148
  value: {},
149
+ rowHighlightable: {
150
+ type: [Boolean, Function]
151
+ },
149
152
  columns: {},
150
153
  defaultValue: {},
151
154
  "onUpdate:value": {},
@@ -158,12 +161,12 @@ const Re = /* @__PURE__ */ $({
158
161
  },
159
162
  emits: ["update:value"],
160
163
  setup(B, {
161
- expose: S,
162
- emit: F
164
+ expose: F,
165
+ emit: S
163
166
  }) {
164
167
  const N = q(), o = B, {
165
168
  b: V
166
- } = re("editable-grid"), _ = F, w = v(), {
169
+ } = re("editable-grid"), _ = S, w = v(), {
167
170
  value: m,
168
171
  updateValue: L
169
172
  } = ue(o, _), i = v(), k = ie("valueTypeMap"), c = y.useWatch(o.name, i);
@@ -236,14 +239,14 @@ const Re = /* @__PURE__ */ $({
236
239
  s[n] = s[n].filter((r) => !t.has(r[o.rowKey]));
237
240
  }));
238
241
  }
239
- function I() {
242
+ function H() {
240
243
  return u(m);
241
244
  }
242
- function P(e) {
245
+ function I(e) {
243
246
  var t;
244
247
  (t = i.value) == null || t.setFieldValue(o.name, e);
245
248
  }
246
- function H(e) {
249
+ function P(e) {
247
250
  var t;
248
251
  return (t = u(m)) == null ? void 0 : t[e];
249
252
  }
@@ -271,18 +274,18 @@ const Re = /* @__PURE__ */ $({
271
274
  var e, t;
272
275
  (t = (e = i.value) == null ? void 0 : e.setFieldValue) == null || t.call(e, o.name, []);
273
276
  }
274
- return S({
277
+ return F({
275
278
  resetFields: E,
276
279
  validateFields: j,
277
280
  add: O,
278
281
  remove: A,
279
- getRowData: H,
280
- getRowsData: I,
282
+ getRowData: P,
283
+ getRowsData: H,
281
284
  setRowData: W,
282
285
  addMultiple: z,
283
286
  scrollTo: G,
284
287
  clear: U,
285
- setTableData: P,
288
+ setTableData: I,
286
289
  removeByKey: K
287
290
  }), (e, t) => (Q(), J(u(y), {
288
291
  ref_key: "formRef",
@@ -1,30 +1,30 @@
1
- import { defineComponent as Be, useSlots as Ie, getCurrentInstance as Ee, ref as F, computed as n, unref as o, watch as B, createElementBlock as I, openBlock as i, normalizeStyle as V, normalizeClass as g, createCommentVNode as y, createElementVNode as E, createVNode as X, mergeProps as h, createSlots as J, withCtx as v, Fragment as Q, renderList as L, createBlock as m, resolveDynamicComponent as D, renderSlot as O, normalizeProps as Pe, guardReactiveProps as Ne } from "vue";
2
- import { VxeTable as Te, VxeColumn as Y } from "vxe-table";
1
+ import { defineComponent as Ee, useSlots as Pe, getCurrentInstance as Ne, ref as F, computed as n, unref as o, watch as B, createElementBlock as I, openBlock as i, normalizeStyle as V, normalizeClass as g, createCommentVNode as y, createElementVNode as E, createVNode as X, mergeProps as h, createSlots as J, withCtx as v, Fragment as Q, renderList as L, createBlock as m, resolveDynamicComponent as D, renderSlot as O, normalizeProps as Te, guardReactiveProps as ze } from "vue";
2
+ import { VxeTable as Ae, VxeColumn as Y } from "vxe-table";
3
3
  import "vxe-table/es/style.css";
4
4
  import "vxe-pc-ui/es/style.css";
5
5
  import { VxeUI as Z } from "vxe-pc-ui";
6
- import { isUndefined as S, omit as ze } from "lodash-unified";
7
- import { ApForm as Ae } from "../ap-form/index.mjs";
6
+ import { isUndefined as w, isFunction as _e, omit as Ve } from "lodash-unified";
7
+ import { ApForm as Le } from "../ap-form/index.mjs";
8
8
  import "../config-provider/index.mjs";
9
- import { noRenderAsFormItemValueList as _e } from "../ap-table/constants.mjs";
10
- import { getColumnOrder as ee, updateFormProps as Ve, getFieldProps as Le, getSearchFormItemRenderNode as De, recursionApColumns as oe } from "../ap-table/utils.mjs";
11
- import { useTablePaging as Oe } from "../ap-table/hooks/use-table-paging-ng.mjs";
12
- import { Empty as ae, Pagination as $e } from "@aplus-frontend/antdv";
13
- import { useInnerParams as Ke } from "./hooks/use-inner-params.mjs";
14
- import { toVxeProps as We, getRowExpandProps as je, getRowSelectionProps as He } from "./utils/table.mjs";
15
- import Me from "../ap-table/hooks/use-table-row-selection.mjs";
16
- import { useProvideApTable as qe } from "../ap-table/context.mjs";
17
- import { sizeReverseMap as Ue, sizeMap as Ge, ROW_SELECTION_FIELD as Xe } from "./constants.mjs";
18
- import { useRenderColumns as Je } from "./hooks/use-render-columns.mjs";
19
- import { useToken as Qe } from "@aplus-frontend/antdv/es/theme/internal";
9
+ import { noRenderAsFormItemValueList as De } from "../ap-table/constants.mjs";
10
+ import { getColumnOrder as ee, updateFormProps as Oe, getFieldProps as $e, getSearchFormItemRenderNode as Ke, recursionApColumns as oe } from "../ap-table/utils.mjs";
11
+ import { useTablePaging as He } from "../ap-table/hooks/use-table-paging-ng.mjs";
12
+ import { Empty as ae, Pagination as We } from "@aplus-frontend/antdv";
13
+ import { useInnerParams as je } from "./hooks/use-inner-params.mjs";
14
+ import { toVxeProps as Me, getRowExpandProps as qe, getRowSelectionProps as Ue } from "./utils/table.mjs";
15
+ import Ge from "../ap-table/hooks/use-table-row-selection.mjs";
16
+ import { useProvideApTable as Xe } from "../ap-table/context.mjs";
17
+ import { sizeReverseMap as Je, sizeMap as Qe, ROW_SELECTION_FIELD as Ye } from "./constants.mjs";
18
+ import { useRenderColumns as Ze } from "./hooks/use-render-columns.mjs";
19
+ import { useToken as eo } from "@aplus-frontend/antdv/es/theme/internal";
20
20
  import "../scroll-bar/index.mjs";
21
- import { isDef as Ye } from "../utils/index.mjs";
22
- import { getValidVNodeList as Ze } from "../utils/slot.mjs";
23
- import { useNamespace as eo } from "../config-provider/hooks/use-namespace.mjs";
24
- import { useGlobalConfig as oo } from "../config-provider/hooks/use-global-config.mjs";
25
- import { useLocale as ao } from "../config-provider/hooks/use-locale.mjs";
26
- import ro from "../scroll-bar/index.vue.mjs";
27
- const To = /* @__PURE__ */ Be({
21
+ import { isDef as oo } from "../utils/index.mjs";
22
+ import { getValidVNodeList as ao } from "../utils/slot.mjs";
23
+ import { useNamespace as ro } from "../config-provider/hooks/use-namespace.mjs";
24
+ import { useGlobalConfig as to } from "../config-provider/hooks/use-global-config.mjs";
25
+ import { useLocale as lo } from "../config-provider/hooks/use-locale.mjs";
26
+ import no from "../scroll-bar/index.vue.mjs";
27
+ const _o = /* @__PURE__ */ Ee({
28
28
  name: "ApGrid",
29
29
  __name: "index",
30
30
  props: {
@@ -111,34 +111,35 @@ const To = /* @__PURE__ */ Be({
111
111
  footer: {},
112
112
  virtual: { type: [Boolean, Object], default: void 0 },
113
113
  expandable: {},
114
- value: {}
114
+ value: {},
115
+ rowHighlightable: { type: [Boolean, Function], default: !1 }
115
116
  },
116
117
  setup(re, { expose: te }) {
117
118
  var G;
118
- const C = Ie(), a = re, w = (G = Ee()) == null ? void 0 : G.appContext.app;
119
- w && !w.__VXE_PC_UI_INSTALLED__ && (w.use(Z), w.__VXE_PC_UI_INSTALLED__ = !0);
120
- const { e: P, b: c, be: le } = eo("ap-grid"), ne = oo("valueTypeMap"), s = F([]), $ = F([]), u = F(), x = F(a.size), [, d] = Qe(), { t: se } = ao();
119
+ const C = Pe(), a = re, S = (G = Ne()) == null ? void 0 : G.appContext.app;
120
+ S && !S.__VXE_PC_UI_INSTALLED__ && (S.use(Z), S.__VXE_PC_UI_INSTALLED__ = !0);
121
+ const { e: P, b: u, be: le } = ro("ap-grid"), ne = to("valueTypeMap"), s = F([]), $ = F([]), d = F(), x = F(a.size), [, c] = eo(), { t: se } = lo();
121
122
  Z.setConfig({
122
123
  i18n: (e, r) => se(`ap.${e}`, r)
123
124
  });
124
- const { renderConfig: ie, updateSignal: de } = Je(s);
125
+ const { renderConfig: ie, updateSignal: de } = Ze(s);
125
126
  let K = 0;
126
127
  const ce = n(() => {
127
- if (u.value)
128
- return u.value.$el.querySelector(
128
+ if (d.value)
129
+ return d.value.$el.querySelector(
129
130
  ".vxe-table--header-inner-wrapper"
130
131
  );
131
- }), W = n(() => {
132
+ }), H = n(() => {
132
133
  var e, r, l;
133
134
  return K++, ((l = (r = (e = a.columns) == null ? void 0 : e.filter(
134
- (t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !_e.includes(t.valueType)
135
+ (t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !De.includes(t.valueType)
135
136
  )) == null ? void 0 : r.sort((t, p) => {
136
137
  let b = ee(t.order);
137
138
  return ee(p.order) - b;
138
139
  })) == null ? void 0 : l.map((t) => {
139
- const p = Ve(
140
+ const p = Oe(
140
141
  t,
141
- Le(t.fieldProps, {})
142
+ $e(t.fieldProps, {})
142
143
  ), b = {
143
144
  ...t,
144
145
  fieldProps: {
@@ -151,26 +152,26 @@ const To = /* @__PURE__ */ Be({
151
152
  },
152
153
  renderNode: void 0
153
154
  };
154
- return b.renderNode = De(
155
+ return b.renderNode = Ke(
155
156
  b,
156
157
  o(ne)
157
158
  ), b;
158
159
  })) || [];
159
160
  }), ue = n(() => {
160
161
  var r;
161
- return Ye(a.manual) ? a.manual : Ze(((r = C.searchFormExtra) == null ? void 0 : r.call(C)) || []).some((l) => {
162
+ return oo(a.manual) ? a.manual : ao(((r = C.searchFormExtra) == null ? void 0 : r.call(C)) || []).some((l) => {
162
163
  var t;
163
164
  return ((t = l.type) == null ? void 0 : t.name) === "ApView";
164
165
  });
165
166
  }), pe = n(() => [
166
- c(),
167
- a.card ? null : c("wrapper"),
168
- a.adaptive ? c("adaptive") : null,
169
- a.sticky ? c("sticky") : null
170
- ].filter(Boolean)), j = n(() => oe(o(s), (e) => {
167
+ u(),
168
+ a.card ? null : u("wrapper"),
169
+ a.adaptive ? u("adaptive") : null,
170
+ a.sticky ? u("sticky") : null
171
+ ].filter(Boolean)), W = n(() => oe(o(s), (e) => {
171
172
  if (e.sorter === !0)
172
173
  return e.key || e.dataIndex;
173
- }).filter(Boolean)), H = n(() => oe(o(s), (e) => {
174
+ }).filter(Boolean)), j = n(() => oe(o(s), (e) => {
174
175
  if (e.filters && !e.onFilter)
175
176
  return e.key || e.dataIndex;
176
177
  }).filter(Boolean)), {
@@ -182,10 +183,10 @@ const To = /* @__PURE__ */ Be({
182
183
  tableProps: M,
183
184
  setDataSource: fe,
184
185
  handleTableChangeOptional: ge
185
- } = Oe({
186
+ } = He({
186
187
  async request(e) {
187
188
  var l;
188
- if (!k.value.preserveSelectedRowKeys && S(a.dataSource) && _(), !S(a.dataSource)) {
189
+ if (!k.value.preserveSelectedRowKeys && w(a.dataSource) && _(), !w(a.dataSource)) {
189
190
  const t = e.pageSize * (e.current - 1);
190
191
  return {
191
192
  data: (a.pagination === !1 ? a.dataSource : a.dataSource.slice(t, t + e.pageSize)) || [],
@@ -199,29 +200,29 @@ const To = /* @__PURE__ */ Be({
199
200
  };
200
201
  },
201
202
  namespace: "ap-grid",
202
- filterFields: H,
203
- sortFields: j,
203
+ filterFields: j,
204
+ sortFields: W,
204
205
  defaultParams: a.params,
205
206
  defaultData: a.defaultData,
206
207
  manual: o(ue),
207
208
  formatParams: a.beforeSearchSubmit,
208
209
  pagination: a.pagination,
209
- onClickReset: ke
210
- }), { sortChangeEvent: he, filterChangeEvent: ve, paginationChangeEvent: Ce } = Ke(ge);
211
- qe({
210
+ onClickReset: Be
211
+ }), { sortChangeEvent: he, filterChangeEvent: ve, paginationChangeEvent: Ce } = je(ge);
212
+ Xe({
212
213
  columns: n(() => s.value),
213
214
  columnsBackup: n(() => $.value),
214
- size: n(() => Ge[x.value]),
215
+ size: n(() => Qe[x.value]),
215
216
  updateColumns(e) {
216
217
  var r;
217
218
  s.value = e, (r = a.onShownColumnsChange) == null || r.call(a, e);
218
219
  },
219
220
  updateSize(e) {
220
- x.value = Ue[e];
221
+ x.value = Je[e];
221
222
  },
222
223
  renderConfig: n(() => ({
223
224
  className: le("table-header", "title"),
224
- color: d.value.colorTextTertiary
225
+ color: c.value.colorTextTertiary
225
226
  })),
226
227
  dataSource: n(() => o(f).records),
227
228
  getSearchFormValues: U,
@@ -234,24 +235,29 @@ const To = /* @__PURE__ */ Be({
234
235
  (e) => e.fixed === "left" || e.fixed === !0
235
236
  ) ? "left" : void 0
236
237
  ), ye = n(
237
- () => S(a.loading) ? f.loading : a.loading
238
- ), Se = n(
239
- () => S(a.dataSource) ? f.records : a.dataSource
240
- ), { selectedRows: R, rowSelection: k, ...we } = Me({
238
+ () => w(a.loading) ? f.loading : a.loading
239
+ ), we = n(
240
+ () => w(a.dataSource) ? f.records : a.dataSource
241
+ ), { selectedRows: R, rowSelection: k, ...Se } = Ge({
241
242
  ...a.rowSelection === !0 ? {} : a.rowSelection,
242
- dataSource: Se,
243
+ dataSource: we,
243
244
  rowKey: a.rowKey
244
245
  }), A = () => {
245
- const e = u.value;
246
+ const e = d.value;
246
247
  e && (R.value = [
247
248
  ...e.getCheckboxReserveRecords(),
248
249
  ...e.getCheckboxRecords()
249
250
  ]);
250
251
  }, xe = () => {
251
- const e = u.value;
252
+ const e = d.value;
252
253
  e && (R.value = [e.getRadioRecord()]);
254
+ }, Re = ({
255
+ row: e
256
+ }) => {
257
+ const r = a.rowHighlightable;
258
+ _e(r) && r(e);
253
259
  };
254
- function Re() {
260
+ function ke() {
255
261
  var e;
256
262
  return ((e = a.columns) == null ? void 0 : e.filter((r) => !r.hideInTable)) || [];
257
263
  }
@@ -265,25 +271,32 @@ const To = /* @__PURE__ */ Be({
265
271
  return (p = (t = (l = N.value) == null ? void 0 : l.apForm) == null ? void 0 : t[r]) == null ? void 0 : p.call(t, !0);
266
272
  }
267
273
  function _() {
268
- we.clearAll();
269
- const e = u.value;
274
+ Se.clearAll();
275
+ const e = d.value;
270
276
  e && (k.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
271
277
  }
272
- function ke() {
273
- const e = u.value;
278
+ function Fe(e) {
279
+ const r = d.value;
280
+ if (!r)
281
+ return;
282
+ const l = String(e[a.rowKey]), t = r.getRowById(l);
283
+ r.setCurrentRow(t);
284
+ }
285
+ function Be() {
286
+ const e = d.value;
274
287
  e && (e.clearSort(), e.clearFilter());
275
288
  }
276
- async function Fe(e, r) {
289
+ async function Ie(e, r) {
277
290
  var t;
278
291
  const l = f.records[e];
279
292
  if (l)
280
- return (t = u.value) == null ? void 0 : t.scrollToRow(l, r);
293
+ return (t = d.value) == null ? void 0 : t.scrollToRow(l, r);
281
294
  }
282
295
  return B(
283
296
  () => [a.columnResizable, a.columns],
284
297
  () => {
285
298
  var r;
286
- const e = Re();
299
+ const e = ke();
287
300
  s.value = e, (r = a.onShownColumnsChange) == null || r.call(a, e), $.value = e;
288
301
  },
289
302
  {
@@ -318,18 +331,19 @@ const To = /* @__PURE__ */ Be({
318
331
  selectedRows: n(() => R.value),
319
332
  clearAll: _
320
333
  },
321
- scrollToRow: Fe,
322
- getDataSource: () => o(f.records)
334
+ scrollToRow: Ie,
335
+ getDataSource: () => o(f.records),
336
+ setCurrentRow: Fe
323
337
  }), (e, r) => (i(), I("div", {
324
338
  class: g(pe.value),
325
339
  style: V(e.wrapperStyle)
326
340
  }, [
327
- o(S)(e.dataSource) && e.searchForm !== !1 && W.value.length > 0 ? (i(), I("div", {
341
+ o(w)(e.dataSource) && e.searchForm !== !1 && H.value.length > 0 ? (i(), I("div", {
328
342
  key: 0,
329
343
  class: g(e.card ? o(P)("search-wrapper") : null),
330
344
  style: V(e.searchFormWrapperStyle)
331
345
  }, [
332
- X(o(Ae).SearchForm, h(e.searchForm || {}, {
346
+ X(o(Le).SearchForm, h(e.searchForm || {}, {
333
347
  ref_key: "formRef",
334
348
  ref: N,
335
349
  "custom-reset": "",
@@ -338,7 +352,7 @@ const To = /* @__PURE__ */ Be({
338
352
  onReset: o(z)
339
353
  }), J({
340
354
  default: v(() => [
341
- (i(!0), I(Q, null, L(W.value, (l) => (i(), m(D(l.renderNode.Comp), h({
355
+ (i(!0), I(Q, null, L(H.value, (l) => (i(), m(D(l.renderNode.Comp), h({
342
356
  key: l.dataIndex,
343
357
  item: l,
344
358
  ref_for: !0
@@ -363,7 +377,7 @@ const To = /* @__PURE__ */ Be({
363
377
  style: V(e.tableWrapperStyle)
364
378
  }, [
365
379
  E("div", {
366
- class: g(o(c)("header-wrapper"))
380
+ class: g(o(u)("header-wrapper"))
367
381
  }, [
368
382
  O(e.$slots, "title", {
369
383
  selectedRows: o(R),
@@ -373,33 +387,33 @@ const To = /* @__PURE__ */ Be({
373
387
  })
374
388
  ], 2),
375
389
  E("div", {
376
- class: g(o(c)("vxe-wrapper"))
390
+ class: g(o(u)("vxe-wrapper"))
377
391
  }, [
378
- (i(), m(o(Te), h(o(We)(a), {
392
+ (i(), m(o(Ae), h(o(Me)(a), {
379
393
  ref_key: "tableRef",
380
- ref: u,
394
+ ref: d,
381
395
  key: o(de),
382
396
  data: o(f).records,
383
397
  "sort-config": {
384
- remote: j.value.length > 0,
398
+ remote: W.value.length > 0,
385
399
  trigger: "cell"
386
400
  },
387
401
  "filter-config": {
388
- remote: H.value.length > 0
402
+ remote: j.value.length > 0
389
403
  },
390
404
  loading: ye.value,
391
405
  style: {
392
- "--vxe-ui-table-row-checkbox-checked-background-color": o(d).controlItemBgActive,
393
- "--vxe-ui-table-row-hover-checkbox-checked-background-color": o(d).controlItemBgActiveHover,
394
- "--vxe-ui-font-primary-color": o(d).colorPrimary,
406
+ "--vxe-ui-table-row-checkbox-checked-background-color": o(c).controlItemBgActive,
407
+ "--vxe-ui-table-row-hover-checkbox-checked-background-color": o(c).controlItemBgActiveHover,
408
+ "--vxe-ui-font-primary-color": o(c).colorPrimary,
395
409
  "--vxe-ui-table-header-background-color": "var(--ap-table-header-bg)",
396
410
  "--vxe-ui-table-cell-padding-default": "12px",
397
411
  "--vxe-ui-table-cell-padding-medium": "9px",
398
- "--vxe-ui-table-row-radio-checked-background-color": o(d).controlItemBgActive,
399
- "--vxe-ui-table-row-hover-radio-checked-background-color": o(d).controlItemBgActiveHover,
400
- "--vxe-ui-font-color": o(d).colorTextBase,
401
- "--vxe-ui-table-border-color": o(d).colorBorderSecondary,
402
- "--vxe-ui-table-header-font-color": o(d).colorTextBase
412
+ "--vxe-ui-table-row-radio-checked-background-color": o(c).controlItemBgActive,
413
+ "--vxe-ui-table-row-hover-radio-checked-background-color": o(c).controlItemBgActiveHover,
414
+ "--vxe-ui-font-color": o(c).colorTextBase,
415
+ "--vxe-ui-table-border-color": o(c).colorBorderSecondary,
416
+ "--vxe-ui-table-header-font-color": o(c).colorTextBase
403
417
  },
404
418
  size: x.value,
405
419
  onSortChange: o(he),
@@ -407,7 +421,8 @@ const To = /* @__PURE__ */ Be({
407
421
  onCheckboxChange: A,
408
422
  onCheckboxRangeChange: A,
409
423
  onCheckboxAll: A,
410
- onRadioChange: xe
424
+ onRadioChange: xe,
425
+ onCurrentChange: Re
411
426
  }), J({
412
427
  empty: v(() => [
413
428
  X(o(ae), {
@@ -415,31 +430,31 @@ const To = /* @__PURE__ */ Be({
415
430
  }, null, 8, ["image"])
416
431
  ]),
417
432
  default: v(() => [
418
- a.expandable && s.value.length ? (i(), m(o(Y), h({ key: 0 }, o(je)(e.expandable), { fixed: be.value }), {
433
+ a.expandable && s.value.length ? (i(), m(o(Y), h({ key: 0 }, o(qe)(e.expandable), { fixed: be.value }), {
419
434
  content: v((l) => [
420
435
  (i(), m(D(a.expandable.renderContent(l))))
421
436
  ]),
422
437
  _: 1
423
438
  }, 16, ["fixed"])) : y("", !0),
424
- a.rowSelection && s.value.length ? (i(), m(o(Y), h({ key: 1 }, o(He)(o(k), s.value), { field: o(Xe) }), null, 16, ["field"])) : y("", !0),
439
+ a.rowSelection && s.value.length ? (i(), m(o(Y), h({ key: 1 }, o(Ue)(o(k), s.value), { field: o(Ye) }), null, 16, ["field"])) : y("", !0),
425
440
  (i(!0), I(Q, null, L(o(ie), (l) => (i(), m(D(l), {
426
441
  key: l.props.colId
427
442
  }))), 128))
428
443
  ]),
429
444
  _: 2
430
445
  }, [
431
- L(o(ze)(C, ["searchFormExtra"]), (l, t) => ({
446
+ L(o(Ve)(C, ["searchFormExtra"]), (l, t) => ({
432
447
  name: t,
433
448
  fn: v((p) => [
434
- O(e.$slots, t, Pe(Ne(p || {})))
449
+ O(e.$slots, t, Te(ze(p || {})))
435
450
  ])
436
451
  }))
437
452
  ]), 1040, ["data", "sort-config", "filter-config", "loading", "style", "size", "onSortChange", "onFilterChange"]))
438
453
  ], 2),
439
454
  E("div", {
440
- class: g(o(c)("pagination-wrapper"))
455
+ class: g(o(u)("pagination-wrapper"))
441
456
  }, [
442
- e.sticky ? (i(), m(o(ro), {
457
+ e.sticky ? (i(), m(o(no), {
443
458
  key: 0,
444
459
  direction: "horizontal",
445
460
  "scroll-container": ce.value,
@@ -447,9 +462,9 @@ const To = /* @__PURE__ */ Be({
447
462
  "bar-color": "var(--ap-scrollbar-thumb-color-base)",
448
463
  "track-color": "var(--ap-table-header-bg, #f2f6f9)"
449
464
  }, null, 8, ["scroll-container"])) : y("", !0),
450
- e.pagination !== !1 ? (i(), m(o($e), h({
465
+ e.pagination !== !1 ? (i(), m(o(We), h({
451
466
  key: 1,
452
- class: o(c)("pagination")
467
+ class: o(u)("pagination")
453
468
  }, o(M).pagination, { onChange: o(Ce) }), null, 16, ["class", "onChange"])) : y("", !0)
454
469
  ], 2)
455
470
  ], 6)
@@ -457,5 +472,5 @@ const To = /* @__PURE__ */ Be({
457
472
  }
458
473
  });
459
474
  export {
460
- To as default
475
+ _o as default
461
476
  };