@ys-knife-crud/taro 0.0.6 → 0.0.7

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.
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { defineComponent as Y, ref as x, computed as I, watch as X, getCurrentInstance as ae, onMounted as G, openBlock as f, createElementBlock as m, normalizeStyle as z, createElementVNode as o, Fragment as L, renderList as H, normalizeClass as V, createCommentVNode as w, renderSlot as P, toDisplayString as $, nextTick as ie, inject as re, onBeforeUnmount as se, useSlots as ue, shallowRef as oe, provide as ce, withDirectives as fe, vShow as de, createBlock as K, withCtx as q, unref as B, withModifiers as W, createVNode as Q } from "vue";
1
+ import { defineComponent as Y, ref as x, computed as I, watch as X, getCurrentInstance as ae, onMounted as G, openBlock as d, createElementBlock as m, normalizeStyle as O, createElementVNode as f, Fragment as L, renderList as H, normalizeClass as R, createCommentVNode as w, renderSlot as T, toDisplayString as $, nextTick as ie, inject as re, onBeforeUnmount as se, useSlots as ue, shallowRef as oe, provide as ce, withDirectives as fe, vShow as de, createBlock as z, withCtx as M, unref as B, withModifiers as W, createVNode as Q } from "vue";
2
2
  import { createSelectorQuery as ye } from "@tarojs/taro";
3
- import { emptyFilter as me, FilterInfo as ve, filter as A, con as M, Operator as U } from "@ys-knife-crud/core";
4
- import './index.css';const he = ["lower-threshold"], ge = { class: "yk-infinite-list__content" }, pe = ["onTap"], ke = {
3
+ import { emptyFilter as me, FilterInfo as ve, filter as A, con as N, Operator as U } from "@ys-knife-crud/core";
4
+ import './index.css';const ge = ["lower-threshold"], he = { class: "yk-infinite-list__content" }, pe = ["onTap"], ke = {
5
5
  key: 0,
6
6
  class: "yk-infinite-list__checkbox-icon"
7
7
  }, _e = { class: "yk-infinite-list__item-body" }, xe = { class: "yk-infinite-list__item-json" }, Se = {
@@ -47,47 +47,47 @@ import './index.css';const he = ["lower-threshold"], ge = { class: "yk-infinite-
47
47
  showCheckbox: { type: Boolean, default: !1 }
48
48
  },
49
49
  emits: ["data-loaded", "error", "selection-change"],
50
- setup(e, { expose: s, emit: r }) {
51
- const t = e, d = r, c = x([]), u = x(!1), l = x(!1), n = x(!0), i = x(null), _ = x(0), b = I(() => c.value.length), y = x(/* @__PURE__ */ new Map()), C = I(() => [...y.value.values()]);
50
+ setup(e, { expose: u, emit: s }) {
51
+ const l = e, a = s, o = x([]), c = x(!1), t = x(!1), n = x(!0), i = x(null), _ = x(0), b = I(() => o.value.length), y = x(/* @__PURE__ */ new Map()), C = I(() => [...y.value.values()]);
52
52
  function S(v) {
53
- return y.value.has(String(v[t.rowKey]));
53
+ return y.value.has(String(v[l.rowKey]));
54
54
  }
55
- function T(v, p) {
56
- const g = String(v[t.rowKey]), R = new Map(y.value), E = R.has(g), N = p ?? !E;
57
- N && !E ? R.set(g, v) : !N && E && R.delete(g), y.value = R;
55
+ function P(v, p) {
56
+ const h = String(v[l.rowKey]), V = new Map(y.value), E = V.has(h), q = p ?? !E;
57
+ q && !E ? V.set(h, v) : !q && E && V.delete(h), y.value = V;
58
58
  }
59
59
  function k() {
60
60
  y.value = /* @__PURE__ */ new Map();
61
61
  }
62
- function a() {
62
+ function r() {
63
63
  const v = new Map(y.value);
64
- for (const p of c.value) v.set(String(p[t.rowKey]), p);
64
+ for (const p of o.value) v.set(String(p[l.rowKey]), p);
65
65
  y.value = v;
66
66
  }
67
- function h() {
67
+ function g() {
68
68
  const v = new Map(y.value);
69
- for (const p of c.value) {
70
- const g = String(p[t.rowKey]);
71
- v.has(g) ? v.delete(g) : v.set(g, p);
69
+ for (const p of o.value) {
70
+ const h = String(p[l.rowKey]);
71
+ v.has(h) ? v.delete(h) : v.set(h, p);
72
72
  }
73
73
  y.value = v;
74
74
  }
75
- X(C, (v) => d("selection-change", [...v]));
75
+ X(C, (v) => a("selection-change", [...v]));
76
76
  async function F(v) {
77
77
  if (v) {
78
- if (l.value || u.value || !n.value) return;
79
- l.value = !0;
78
+ if (t.value || c.value || !n.value) return;
79
+ t.value = !0;
80
80
  } else {
81
- if (u.value) return;
82
- u.value = !0, i.value = null;
81
+ if (c.value) return;
82
+ c.value = !0, i.value = null;
83
83
  }
84
84
  try {
85
- const p = v ? b.value : 0, g = await t.dataFun({ limit: t.pageSize, offset: p });
86
- v ? c.value.push(...g.items) : c.value = g.items, n.value = g.hasNext ?? !1, g.totalCount != null && (_.value = g.totalCount), d("data-loaded", g, v);
85
+ const p = v ? b.value : 0, h = await l.dataFun({ limit: l.pageSize, offset: p });
86
+ v ? o.value.push(...h.items) : o.value = h.items, n.value = h.hasNext ?? !1, h.totalCount != null && (_.value = h.totalCount), a("data-loaded", h, v);
87
87
  } catch (p) {
88
- i.value = p, d("error", p);
88
+ i.value = p, a("error", p);
89
89
  } finally {
90
- v ? l.value = !1 : u.value = !1, i.value || ne();
90
+ v ? t.value = !1 : c.value = !1, i.value || ne();
91
91
  }
92
92
  }
93
93
  function j() {
@@ -97,29 +97,29 @@ import './index.css';const he = ["lower-threshold"], ge = { class: "yk-infinite-
97
97
  n.value = !0, F(!1);
98
98
  }
99
99
  function le() {
100
- n.value && !u.value && !l.value && j();
100
+ n.value && !c.value && !t.value && j();
101
101
  }
102
102
  const J = ae();
103
103
  async function ne() {
104
- if (!n.value || u.value || l.value) return;
104
+ if (!n.value || c.value || t.value) return;
105
105
  await ie();
106
106
  const v = J == null ? void 0 : J.proxy;
107
107
  v && await new Promise((p) => {
108
- ye().in(v).select(".yk-infinite-list").boundingClientRect().select(".yk-infinite-list__content").boundingClientRect().exec((g) => {
109
- const R = g ?? [], E = R[0], N = R[1];
110
- E && N && N.height <= E.height + 1 && j(), p();
108
+ ye().in(v).select(".yk-infinite-list").boundingClientRect().select(".yk-infinite-list__content").boundingClientRect().exec((h) => {
109
+ const V = h ?? [], E = V[0], q = V[1];
110
+ E && q && q.height <= E.height + 1 && j(), p();
111
111
  });
112
112
  });
113
113
  }
114
114
  return G(() => {
115
- t.immediate && F(!1);
116
- }), X(() => t.dataFun, () => D()), s({
115
+ l.immediate && F(!1);
116
+ }), X(() => l.dataFun, () => D()), u({
117
117
  /** 当前已加载的全部数据 */
118
- items: c,
118
+ items: o,
119
119
  /** 首屏加载态 */
120
- loading: u,
120
+ loading: c,
121
121
  /** 追加加载态 */
122
- loadingMore: l,
122
+ loadingMore: t,
123
123
  /** 是否还有下一页 */
124
124
  hasMore: n,
125
125
  /** 重置并从第一页重新加载 */
@@ -129,90 +129,90 @@ import './index.css';const he = ["lower-threshold"], ge = { class: "yk-infinite-
129
129
  /** 手动触发加载下一页(一般由触底自动触发) */
130
130
  loadNextPage: j,
131
131
  /** rows 别名:当前已加载的全部数据(与 YsTable 的 rows 同名) */
132
- rows: c,
132
+ rows: o,
133
133
  /** 跨页累计选中的行(showCheckbox 开启时有意义) */
134
134
  selectedRows: C,
135
135
  /** 某行当前是否选中 */
136
136
  isRowSelected: S,
137
137
  /** 切换某行选中态(selected 缺省时取反) */
138
- toggleRowSelection: T,
138
+ toggleRowSelection: P,
139
139
  /** 清空全部选中 */
140
140
  clearSelection: k,
141
141
  /** 选中当前已加载的全部行 */
142
- selectAllOnPage: a,
142
+ selectAllOnPage: r,
143
143
  /** 反选当前已加载的行 */
144
- invertSelectionOnPage: h
145
- }), (v, p) => (f(), m("scroll-view", {
144
+ invertSelectionOnPage: g
145
+ }), (v, p) => (d(), m("scroll-view", {
146
146
  class: "yk-infinite-list",
147
- style: z({ height: e.height }),
147
+ style: O({ height: e.height }),
148
148
  "scroll-y": "",
149
149
  "lower-threshold": e.threshold,
150
150
  onScrolltolower: le
151
151
  }, [
152
- o("view", ge, [
153
- (f(!0), m(L, null, H(c.value, (g, R) => (f(), m("view", {
154
- key: String(g[e.rowKey]),
155
- class: V(["yk-infinite-list__item", { "is-selected": e.showCheckbox && S(g) }])
152
+ f("view", he, [
153
+ (d(!0), m(L, null, H(o.value, (h, V) => (d(), m("view", {
154
+ key: String(h[e.rowKey]),
155
+ class: R(["yk-infinite-list__item", { "is-selected": e.showCheckbox && S(h) }])
156
156
  }, [
157
- e.showCheckbox ? (f(), m("view", {
157
+ e.showCheckbox ? (d(), m("view", {
158
158
  key: 0,
159
- class: V(["yk-infinite-list__item-checkbox", { "is-checked": S(g) }]),
160
- onTap: (E) => T(g)
159
+ class: R(["yk-infinite-list__item-checkbox", { "is-checked": S(h) }]),
160
+ onTap: (E) => P(h)
161
161
  }, [
162
- S(g) ? (f(), m("text", ke, "✓")) : w("", !0)
162
+ S(h) ? (d(), m("text", ke, "✓")) : w("", !0)
163
163
  ], 42, pe)) : w("", !0),
164
- o("view", _e, [
165
- P(v.$slots, "default", {
166
- row: g,
167
- index: R
164
+ f("view", _e, [
165
+ T(v.$slots, "default", {
166
+ row: h,
167
+ index: V
168
168
  }, () => [
169
- o("text", xe, $(JSON.stringify(g)), 1)
169
+ f("text", xe, $(JSON.stringify(h)), 1)
170
170
  ])
171
171
  ])
172
172
  ], 2))), 128)),
173
- !u.value && c.value.length === 0 && !i.value ? (f(), m("view", Se, [
174
- P(v.$slots, "empty", {}, () => [
175
- p[0] || (p[0] = o("text", { class: "yk-infinite-list__status-text" }, "暂无数据", -1))
173
+ !c.value && o.value.length === 0 && !i.value ? (d(), m("view", Se, [
174
+ T(v.$slots, "empty", {}, () => [
175
+ p[0] || (p[0] = f("text", { class: "yk-infinite-list__status-text" }, "暂无数据", -1))
176
176
  ])
177
- ])) : i.value ? (f(), m("view", we, [
178
- P(v.$slots, "error", { error: i.value }, () => [
179
- o("text", be, "加载失败:" + $(String(i.value)), 1),
180
- o("button", {
177
+ ])) : i.value ? (d(), m("view", we, [
178
+ T(v.$slots, "error", { error: i.value }, () => [
179
+ f("text", be, "加载失败:" + $(String(i.value)), 1),
180
+ f("button", {
181
181
  class: "yk-infinite-list__retry",
182
182
  size: "mini",
183
183
  onTap: D
184
184
  }, "重试", 32)
185
185
  ])
186
186
  ])) : w("", !0),
187
- l.value ? (f(), m("view", Ce, [
188
- P(v.$slots, "loading", {}, () => [
189
- p[1] || (p[1] = o("view", { class: "yk-infinite-list__spinner" }, null, -1)),
190
- p[2] || (p[2] = o("text", null, "加载中...", -1))
187
+ t.value ? (d(), m("view", Ce, [
188
+ T(v.$slots, "loading", {}, () => [
189
+ p[1] || (p[1] = f("view", { class: "yk-infinite-list__spinner" }, null, -1)),
190
+ p[2] || (p[2] = f("text", null, "加载中...", -1))
191
191
  ])
192
192
  ])) : w("", !0),
193
- !n.value && c.value.length > 0 && !u.value ? (f(), m("view", $e, [
194
- P(v.$slots, "no-more", {}, () => [
195
- p[3] || (p[3] = o("text", null, "— 没有更多了 —", -1))
193
+ !n.value && o.value.length > 0 && !c.value ? (d(), m("view", $e, [
194
+ T(v.$slots, "no-more", {}, () => [
195
+ p[3] || (p[3] = f("text", null, "— 没有更多了 —", -1))
196
196
  ])
197
197
  ])) : w("", !0)
198
198
  ])
199
- ], 44, he));
199
+ ], 44, ge));
200
200
  }
201
201
  }), te = Symbol("YsFilterPanel");
202
202
  function Be(e) {
203
- const s = re(te, null);
204
- if (!s) return;
205
- let r = null;
203
+ const u = re(te, null);
204
+ if (!u) return;
205
+ let s = null;
206
206
  G(() => {
207
- r = s(e);
207
+ s = u(e);
208
208
  }), se(() => {
209
- r == null || r(), r = null;
209
+ s == null || s(), s = null;
210
210
  });
211
211
  }
212
- const Ie = { class: "yk-filter-panel__bar" }, Te = { class: "yk-filter-panel__trigger-text" }, Pe = { class: "yk-filter-panel__arrow" }, Ve = { class: "yk-filter-panel__field" }, Re = ["value", "placeholder"], Ye = { class: "yk-filter-panel__actions" }, Ee = {
212
+ const Ie = { class: "yk-filter-panel__bar" }, Pe = { class: "yk-filter-panel__trigger-text" }, Te = { class: "yk-filter-panel__arrow" }, Re = { class: "yk-filter-panel__field" }, Ve = ["value", "placeholder"], Ye = { class: "yk-filter-panel__actions" }, Ee = {
213
213
  key: 0,
214
214
  class: "yk-filter-panel__conditions"
215
- }, qe = /* @__PURE__ */ Y({
215
+ }, Me = /* @__PURE__ */ Y({
216
216
  name: "YsFilterPanel",
217
217
  __name: "filter-panel",
218
218
  props: {
@@ -254,103 +254,103 @@ const Ie = { class: "yk-filter-panel__bar" }, Te = { class: "yk-filter-panel__tr
254
254
  customStyle: { type: String, default: "" }
255
255
  },
256
256
  emits: ["search", "reset", "expand-change"],
257
- setup(e, { expose: s, emit: r }) {
258
- const t = e, d = r, c = ue(), u = I(() => !!c.default), l = x(t.defaultExpanded), n = x(""), i = oe([]);
259
- function _(a) {
260
- return i.value = [...i.value, a], () => {
261
- i.value = i.value.filter((h) => h !== a);
257
+ setup(e, { expose: u, emit: s }) {
258
+ const l = e, a = s, o = ue(), c = I(() => !!o.default), t = x(l.defaultExpanded), n = x(""), i = oe([]);
259
+ function _(r) {
260
+ return i.value = [...i.value, r], () => {
261
+ i.value = i.value.filter((g) => g !== r);
262
262
  };
263
263
  }
264
264
  ce(te, _);
265
265
  const b = I(() => {
266
- const a = n.value.trim();
267
- return !a || !t.textFilterBuilder ? null : t.textFilterBuilder(a) ?? null;
266
+ const r = n.value.trim();
267
+ return !r || !l.textFilterBuilder ? null : l.textFilterBuilder(r) ?? null;
268
268
  }), y = I(() => {
269
- const a = [];
270
- b.value && a.push(b.value);
271
- for (const h of i.value) {
272
- const F = h.filter;
273
- F && a.push(F);
269
+ const r = [];
270
+ b.value && r.push(b.value);
271
+ for (const g of i.value) {
272
+ const F = g.filter;
273
+ F && r.push(F);
274
274
  }
275
- return a.length === 0 ? me() : a.length === 1 ? a[0] : ve.createAnd(...a);
275
+ return r.length === 0 ? me() : r.length === 1 ? r[0] : ve.createAnd(...r);
276
276
  });
277
277
  function C() {
278
- l.value = !l.value, d("expand-change", l.value);
278
+ t.value = !t.value, a("expand-change", t.value);
279
279
  }
280
- function S(a) {
281
- const h = a.detail;
282
- n.value = (h == null ? void 0 : h.value) ?? "";
280
+ function S(r) {
281
+ const g = r.detail;
282
+ n.value = (g == null ? void 0 : g.value) ?? "";
283
283
  }
284
- function T() {
285
- d("search", y.value);
284
+ function P() {
285
+ a("search", y.value);
286
286
  }
287
287
  function k() {
288
288
  n.value = "";
289
- for (const a of i.value) a.reset();
290
- d("reset");
289
+ for (const r of i.value) r.reset();
290
+ a("reset");
291
291
  }
292
- return s({
292
+ return u({
293
293
  /** 文本搜索框当前值(只读读取用,外部不能写入) */
294
294
  keyword: n,
295
295
  /** 条件区是否展开 */
296
- expanded: l,
296
+ expanded: t,
297
297
  /** 当前聚合后的查询条件 */
298
298
  filter: y,
299
299
  /** 切换条件区展开/折叠 */
300
300
  toggle: C,
301
301
  /** 重置(清空文本 + 重置已注册子项 + 派发 reset) */
302
302
  reset: k
303
- }), (a, h) => (f(), m("view", {
304
- class: V(["yk-filter-panel", e.customClass]),
305
- style: z(e.customStyle)
303
+ }), (r, g) => (d(), m("view", {
304
+ class: R(["yk-filter-panel", e.customClass]),
305
+ style: O(e.customStyle)
306
306
  }, [
307
- o("view", Ie, [
308
- u.value ? (f(), m("view", {
307
+ f("view", Ie, [
308
+ c.value ? (d(), m("view", {
309
309
  key: 0,
310
310
  class: "yk-filter-panel__trigger",
311
311
  onTap: C
312
312
  }, [
313
- o("text", Te, $(e.filterText), 1),
314
- o("text", Pe, $(l.value ? "▲" : "▼"), 1)
313
+ f("text", Pe, $(e.filterText), 1),
314
+ f("text", Te, $(t.value ? "▲" : "▼"), 1)
315
315
  ], 32)) : w("", !0),
316
- o("view", Ve, [
317
- o("input", {
316
+ f("view", Re, [
317
+ f("input", {
318
318
  class: "yk-filter-panel__input",
319
319
  value: n.value,
320
320
  placeholder: e.placeholder,
321
321
  "placeholder-class": "yk-filter-panel__placeholder",
322
322
  onInput: S,
323
- onConfirm: T
324
- }, null, 40, Re)
323
+ onConfirm: P
324
+ }, null, 40, Ve)
325
325
  ]),
326
- o("view", Ye, [
327
- e.showSearch ? (f(), m("view", {
326
+ f("view", Ye, [
327
+ e.showSearch ? (d(), m("view", {
328
328
  key: 0,
329
329
  class: "yk-filter-panel__btn yk-filter-panel__btn--primary",
330
- onTap: T
330
+ onTap: P
331
331
  }, [
332
- o("text", null, $(e.searchButtonText), 1)
332
+ f("text", null, $(e.searchButtonText), 1)
333
333
  ], 32)) : w("", !0),
334
- e.showReset ? (f(), m("view", {
334
+ e.showReset ? (d(), m("view", {
335
335
  key: 1,
336
336
  class: "yk-filter-panel__btn yk-filter-panel__btn--default",
337
337
  onTap: k
338
338
  }, [
339
- o("text", null, $(e.resetButtonText), 1)
339
+ f("text", null, $(e.resetButtonText), 1)
340
340
  ], 32)) : w("", !0)
341
341
  ])
342
342
  ]),
343
- u.value ? fe((f(), m("view", Ee, [
344
- P(a.$slots, "default")
343
+ c.value ? fe((d(), m("view", Ee, [
344
+ T(r.$slots, "default")
345
345
  ], 512)), [
346
- [de, l.value]
346
+ [de, t.value]
347
347
  ]) : w("", !0)
348
348
  ], 6));
349
349
  }
350
- }), Ae = { class: "yk-filter-item" }, Me = {
350
+ }), Ae = { class: "yk-filter-item" }, Ne = {
351
351
  key: 0,
352
352
  class: "yk-filter-item__label"
353
- }, Ne = { class: "yk-filter-item__control" }, O = /* @__PURE__ */ Y({
353
+ }, qe = { class: "yk-filter-item__control" }, K = /* @__PURE__ */ Y({
354
354
  name: "YsFilterItemLayout",
355
355
  __name: "filter-item-layout",
356
356
  props: {
@@ -360,97 +360,97 @@ const Ie = { class: "yk-filter-panel__bar" }, Te = { class: "yk-filter-panel__tr
360
360
  api: { type: Object, required: !0 }
361
361
  },
362
362
  setup(e) {
363
- return Be(e.api), (r, t) => (f(), m("view", Ae, [
364
- e.label ? (f(), m("text", Me, $(e.label), 1)) : w("", !0),
365
- o("view", Ne, [
366
- P(r.$slots, "default")
363
+ return Be(e.api), (s, l) => (d(), m("view", Ae, [
364
+ e.label ? (d(), m("text", Ne, $(e.label), 1)) : w("", !0),
365
+ f("view", qe, [
366
+ T(s.$slots, "default")
367
367
  ])
368
368
  ]));
369
369
  }
370
370
  });
371
371
  function De(e) {
372
- const s = x(
372
+ const u = x(
373
373
  typeof e.defaultValue == "string" ? e.defaultValue : ""
374
374
  );
375
- function r(c) {
376
- return c == null || c.trim() === "";
375
+ function s(o) {
376
+ return o == null || o.trim() === "";
377
377
  }
378
- const t = I(() => r(s.value) ? null : A(e.propertyPath, e.op, M(s.value)));
379
- function d() {
380
- s.value = typeof e.defaultValue == "string" ? e.defaultValue : "";
378
+ const l = I(() => s(u.value) ? null : A(e.propertyPath, e.op, N(u.value)));
379
+ function a() {
380
+ u.value = typeof e.defaultValue == "string" ? e.defaultValue : "";
381
381
  }
382
- return { value: s, filter: t, reset: d };
382
+ return { value: u, filter: l, reset: a };
383
383
  }
384
384
  function Le(e) {
385
- const s = x(
385
+ const u = x(
386
386
  typeof e.defaultValue == "string" ? e.defaultValue : ""
387
387
  );
388
- function r(c) {
389
- return c == null || c.trim() === "";
388
+ function s(o) {
389
+ return o == null || o.trim() === "";
390
390
  }
391
- const t = I(() => r(s.value) ? null : A(e.propertyPath, e.op, M(s.value)));
392
- function d() {
393
- s.value = typeof e.defaultValue == "string" ? e.defaultValue : "";
391
+ const l = I(() => s(u.value) ? null : A(e.propertyPath, e.op, N(u.value)));
392
+ function a() {
393
+ u.value = typeof e.defaultValue == "string" ? e.defaultValue : "";
394
394
  }
395
- return { value: s, filter: t, reset: d };
395
+ return { value: u, filter: l, reset: a };
396
396
  }
397
- function ze(e) {
398
- function s(l) {
399
- return l && l.length === 2 && typeof l[0] == "string" && typeof l[1] == "string" ? [l[0], l[1]] : null;
397
+ function Oe(e) {
398
+ function u(t) {
399
+ return t && t.length === 2 && typeof t[0] == "string" && typeof t[1] == "string" ? [t[0], t[1]] : null;
400
400
  }
401
- const r = s(e.defaultValue), t = x(r);
402
- function d(l) {
403
- return l == null || l.length !== 2 || !l[0] || !l[1];
401
+ const s = u(e.defaultValue), l = x(s);
402
+ function a(t) {
403
+ return t == null || t.length !== 2 || !t[0] || !t[1];
404
404
  }
405
- const c = I(() => {
406
- if (d(t.value)) return null;
407
- const [l, n] = t.value;
408
- return A(e.propertyPath, U.Between, M([l, n]));
405
+ const o = I(() => {
406
+ if (a(l.value)) return null;
407
+ const [t, n] = l.value;
408
+ return A(e.propertyPath, U.Between, N([t, n]));
409
409
  });
410
- function u() {
411
- t.value = r;
410
+ function c() {
411
+ l.value = s;
412
412
  }
413
- return { value: t, filter: c, reset: u };
413
+ return { value: l, filter: o, reset: c };
414
414
  }
415
415
  function Z(e) {
416
416
  return typeof e == "string" || typeof e == "number" ? e : null;
417
417
  }
418
418
  function ee(e) {
419
419
  return Array.isArray(e) ? e.filter(
420
- (s) => typeof s == "string" || typeof s == "number"
420
+ (u) => typeof u == "string" || typeof u == "number"
421
421
  ) : [];
422
422
  }
423
- function Ke(e) {
424
- const s = e.multiple === !0, r = x(
425
- s ? ee(e.defaultValue) : Z(e.defaultValue)
423
+ function ze(e) {
424
+ const u = e.multiple === !0, s = x(
425
+ u ? ee(e.defaultValue) : Z(e.defaultValue)
426
426
  );
427
- function t() {
428
- const u = r.value;
429
- return s ? !Array.isArray(u) || u.length === 0 : u == null || typeof u == "string" && u.trim() === "";
427
+ function l() {
428
+ const c = s.value;
429
+ return u ? !Array.isArray(c) || c.length === 0 : c == null || typeof c == "string" && c.trim() === "";
430
430
  }
431
- const d = I(() => {
432
- if (t()) return null;
433
- if (s) {
434
- const l = r.value;
435
- if (l.length === 1) {
436
- const n = l[0];
437
- return n == null ? null : A(e.propertyPath, U.Equals, M(n));
431
+ const a = I(() => {
432
+ if (l()) return null;
433
+ if (u) {
434
+ const t = s.value;
435
+ if (t.length === 1) {
436
+ const n = t[0];
437
+ return n == null ? null : A(e.propertyPath, U.Equals, N(n));
438
438
  }
439
439
  return A(
440
440
  e.propertyPath,
441
441
  U.In,
442
- M(l)
442
+ N(t)
443
443
  );
444
444
  }
445
- const u = r.value;
446
- return u == null ? null : A(e.propertyPath, e.op, M(u));
445
+ const c = s.value;
446
+ return c == null ? null : A(e.propertyPath, e.op, N(c));
447
447
  });
448
- function c() {
449
- r.value = s ? ee(e.defaultValue) : Z(e.defaultValue);
448
+ function o() {
449
+ s.value = u ? ee(e.defaultValue) : Z(e.defaultValue);
450
450
  }
451
- return { value: r, filter: d, reset: c };
451
+ return { value: s, filter: a, reset: o };
452
452
  }
453
- const Oe = { class: "yk-filter-item__field" }, je = ["value", "placeholder"], yt = /* @__PURE__ */ Y({
453
+ const Ke = { class: "yk-filter-item__field" }, je = ["value", "placeholder"], yt = /* @__PURE__ */ Y({
454
454
  name: "YsTextFilterItem",
455
455
  __name: "text-filter-item",
456
456
  props: {
@@ -468,30 +468,30 @@ const Oe = { class: "yk-filter-item__field" }, je = ["value", "placeholder"], yt
468
468
  /** 占位文本 */
469
469
  placeholder: { type: String, default: "请输入" }
470
470
  },
471
- setup(e, { expose: s }) {
472
- const r = e, { value: t, filter: d, reset: c } = De(r);
473
- function u(n) {
471
+ setup(e, { expose: u }) {
472
+ const s = e, { value: l, filter: a, reset: o } = De(s);
473
+ function c(n) {
474
474
  const i = n.detail;
475
- t.value = (i == null ? void 0 : i.value) ?? "";
475
+ l.value = (i == null ? void 0 : i.value) ?? "";
476
476
  }
477
- const l = {
477
+ const t = {
478
478
  get filter() {
479
- return d.value;
479
+ return a.value;
480
480
  },
481
- reset: c
481
+ reset: o
482
482
  };
483
- return s(l), (n, i) => (f(), K(O, {
483
+ return u(t), (n, i) => (d(), z(K, {
484
484
  label: e.label,
485
- api: l
485
+ api: t
486
486
  }, {
487
- default: q(() => [
488
- o("view", Oe, [
489
- o("input", {
487
+ default: M(() => [
488
+ f("view", Ke, [
489
+ f("input", {
490
490
  class: "yk-filter-item__input",
491
- value: B(t),
491
+ value: B(l),
492
492
  placeholder: e.placeholder,
493
493
  "placeholder-class": "yk-filter-item__placeholder",
494
- onInput: u
494
+ onInput: c
495
495
  }, null, 40, je)
496
496
  ])
497
497
  ]),
@@ -520,46 +520,46 @@ const Oe = { class: "yk-filter-item__field" }, je = ["value", "placeholder"], yt
520
520
  /** 可选范围上限(YYYY-MM-DD),空串表示不限制 */
521
521
  end: { type: String, default: "" }
522
522
  },
523
- setup(e, { expose: s }) {
524
- const r = e, { value: t, filter: d, reset: c } = Le(r);
525
- function u(i) {
523
+ setup(e, { expose: u }) {
524
+ const s = e, { value: l, filter: a, reset: o } = Le(s);
525
+ function c(i) {
526
526
  const _ = i.detail;
527
- t.value = (_ == null ? void 0 : _.value) ?? "";
527
+ l.value = (_ == null ? void 0 : _.value) ?? "";
528
528
  }
529
- function l() {
530
- t.value = "";
529
+ function t() {
530
+ l.value = "";
531
531
  }
532
532
  const n = {
533
533
  get filter() {
534
- return d.value;
534
+ return a.value;
535
535
  },
536
- reset: c
536
+ reset: o
537
537
  };
538
- return s(n), (i, _) => (f(), K(O, {
538
+ return u(n), (i, _) => (d(), z(K, {
539
539
  label: e.label,
540
540
  api: n
541
541
  }, {
542
- default: q(() => [
543
- o("picker", {
542
+ default: M(() => [
543
+ f("picker", {
544
544
  class: "yk-filter-item__picker-trigger",
545
545
  mode: "date",
546
- value: B(t),
546
+ value: B(l),
547
547
  start: e.start,
548
548
  end: e.end,
549
- onChange: u
549
+ onChange: c
550
550
  }, [
551
- o("view", Qe, [
552
- o("text", {
553
- class: V(["yk-filter-item__picker-text", { "yk-filter-item__picker-text--placeholder": !B(t) }])
554
- }, $(B(t) || e.placeholder), 3)
551
+ f("view", Qe, [
552
+ f("text", {
553
+ class: R(["yk-filter-item__picker-text", { "yk-filter-item__picker-text--placeholder": !B(l) }])
554
+ }, $(B(l) || e.placeholder), 3)
555
555
  ])
556
556
  ], 40, Je),
557
- B(t) ? (f(), m("view", {
557
+ B(l) ? (d(), m("view", {
558
558
  key: 0,
559
559
  class: "yk-filter-item__clear",
560
- onTap: W(l, ["stop"])
560
+ onTap: W(t, ["stop"])
561
561
  }, [..._[0] || (_[0] = [
562
- o("text", null, "✕", -1)
562
+ f("text", null, "✕", -1)
563
563
  ])], 32)) : w("", !0)
564
564
  ]),
565
565
  _: 1
@@ -587,71 +587,71 @@ const Oe = { class: "yk-filter-item__field" }, je = ["value", "placeholder"], yt
587
587
  /** 可选范围上限(YYYY-MM-DD),空串表示不限制 */
588
588
  end: { type: String, default: "" }
589
589
  },
590
- setup(e, { expose: s }) {
591
- const r = e, { value: t, filter: d, reset: c } = ze(r);
592
- function u(b, y) {
593
- const C = t.value ?? ["", ""], S = [C[0], C[1]];
594
- S[b] = y, t.value = !S[0] && !S[1] ? null : S;
590
+ setup(e, { expose: u }) {
591
+ const s = e, { value: l, filter: a, reset: o } = Oe(s);
592
+ function c(b, y) {
593
+ const C = l.value ?? ["", ""], S = [C[0], C[1]];
594
+ S[b] = y, l.value = !S[0] && !S[1] ? null : S;
595
595
  }
596
- function l(b) {
596
+ function t(b) {
597
597
  const y = b.detail;
598
- u(0, (y == null ? void 0 : y.value) ?? "");
598
+ c(0, (y == null ? void 0 : y.value) ?? "");
599
599
  }
600
600
  function n(b) {
601
601
  const y = b.detail;
602
- u(1, (y == null ? void 0 : y.value) ?? "");
602
+ c(1, (y == null ? void 0 : y.value) ?? "");
603
603
  }
604
604
  function i() {
605
- t.value = null;
605
+ l.value = null;
606
606
  }
607
607
  const _ = {
608
608
  get filter() {
609
- return d.value;
609
+ return a.value;
610
610
  },
611
- reset: c
611
+ reset: o
612
612
  };
613
- return s(_), (b, y) => (f(), K(O, {
613
+ return u(_), (b, y) => (d(), z(K, {
614
614
  label: e.label,
615
615
  api: _
616
616
  }, {
617
- default: q(() => {
618
- var C, S, T, k, a, h;
617
+ default: M(() => {
618
+ var C, S, P, k, r, g;
619
619
  return [
620
- o("picker", {
620
+ f("picker", {
621
621
  class: "yk-filter-item__picker-trigger",
622
622
  mode: "date",
623
- value: ((C = B(t)) == null ? void 0 : C[0]) ?? "",
623
+ value: ((C = B(l)) == null ? void 0 : C[0]) ?? "",
624
624
  start: e.start,
625
625
  end: e.end,
626
- onChange: l
626
+ onChange: t
627
627
  }, [
628
- o("view", Ge, [
629
- o("text", {
630
- class: V(["yk-filter-item__picker-text", { "yk-filter-item__picker-text--placeholder": !((S = B(t)) != null && S[0]) }])
631
- }, $(((T = B(t)) == null ? void 0 : T[0]) || e.startPlaceholder), 3)
628
+ f("view", Ge, [
629
+ f("text", {
630
+ class: R(["yk-filter-item__picker-text", { "yk-filter-item__picker-text--placeholder": !((S = B(l)) != null && S[0]) }])
631
+ }, $(((P = B(l)) == null ? void 0 : P[0]) || e.startPlaceholder), 3)
632
632
  ])
633
633
  ], 40, Ue),
634
- y[1] || (y[1] = o("text", { class: "yk-filter-item__sep" }, "至", -1)),
635
- o("picker", {
634
+ y[1] || (y[1] = f("text", { class: "yk-filter-item__sep" }, "至", -1)),
635
+ f("picker", {
636
636
  class: "yk-filter-item__picker-trigger",
637
637
  mode: "date",
638
- value: ((k = B(t)) == null ? void 0 : k[1]) ?? "",
638
+ value: ((k = B(l)) == null ? void 0 : k[1]) ?? "",
639
639
  start: e.start,
640
640
  end: e.end,
641
641
  onChange: n
642
642
  }, [
643
- o("view", We, [
644
- o("text", {
645
- class: V(["yk-filter-item__picker-text", { "yk-filter-item__picker-text--placeholder": !((a = B(t)) != null && a[1]) }])
646
- }, $(((h = B(t)) == null ? void 0 : h[1]) || e.endPlaceholder), 3)
643
+ f("view", We, [
644
+ f("text", {
645
+ class: R(["yk-filter-item__picker-text", { "yk-filter-item__picker-text--placeholder": !((r = B(l)) != null && r[1]) }])
646
+ }, $(((g = B(l)) == null ? void 0 : g[1]) || e.endPlaceholder), 3)
647
647
  ])
648
648
  ], 40, He),
649
- B(t) ? (f(), m("view", {
649
+ B(l) ? (d(), m("view", {
650
650
  key: 0,
651
651
  class: "yk-filter-item__clear",
652
652
  onTap: W(i, ["stop"])
653
653
  }, [...y[0] || (y[0] = [
654
- o("text", null, "✕", -1)
654
+ f("text", null, "✕", -1)
655
655
  ])], 32)) : w("", !0)
656
656
  ];
657
657
  }),
@@ -664,7 +664,7 @@ const Oe = { class: "yk-filter-item__field" }, je = ["value", "placeholder"], yt
664
664
  }, Ze = {
665
665
  key: 0,
666
666
  class: "yk-filter-item__chips-empty"
667
- }, et = ["onTap"], tt = ["range", "value"], lt = { class: "yk-filter-item__picker" }, ht = /* @__PURE__ */ Y({
667
+ }, et = ["onTap"], tt = ["range", "value"], lt = { class: "yk-filter-item__picker" }, gt = /* @__PURE__ */ Y({
668
668
  name: "YsEnumFilterItem",
669
669
  __name: "enum-filter-item",
670
670
  props: {
@@ -688,81 +688,81 @@ const Oe = { class: "yk-filter-item__field" }, je = ["value", "placeholder"], yt
688
688
  /** 单选模式是否显示清除按钮 */
689
689
  clearable: { type: Boolean, default: !0 }
690
690
  },
691
- setup(e, { expose: s }) {
692
- const r = e, { value: t, filter: d, reset: c } = Ke(r), u = x([]), l = x(!1);
691
+ setup(e, { expose: u }) {
692
+ const s = e, { value: l, filter: a, reset: o } = ze(s), c = x([]), t = x(!1);
693
693
  G(async () => {
694
- l.value = !0;
694
+ t.value = !0;
695
695
  try {
696
- u.value = await r.optionsSource();
696
+ c.value = await s.optionsSource();
697
697
  } finally {
698
- l.value = !1;
698
+ t.value = !1;
699
699
  }
700
700
  });
701
701
  const n = I(() => {
702
- const k = Array.isArray(t.value) ? null : t.value;
703
- return k == null ? -1 : u.value.findIndex((a) => String(a.value) === String(k));
702
+ const k = Array.isArray(l.value) ? null : l.value;
703
+ return k == null ? -1 : c.value.findIndex((r) => String(r.value) === String(k));
704
704
  }), i = I(() => {
705
- var a;
705
+ var r;
706
706
  const k = n.value;
707
- return k >= 0 ? ((a = u.value[k]) == null ? void 0 : a.label) ?? "" : "";
707
+ return k >= 0 ? ((r = c.value[k]) == null ? void 0 : r.label) ?? "" : "";
708
708
  });
709
709
  function _(k) {
710
- const a = k.detail, h = Number((a == null ? void 0 : a.value) ?? -1), F = u.value[h];
711
- F && (t.value = F.value);
710
+ const r = k.detail, g = Number((r == null ? void 0 : r.value) ?? -1), F = c.value[g];
711
+ F && (l.value = F.value);
712
712
  }
713
713
  function b() {
714
- t.value = null;
714
+ l.value = null;
715
715
  }
716
716
  const y = I(
717
- () => Array.isArray(t.value) ? t.value : []
717
+ () => Array.isArray(l.value) ? l.value : []
718
718
  );
719
719
  function C(k) {
720
- return y.value.some((a) => String(a) === String(k.value));
720
+ return y.value.some((r) => String(r) === String(k.value));
721
721
  }
722
722
  function S(k) {
723
- const a = [...y.value], h = a.findIndex((F) => String(F) === String(k.value));
724
- h >= 0 ? a.splice(h, 1) : a.push(k.value), t.value = a;
723
+ const r = [...y.value], g = r.findIndex((F) => String(F) === String(k.value));
724
+ g >= 0 ? r.splice(g, 1) : r.push(k.value), l.value = r;
725
725
  }
726
- const T = {
726
+ const P = {
727
727
  get filter() {
728
- return d.value;
728
+ return a.value;
729
729
  },
730
- reset: c
730
+ reset: o
731
731
  };
732
- return s(T), (k, a) => (f(), K(O, {
732
+ return u(P), (k, r) => (d(), z(K, {
733
733
  label: e.label,
734
- api: T
734
+ api: P
735
735
  }, {
736
- default: q(() => [
737
- e.multiple ? (f(), m("view", Xe, [
738
- l.value ? (f(), m("text", Ze, "加载中…")) : (f(!0), m(L, { key: 1 }, H(u.value, (h) => (f(), m("view", {
739
- key: String(h.value),
740
- class: V(["yk-filter-item__chip", { "yk-filter-item__chip--active": C(h) }]),
741
- onTap: (F) => S(h)
736
+ default: M(() => [
737
+ e.multiple ? (d(), m("view", Xe, [
738
+ t.value ? (d(), m("text", Ze, "加载中…")) : (d(!0), m(L, { key: 1 }, H(c.value, (g) => (d(), m("view", {
739
+ key: String(g.value),
740
+ class: R(["yk-filter-item__chip", { "yk-filter-item__chip--active": C(g) }]),
741
+ onTap: (F) => S(g)
742
742
  }, [
743
- o("text", null, $(h.label), 1)
743
+ f("text", null, $(g.label), 1)
744
744
  ], 42, et))), 128))
745
- ])) : (f(), m(L, { key: 1 }, [
746
- o("picker", {
745
+ ])) : (d(), m(L, { key: 1 }, [
746
+ f("picker", {
747
747
  class: "yk-filter-item__picker-trigger",
748
748
  mode: "selector",
749
- range: u.value,
749
+ range: c.value,
750
750
  "range-key": "label",
751
751
  value: n.value < 0 ? 0 : n.value,
752
752
  onChange: _
753
753
  }, [
754
- o("view", lt, [
755
- o("text", {
756
- class: V(["yk-filter-item__picker-text", { "yk-filter-item__picker-text--placeholder": !i.value }])
757
- }, $(l.value ? "加载中…" : i.value || e.placeholder), 3)
754
+ f("view", lt, [
755
+ f("text", {
756
+ class: R(["yk-filter-item__picker-text", { "yk-filter-item__picker-text--placeholder": !i.value }])
757
+ }, $(t.value ? "加载中…" : i.value || e.placeholder), 3)
758
758
  ])
759
759
  ], 40, tt),
760
- e.clearable && i.value ? (f(), m("view", {
760
+ e.clearable && i.value ? (d(), m("view", {
761
761
  key: 0,
762
762
  class: "yk-filter-item__clear",
763
763
  onTap: W(b, ["stop"])
764
- }, [...a[0] || (a[0] = [
765
- o("text", null, "✕", -1)
764
+ }, [...r[0] || (r[0] = [
765
+ f("text", null, "✕", -1)
766
766
  ])], 32)) : w("", !0)
767
767
  ], 64))
768
768
  ]),
@@ -784,28 +784,28 @@ const Oe = { class: "yk-filter-item__field" }, je = ["value", "placeholder"], yt
784
784
  customStyle: { type: String, default: "" }
785
785
  },
786
786
  setup(e) {
787
- async function s(r) {
787
+ async function u(s) {
788
788
  try {
789
- await r.execute(void 0);
790
- } catch (t) {
791
- console.error("[YsCommandBar] action failed:", r.name, t);
789
+ await s.execute(void 0);
790
+ } catch (l) {
791
+ console.error("[YsCommandBar] action failed:", s.name, l);
792
792
  }
793
793
  }
794
- return (r, t) => (f(), m("view", {
795
- class: V(["yk-command-bar", e.customClass]),
796
- style: z(e.customStyle)
794
+ return (s, l) => (d(), m("view", {
795
+ class: R(["yk-command-bar", e.customClass]),
796
+ style: O(e.customStyle)
797
797
  }, [
798
- e.actions.length > 0 ? (f(!0), m(L, { key: 0 }, H(e.actions, (d) => (f(), m("view", {
799
- key: d.name,
800
- class: V(["yk-command-bar__btn", [
801
- d.type ? `yk-command-bar__btn--${d.type}` : "yk-command-bar__btn--default",
802
- { "yk-command-bar__btn--plain": d.plain }
798
+ e.actions.length > 0 ? (d(!0), m(L, { key: 0 }, H(e.actions, (a) => (d(), m("view", {
799
+ key: a.name,
800
+ class: R(["yk-command-bar__btn", [
801
+ a.type ? `yk-command-bar__btn--${a.type}` : "yk-command-bar__btn--default",
802
+ { "yk-command-bar__btn--plain": a.plain }
803
803
  ]]),
804
- onTap: (c) => s(d)
804
+ onTap: (o) => u(a)
805
805
  }, [
806
- o("text", at, $(d.desc), 1)
806
+ f("text", at, $(a.desc), 1)
807
807
  ], 42, nt))), 128)) : w("", !0),
808
- P(r.$slots, "default")
808
+ T(s.$slots, "default")
809
809
  ], 6));
810
810
  }
811
811
  }), rt = { class: "yk-infinite-page" }, st = {
@@ -814,7 +814,7 @@ const Oe = { class: "yk-filter-item__field" }, je = ["value", "placeholder"], yt
814
814
  }, ut = { class: "yk-infinite-page__list" }, ot = {
815
815
  key: 1,
816
816
  class: "yk-infinite-page__cmd"
817
- }, gt = /* @__PURE__ */ Y({
817
+ }, ht = /* @__PURE__ */ Y({
818
818
  name: "YsInfinitePage",
819
819
  __name: "infinite-page",
820
820
  props: {
@@ -853,26 +853,126 @@ const Oe = { class: "yk-filter-item__field" }, je = ["value", "placeholder"], yt
853
853
  listCustomStyle: { type: String, default: "" }
854
854
  },
855
855
  emits: ["search", "reset", "expand-change", "data-loaded", "selection-change", "error"],
856
- setup(e, { expose: s, emit: r }) {
857
- const t = r, d = x(null), c = x(null);
858
- s({
859
- /** YsInfiniteList 实例(空壳子 CommandBar 没有 list 引用,业务侧通过这个 ref 调 reload / clearSelection 等) */
856
+ setup(e, { expose: u, emit: s }) {
857
+ const l = s, a = x(null), o = x(null);
858
+ u({
859
+ /* ---------- 数据加载(转发 YsInfiniteList) ---------- */
860
+ /** 重置并从第一页重新加载 */
861
+ reload: () => {
862
+ var t;
863
+ return (t = a.value) == null ? void 0 : t.reload();
864
+ },
865
+ /** 刷新:重置为第一页重新加载(与 reload 同义) */
866
+ refresh: () => {
867
+ var t;
868
+ return (t = a.value) == null ? void 0 : t.refresh();
869
+ },
870
+ /** 手动加载下一页(一般触底自动触发,无需手动调) */
871
+ loadNextPage: () => {
872
+ var t;
873
+ return (t = a.value) == null ? void 0 : t.loadNextPage();
874
+ },
875
+ /* ---------- 列表状态 ---------- */
876
+ /** 当前已加载的全部数据 */
877
+ get items() {
878
+ var t;
879
+ return ((t = a.value) == null ? void 0 : t.items) ?? [];
880
+ },
881
+ /** items 别名(与 YsTable 的 rows 同名) */
882
+ get rows() {
883
+ var t;
884
+ return ((t = a.value) == null ? void 0 : t.rows) ?? [];
885
+ },
886
+ /** 首屏加载态 */
887
+ get loading() {
888
+ var t;
889
+ return ((t = a.value) == null ? void 0 : t.loading) ?? !1;
890
+ },
891
+ /** 追加加载态 */
892
+ get loadingMore() {
893
+ var t;
894
+ return ((t = a.value) == null ? void 0 : t.loadingMore) ?? !1;
895
+ },
896
+ /** 是否还有下一页 */
897
+ get hasMore() {
898
+ var t;
899
+ return ((t = a.value) == null ? void 0 : t.hasMore) ?? !1;
900
+ },
901
+ /* ---------- 多选(showCheckbox 开启时有意义) ---------- */
902
+ /** 跨页累计选中的行 */
903
+ get selectedRows() {
904
+ var t;
905
+ return ((t = a.value) == null ? void 0 : t.selectedRows) ?? [];
906
+ },
907
+ /** 某行当前是否选中 */
908
+ isRowSelected: (t) => {
909
+ var n;
910
+ return ((n = a.value) == null ? void 0 : n.isRowSelected(t)) ?? !1;
911
+ },
912
+ /** 切换某行选中态(selected 缺省时取反) */
913
+ toggleRowSelection: (t, n) => {
914
+ var i;
915
+ return (i = a.value) == null ? void 0 : i.toggleRowSelection(t, n);
916
+ },
917
+ /** 清空全部选中 */
918
+ clearSelection: () => {
919
+ var t;
920
+ return (t = a.value) == null ? void 0 : t.clearSelection();
921
+ },
922
+ /** 选中当前已加载的全部行 */
923
+ selectAllOnPage: () => {
924
+ var t;
925
+ return (t = a.value) == null ? void 0 : t.selectAllOnPage();
926
+ },
927
+ /** 反选当前已加载的行 */
928
+ invertSelectionOnPage: () => {
929
+ var t;
930
+ return (t = a.value) == null ? void 0 : t.invertSelectionOnPage();
931
+ },
932
+ /* ---------- 筛选面板(转发 YsFilterPanel) ---------- */
933
+ /** 文本搜索框当前值 */
934
+ get keyword() {
935
+ var t;
936
+ return ((t = o.value) == null ? void 0 : t.keyword) ?? "";
937
+ },
938
+ /** 当前聚合后的查询条件 */
939
+ get filter() {
940
+ var t;
941
+ return (t = o.value) == null ? void 0 : t.filter;
942
+ },
943
+ /** 条件区是否展开 */
944
+ get filterExpanded() {
945
+ var t;
946
+ return ((t = o.value) == null ? void 0 : t.expanded) ?? !1;
947
+ },
948
+ /** 切换条件区展开/折叠 */
949
+ toggleFilter: () => {
950
+ var t;
951
+ return (t = o.value) == null ? void 0 : t.toggle();
952
+ },
953
+ /** 重置筛选(清空文本 + 重置已注册子项 + 派发 reset) */
954
+ resetFilter: () => {
955
+ var t;
956
+ return (t = o.value) == null ? void 0 : t.reset();
957
+ },
958
+ /* ---------- 子组件实例(未平铺能力的逃生舱) ---------- */
959
+ /** YsInfiniteList 实例 */
860
960
  get list() {
861
- return d.value;
961
+ return a.value;
862
962
  },
863
963
  /** YsFilterPanel 实例 */
864
964
  get filterPanel() {
865
- return c.value;
965
+ return o.value;
866
966
  }
867
967
  });
868
- function u(l, n) {
869
- t("data-loaded", l, n);
968
+ function c(t, n) {
969
+ l("data-loaded", t, n);
870
970
  }
871
- return (l, n) => (f(), m("view", rt, [
872
- e.showFilter ? (f(), m("view", st, [
873
- Q(qe, {
971
+ return (t, n) => (d(), m("view", rt, [
972
+ e.showFilter ? (d(), m("view", st, [
973
+ Q(Me, {
874
974
  ref_key: "filterRef",
875
- ref: c,
975
+ ref: o,
876
976
  placeholder: e.placeholder,
877
977
  "filter-text": e.filterText,
878
978
  "search-button-text": e.searchButtonText,
@@ -883,20 +983,20 @@ const Oe = { class: "yk-filter-item__field" }, je = ["value", "placeholder"], yt
883
983
  "text-filter-builder": e.textFilterBuilder,
884
984
  "custom-class": e.filterCustomClass,
885
985
  "custom-style": e.filterCustomStyle,
886
- onSearch: n[0] || (n[0] = (i) => t("search", i)),
887
- onReset: n[1] || (n[1] = (i) => t("reset")),
888
- onExpandChange: n[2] || (n[2] = (i) => t("expand-change", i))
986
+ onSearch: n[0] || (n[0] = (i) => l("search", i)),
987
+ onReset: n[1] || (n[1] = (i) => l("reset")),
988
+ onExpandChange: n[2] || (n[2] = (i) => l("expand-change", i))
889
989
  }, {
890
- default: q(() => [
891
- P(l.$slots, "filter-default")
990
+ default: M(() => [
991
+ T(t.$slots, "filter-default")
892
992
  ]),
893
993
  _: 3
894
994
  }, 8, ["placeholder", "filter-text", "search-button-text", "reset-button-text", "default-expanded", "show-search", "show-reset", "text-filter-builder", "custom-class", "custom-style"])
895
995
  ])) : w("", !0),
896
- o("view", ut, [
996
+ f("view", ut, [
897
997
  Q(Fe, {
898
998
  ref_key: "listRef",
899
- ref: d,
999
+ ref: a,
900
1000
  "data-fun": e.dataFun,
901
1001
  "page-size": e.pageSize,
902
1002
  threshold: e.threshold,
@@ -904,14 +1004,14 @@ const Oe = { class: "yk-filter-item__field" }, je = ["value", "placeholder"], yt
904
1004
  immediate: e.immediate,
905
1005
  "show-checkbox": e.showCheckbox,
906
1006
  height: "100%",
907
- class: V(e.listCustomClass),
908
- style: z(e.listCustomStyle),
909
- onDataLoaded: n[3] || (n[3] = (i, _) => u(i, _)),
910
- onSelectionChange: n[4] || (n[4] = (i) => t("selection-change", i)),
911
- onError: n[5] || (n[5] = (i) => t("error", i))
1007
+ class: R(e.listCustomClass),
1008
+ style: O(e.listCustomStyle),
1009
+ onDataLoaded: n[3] || (n[3] = (i, _) => c(i, _)),
1010
+ onSelectionChange: n[4] || (n[4] = (i) => l("selection-change", i)),
1011
+ onError: n[5] || (n[5] = (i) => l("error", i))
912
1012
  }, {
913
- default: q(({ row: i, index: _ }) => [
914
- P(l.$slots, "list-default", {
1013
+ default: M(({ row: i, index: _ }) => [
1014
+ T(t.$slots, "list-default", {
915
1015
  row: i,
916
1016
  index: _
917
1017
  })
@@ -919,14 +1019,14 @@ const Oe = { class: "yk-filter-item__field" }, je = ["value", "placeholder"], yt
919
1019
  _: 3
920
1020
  }, 8, ["data-fun", "page-size", "threshold", "row-key", "immediate", "show-checkbox", "class", "style"])
921
1021
  ]),
922
- e.showCommandBar ? (f(), m("view", ot, [
1022
+ e.showCommandBar ? (d(), m("view", ot, [
923
1023
  Q(it, {
924
1024
  actions: e.actions,
925
1025
  "custom-class": e.cmdCustomClass,
926
1026
  "custom-style": e.cmdCustomStyle
927
1027
  }, {
928
- default: q(() => [
929
- P(l.$slots, "cmd-default")
1028
+ default: M(() => [
1029
+ T(t.$slots, "cmd-default")
930
1030
  ]),
931
1031
  _: 3
932
1032
  }, 8, ["actions", "custom-class", "custom-style"])
@@ -939,11 +1039,11 @@ export {
939
1039
  it as YsCommandBar,
940
1040
  mt as YsDateFilterItem,
941
1041
  vt as YsDateRangeFilterItem,
942
- ht as YsEnumFilterItem,
943
- O as YsFilterItemLayout,
944
- qe as YsFilterPanel,
1042
+ gt as YsEnumFilterItem,
1043
+ K as YsFilterItemLayout,
1044
+ Me as YsFilterPanel,
945
1045
  Fe as YsInfiniteList,
946
- gt as YsInfinitePage,
1046
+ ht as YsInfinitePage,
947
1047
  yt as YsTextFilterItem,
948
1048
  Be as useFilterPanelItem
949
1049
  };