@opentiny/tiny-robot 0.5.2-beta.0 → 0.5.2-rc.0

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/index7.js CHANGED
@@ -1,53 +1,53 @@
1
- import { onMounted as me, onBeforeUnmount as pe, ref as R, defineComponent as Y, openBlock as a, createElementBlock as v, createElementVNode as T, createVNode as B, unref as i, toDisplayString as z, useModel as ee, computed as E, normalizeStyle as ve, Fragment as N, renderList as J, createBlock as Q, resolveDynamicComponent as re, mergeModels as te, nextTick as F, shallowRef as ue, watch as ae, normalizeClass as j, createCommentVNode as P, renderSlot as ne, withDirectives as oe, withKeys as O, isRef as ye, withModifiers as se, vModelText as ge, vShow as he } from "vue";
2
- import { IconEmptySearch as _e, IconEditPen as ke, IconDelete as Ce, IconCheck as we, IconClose as Ie, IconMore as Le } from "@opentiny/tiny-robot-svgs";
3
- import { _ as Z } from "./_plugin-vue_export-helper.js";
4
- import { o as ce, d as Ee, c as xe, b as Re } from "./index4.js";
5
- import { t as V } from "./utils.js";
6
- const q = R(!1);
7
- let U = 0, A;
8
- function Te() {
9
- const u = window.matchMedia("(hover: none) and (pointer: coarse)"), h = () => {
10
- q.value = u.matches;
1
+ import { onMounted as ne, onBeforeUnmount as oe, ref as y, defineComponent as P, openBlock as l, createElementBlock as u, createElementVNode as w, createVNode as T, unref as n, toDisplayString as B, useModel as W, computed as I, normalizeStyle as ie, Fragment as S, renderList as V, createBlock as H, resolveDynamicComponent as Y, mergeModels as j, nextTick as se, normalizeClass as U, createCommentVNode as G, renderSlot as q, withDirectives as A, withKeys as F, isRef as re, withModifiers as J, vModelText as le, vShow as ue } from "vue";
2
+ import { IconEmptySearch as ae, IconEditPen as ce, IconDelete as de, IconCheck as me, IconClose as fe, IconMore as pe } from "@opentiny/tiny-robot-svgs";
3
+ import { _ as z } from "./_plugin-vue_export-helper.js";
4
+ import { o as Z, d as ve, c as ge, b as _e } from "./index4.js";
5
+ import { t as O } from "./utils.js";
6
+ const D = y(!1);
7
+ let b = 0, $;
8
+ function ye() {
9
+ const s = window.matchMedia("(hover: none) and (pointer: coarse)"), m = () => {
10
+ D.value = s.matches;
11
11
  };
12
- h(), u.addEventListener("change", h);
13
- const c = (r) => {
14
- q.value = r.pointerType !== "mouse";
12
+ m(), s.addEventListener("change", m);
13
+ const t = (c) => {
14
+ D.value = c.pointerType !== "mouse";
15
15
  };
16
- return window.addEventListener("pointerdown", c, !0), () => {
17
- u.removeEventListener("change", h), window.removeEventListener("pointerdown", c, !0);
16
+ return window.addEventListener("pointerdown", t, !0), () => {
17
+ s.removeEventListener("change", m), window.removeEventListener("pointerdown", t, !0);
18
18
  };
19
19
  }
20
- function be() {
21
- A == null || A(), A = void 0;
20
+ function he() {
21
+ $ == null || $(), $ = void 0;
22
22
  }
23
- function Me() {
23
+ function Ce() {
24
24
  return typeof window > "u" ? {
25
- isTouchDevice: q
26
- } : (me(() => {
27
- U++, U === 1 && (A = Te());
28
- }), pe(() => {
29
- U = Math.max(0, U - 1), U === 0 && be();
25
+ isTouchDevice: D
26
+ } : (ne(() => {
27
+ b++, b === 1 && ($ = ye());
28
+ }), oe(() => {
29
+ b = Math.max(0, b - 1), b === 0 && he();
30
30
  }), {
31
- isTouchDevice: q
31
+ isTouchDevice: D
32
32
  });
33
33
  }
34
- const De = { class: "tr-history__empty" }, $e = { class: "tr-history__empty-icon" }, Oe = { class: "tr-history__empty-text" }, Ge = /* @__PURE__ */ Y({
34
+ const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon" }, Ee = { class: "tr-history__empty-text" }, we = /* @__PURE__ */ P({
35
35
  __name: "Empty",
36
36
  props: {
37
37
  text: { default: "暂无内容" }
38
38
  },
39
- setup(u) {
40
- const h = u;
41
- return (c, r) => (a(), v("div", De, [
42
- T("span", $e, [
43
- B(i(_e))
39
+ setup(s) {
40
+ const m = s;
41
+ return (t, c) => (l(), u("div", ke, [
42
+ w("span", Le, [
43
+ T(n(ae))
44
44
  ]),
45
- T("span", Oe, z(h.text), 1)
45
+ w("span", Ee, B(m.text), 1)
46
46
  ]));
47
47
  }
48
- }), He = /* @__PURE__ */ Z(Ge, [["__scopeId", "data-v-d0340c39"]]), Se = ["onClick"], le = 4, Ue = /* @__PURE__ */ Y({
48
+ }), Re = /* @__PURE__ */ z(we, [["__scopeId", "data-v-d0340c39"]]), Ie = ["onClick"], Q = 4, xe = /* @__PURE__ */ P({
49
49
  __name: "MenuList",
50
- props: /* @__PURE__ */ te({
50
+ props: /* @__PURE__ */ j({
51
51
  items: {},
52
52
  menuListGap: { default: 8 }
53
53
  }, {
@@ -56,132 +56,85 @@ const De = { class: "tr-history__empty" }, $e = { class: "tr-history__empty-icon
56
56
  data: { default: null },
57
57
  dataModifiers: {}
58
58
  }),
59
- emits: /* @__PURE__ */ te(["item-click"], ["update:trigger", "update:data"]),
60
- setup(u, { expose: h, emit: c }) {
61
- const r = ee(u, "trigger"), k = ee(u, "data"), _ = u, b = c, C = R(null);
62
- ce(
63
- C,
59
+ emits: /* @__PURE__ */ j(["item-click"], ["update:trigger", "update:data"]),
60
+ setup(s, { emit: m }) {
61
+ const t = W(s, "trigger"), c = W(s, "data"), h = s, C = m, E = y(null);
62
+ Z(
63
+ E,
64
64
  () => {
65
- r.value = null, k.value = null;
65
+ t.value = null, c.value = null;
66
66
  },
67
67
  {
68
- ignore: [r]
68
+ ignore: [t]
69
69
  }
70
70
  );
71
- const { top: M, bottom: w, left: G } = Ee(r), { width: x, height: H } = xe(C, void 0, { box: "border-box" }), { height: I } = Re(), D = E(() => {
72
- const n = {
73
- left: `min(${V(G.value)}, calc(100% - ${V(x.value + le)}))`
74
- }, p = w.value + _.menuListGap;
75
- return p + H.value + le > I.value ? n.bottom = `calc(100% - ${V(M.value - _.menuListGap)})` : n.top = V(p), n;
76
- }), o = (n) => {
77
- b("item-click", n), r.value = null, k.value = null;
78
- }, f = () => {
79
- var n;
80
- return Array.from(((n = C.value) == null ? void 0 : n.querySelectorAll('[role="menuitem"]')) || []);
81
- }, W = () => {
82
- var n;
83
- return (n = f()[0]) == null ? void 0 : n.focus();
84
- }, g = () => {
85
- var n;
86
- return (n = f().at(-1)) == null ? void 0 : n.focus();
87
- }, S = () => {
88
- const n = r.value;
89
- r.value = null, k.value = null, F(() => n == null ? void 0 : n.focus());
90
- }, m = (n) => {
91
- var $, K;
92
- if (n.key === "Tab") {
93
- r.value = null, k.value = null;
94
- return;
95
- }
96
- const p = f(), y = p.indexOf(document.activeElement);
97
- if (n.key === "Escape") {
98
- n.preventDefault(), S();
99
- return;
100
- }
101
- if (n.key === "Enter" || n.key === " ") {
102
- n.preventDefault(), ($ = p[y]) == null || $.click();
103
- return;
104
- }
105
- if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(n.key) || p.length === 0) return;
106
- n.preventDefault();
107
- let L = y;
108
- n.key === "Home" && (L = 0), n.key === "End" && (L = p.length - 1), n.key === "ArrowDown" && (L = y < p.length - 1 ? y + 1 : 0), n.key === "ArrowUp" && (L = y > 0 ? y - 1 : p.length - 1), (K = p[L]) == null || K.focus();
71
+ const { top: p, bottom: x, left: _ } = ve(t), { width: M, height: k } = ge(E, void 0, { box: "border-box" }), { height: R } = _e(), o = I(() => {
72
+ const L = {
73
+ left: `min(${O(_.value)}, calc(100% - ${O(M.value + Q)}))`
74
+ }, g = x.value + h.menuListGap;
75
+ return g + k.value + Q > R.value ? L.bottom = `calc(100% - ${O(p.value - h.menuListGap)})` : L.top = O(g), L;
76
+ }), v = (L) => {
77
+ C("item-click", L), t.value = null, c.value = null;
109
78
  };
110
- return h({ focusFirstItem: W, focusLastItem: g }), (n, p) => (a(), v("ul", {
79
+ return (L, g) => (l(), u("ul", {
111
80
  class: "tr-history__menu-list",
112
81
  ref_key: "menuRef",
113
- ref: C,
114
- style: ve(D.value),
115
- role: "menu",
116
- onKeydown: m
82
+ ref: E,
83
+ style: ie(o.value)
117
84
  }, [
118
- (a(!0), v(N, null, J(_.items, (y) => (a(), v("li", {
85
+ (l(!0), u(S, null, V(h.items, (a) => (l(), u("li", {
119
86
  class: "tr-history__menu-list__item",
120
- key: y.id,
121
- role: "menuitem",
122
- tabindex: "-1",
123
- onClick: (L) => o(y)
87
+ key: a.id,
88
+ onClick: (K) => v(a)
124
89
  }, [
125
- (a(), Q(re(y.icon))),
126
- T("span", null, z(y.text), 1)
127
- ], 8, Se))), 128))
128
- ], 36));
90
+ (l(), H(Y(a.icon))),
91
+ w("span", null, B(a.text), 1)
92
+ ], 8, Ie))), 128))
93
+ ], 4));
129
94
  }
130
- }), Be = /* @__PURE__ */ Z(Ue, [["__scopeId", "data-v-e4a482e7"]]), Ae = ({
131
- renameControlOnClickOutside: u,
132
- onItemTitleChange: h,
133
- resolveItem: c
95
+ }), Me = /* @__PURE__ */ z(xe, [["__scopeId", "data-v-89fdb41c"]]), be = ({
96
+ renameControlOnClickOutside: s,
97
+ onItemTitleChange: m
134
98
  }) => {
135
- const r = ue(void 0), k = E(() => {
136
- const o = r.value;
137
- if (o)
138
- return c ? c(o) : o;
139
- }), _ = R(null), b = E(() => {
99
+ const t = y(void 0), c = y(null), h = I(() => {
140
100
  var o;
141
- return (o = _.value) == null ? void 0 : o.at(0);
142
- }), C = R(null), M = E(() => {
101
+ return (o = c.value) == null ? void 0 : o.at(0);
102
+ }), C = y(null), E = I(() => {
143
103
  var o;
144
104
  return (o = C.value) == null ? void 0 : o.at(0);
145
- }), w = R(null), G = E(() => {
105
+ }), p = y(null), x = I(() => {
146
106
  var o;
147
- return (o = w.value) == null ? void 0 : o.at(0);
148
- }), x = R(""), H = (o) => {
149
- r.value = o, x.value = o.title, F(() => {
150
- const f = b.value;
151
- f && (f.focus(), f.select());
107
+ return (o = p.value) == null ? void 0 : o.at(0);
108
+ }), _ = y(""), M = (o) => {
109
+ t.value = o, _.value = o.title, se(() => {
110
+ const v = h.value;
111
+ v && (v.focus(), v.select());
152
112
  });
153
- }, I = () => {
154
- r.value = void 0, x.value = "";
155
- }, D = () => {
156
- const o = k.value;
157
- o && h(x.value, o), I();
113
+ }, k = () => {
114
+ t.value = void 0, _.value = "";
115
+ }, R = () => {
116
+ t.value && m(_.value, t.value), t.value = void 0, _.value = "";
158
117
  };
159
- return ae(
160
- k,
161
- (o, f) => {
162
- f && !o && I();
163
- },
164
- { flush: "sync" }
165
- ), (u === "confirm" || u === "cancel") && ce(
166
- b,
118
+ return (s === "confirm" || s === "cancel") && Z(
119
+ h,
167
120
  () => {
168
- u === "confirm" ? D() : I();
121
+ s === "confirm" ? R() : k();
169
122
  },
170
- { ignore: [M, G] }
123
+ { ignore: [E, x] }
171
124
  ), {
172
- editingItem: k,
173
- editorRefList: _,
125
+ editingItem: t,
126
+ editorRefList: c,
174
127
  editorConfirmRefList: C,
175
- editorCancelRefList: w,
176
- editorValue: x,
177
- handleEdit: H,
178
- handleEditCancel: I,
179
- handleEditConfirm: D
128
+ editorCancelRefList: p,
129
+ editorValue: _,
130
+ handleEdit: M,
131
+ handleEditCancel: k,
132
+ handleEditConfirm: R
180
133
  };
181
- }, ie = Symbol("NO_GROUP"), Ke = {
134
+ }, X = Symbol("NO_GROUP"), Te = {
182
135
  key: 0,
183
136
  class: "tr-history__group-title"
184
- }, Pe = { class: "tr-history__group-items" }, Ve = ["onClick"], Ne = ["title"], ze = ["aria-label", "aria-expanded", "onClick", "onKeydown"], Fe = /* @__PURE__ */ Y({
137
+ }, $e = { class: "tr-history__group-items" }, Ge = ["onClick"], Oe = ["title"], Se = ["onClick"], Be = /* @__PURE__ */ P({
185
138
  __name: "index",
186
139
  props: {
187
140
  data: {},
@@ -189,201 +142,157 @@ const De = { class: "tr-history__empty" }, $e = { class: "tr-history__empty-icon
189
142
  showRenameControls: { type: Boolean, default: !1 },
190
143
  renameControlOnClickOutside: { default: "confirm" },
191
144
  menuItems: { default: () => [
192
- { id: "rename", text: "重命名", icon: ke },
193
- { id: "delete", text: "删除", icon: Ce }
145
+ { id: "rename", text: "重命名", icon: ce },
146
+ { id: "delete", text: "删除", icon: de }
194
147
  ] },
195
148
  menuListGap: { default: 8 }
196
149
  },
197
150
  emits: ["item-click", "item-title-change", "item-action"],
198
- setup(u, { emit: h }) {
199
- const c = u, r = h, k = (e) => {
200
- var l;
201
- const t = typeof ((l = e[0]) == null ? void 0 : l.group);
202
- return t === "string" || t === "symbol";
203
- }, _ = E(() => {
204
- const e = c.data;
205
- return k(e) ? e : [{ group: ie, items: e }];
206
- }), b = E(() => _.value.length === 0 || _.value.every((e) => e.items.length === 0)), C = E(() => _.value.flatMap((e) => e.items)), M = (e) => e.id ? C.value.find((t) => t.id === e.id) : C.value.find((t) => t === e), {
207
- editingItem: w,
208
- editorRefList: G,
209
- editorConfirmRefList: x,
210
- editorCancelRefList: H,
211
- editorValue: I,
212
- handleEdit: D,
151
+ setup(s, { emit: m }) {
152
+ const t = s, c = m, h = (i) => {
153
+ var f;
154
+ const e = typeof ((f = i[0]) == null ? void 0 : f.group);
155
+ return e === "string" || e === "symbol";
156
+ }, C = I(() => {
157
+ const i = t.data;
158
+ return h(i) ? i : [{ group: X, items: i }];
159
+ }), E = I(() => C.value.length === 0 || C.value.every((i) => i.items.length === 0)), {
160
+ editingItem: p,
161
+ editorRefList: x,
162
+ editorConfirmRefList: _,
163
+ editorCancelRefList: M,
164
+ editorValue: k,
165
+ handleEdit: R,
213
166
  handleEditCancel: o,
214
- handleEditConfirm: f
215
- } = Ae({
216
- renameControlOnClickOutside: c.renameControlOnClickOutside,
217
- onItemTitleChange: (e, t) => {
218
- r("item-title-change", e, t);
219
- },
220
- resolveItem: M
221
- }), { isTouchDevice: W } = Me(), g = R(null), S = ue(null), m = E({
222
- get: () => {
223
- const e = S.value;
224
- return e ? M(e) ?? null : null;
225
- },
226
- set: (e) => {
227
- S.value = e;
167
+ handleEditConfirm: v
168
+ } = be({
169
+ renameControlOnClickOutside: t.renameControlOnClickOutside,
170
+ onItemTitleChange: (i, e) => {
171
+ c("item-title-change", i, e);
228
172
  }
229
- }), n = R(null), p = (e) => {
230
- F(() => {
231
- var t, l;
232
- e === "first" ? (t = n.value) == null || t.focusFirstItem() : (l = n.value) == null || l.focusLastItem();
233
- });
234
- }, y = (e, t) => {
235
- if (e.currentTarget instanceof HTMLButtonElement) {
236
- if (m.value === t) {
237
- g.value = null, m.value = null;
173
+ }), { isTouchDevice: L } = Ce(), g = y(null), a = y(null), K = (i, e) => {
174
+ if (i.currentTarget instanceof HTMLButtonElement) {
175
+ if (a.value === e) {
176
+ g.value = null, a.value = null;
238
177
  return;
239
178
  }
240
- g.value = e.currentTarget, m.value = t, e.detail === 0 && p("first");
179
+ g.value = i.currentTarget, a.value = e;
241
180
  } else
242
- g.value = null, m.value = null;
243
- }, L = (e, t, l) => {
244
- e.preventDefault(), e.stopPropagation(), e.currentTarget instanceof HTMLButtonElement && (g.value = e.currentTarget, m.value = t, p(l));
245
- }, $ = () => {
246
- g.value = null, m.value = null;
247
- };
248
- ae(
249
- m,
250
- (e) => {
251
- !e && S.value && $();
252
- },
253
- { flush: "sync" }
254
- );
255
- const K = (e) => {
256
- g.value && (e.preventDefault(), e.stopPropagation(), $());
257
- }, de = (e) => {
258
- const t = m.value, l = g.value;
259
- t && (e.id === "rename" ? D(t) : F(() => l == null ? void 0 : l.focus()), r("item-action", e, t));
181
+ g.value = null, a.value = null;
182
+ }, ee = (i) => {
183
+ const e = a.value;
184
+ e && (i.id === "rename" && R(e), c("item-action", i, e));
260
185
  };
261
- return (e, t) => (a(), v("div", {
262
- class: j(["tr-history", { "touch-device": i(W) }])
186
+ return (i, e) => (l(), u("div", {
187
+ class: U(["tr-history", { "touch-device": n(L) }])
263
188
  }, [
264
- b.value ? (a(), Q(He, { key: 1 })) : (a(), v(N, { key: 0 }, [
265
- (a(!0), v(N, null, J(_.value, (l) => (a(), v("div", {
189
+ E.value ? (l(), H(Re, { key: 1 })) : (l(), u(S, { key: 0 }, [
190
+ (l(!0), u(S, null, V(C.value, (f) => (l(), u("div", {
266
191
  class: "tr-history__group",
267
- key: l.group
192
+ key: f.group
268
193
  }, [
269
- l.group !== i(ie) ? (a(), v("div", Ke, z(l.group), 1)) : P("", !0),
270
- T("div", Pe, [
271
- (a(!0), v(N, null, J(l.items, (s, fe) => (a(), v("div", {
272
- class: j(["tr-history__item", {
273
- selected: s.id && s.id === c.selected,
274
- editing: i(w) === s,
275
- active: m.value === s
194
+ f.group !== n(X) ? (l(), u("div", Te, B(f.group), 1)) : G("", !0),
195
+ w("div", $e, [
196
+ (l(!0), u(S, null, V(f.items, (r, te) => (l(), u("div", {
197
+ class: U(["tr-history__item", {
198
+ selected: r.id && r.id === t.selected,
199
+ editing: n(p) === r,
200
+ active: a.value === r
276
201
  }]),
277
- key: s.id || fe,
278
- onClick: (d) => r("item-click", s)
202
+ key: r.id || te,
203
+ onClick: (d) => c("item-click", r)
279
204
  }, [
280
- ne(e.$slots, "item-prefix", { item: s }, void 0, !0),
281
- s.icon ? (a(), Q(re(s.icon), { key: 0 })) : P("", !0),
282
- i(w) === s ? oe((a(), v("input", {
205
+ q(i.$slots, "item-prefix", { item: r }, void 0, !0),
206
+ r.icon ? (l(), H(Y(r.icon), { key: 0 })) : G("", !0),
207
+ n(p) === r ? A((l(), u("input", {
283
208
  key: 1,
284
209
  class: "tr-history__item-editor",
285
210
  type: "text",
286
- onClick: t[0] || (t[0] = se(() => {
211
+ onClick: e[0] || (e[0] = J(() => {
287
212
  }, ["stop"])),
288
213
  ref_for: !0,
289
214
  ref_key: "editorRefList",
290
- ref: G,
291
- "onUpdate:modelValue": t[1] || (t[1] = (d) => ye(I) ? I.value = d : null),
215
+ ref: x,
216
+ "onUpdate:modelValue": e[1] || (e[1] = (d) => re(k) ? k.value = d : null),
292
217
  onKeydown: [
293
- t[2] || (t[2] = O(
218
+ e[2] || (e[2] = F(
294
219
  //@ts-ignore
295
- (...d) => i(f) && i(f)(...d),
220
+ (...d) => n(v) && n(v)(...d),
296
221
  ["enter"]
297
222
  )),
298
- t[3] || (t[3] = O(
223
+ e[3] || (e[3] = F(
299
224
  //@ts-ignore
300
- (...d) => i(o) && i(o)(...d),
225
+ (...d) => n(o) && n(o)(...d),
301
226
  ["escape"]
302
227
  ))
303
228
  ]
304
229
  }, null, 544)), [
305
- [ge, i(I)]
306
- ]) : ne(e.$slots, "item-title", { item: s }, () => [
307
- T("span", {
230
+ [le, n(k)]
231
+ ]) : q(i.$slots, "item-title", { item: r }, () => [
232
+ w("span", {
308
233
  class: "text",
309
- title: s.title
310
- }, z(s.title), 9, Ne)
234
+ title: r.title
235
+ }, B(r.title), 9, Oe)
311
236
  ], !0, 2),
312
- T("span", {
237
+ w("span", {
313
238
  class: "tr-history__item-actions",
314
- onClick: t[6] || (t[6] = se(() => {
239
+ onClick: e[6] || (e[6] = J(() => {
315
240
  }, ["stop"]))
316
241
  }, [
317
- c.showRenameControls && i(w) === s ? (a(), v("button", {
242
+ t.showRenameControls && n(p) === r ? (l(), u("button", {
318
243
  key: 0,
319
244
  class: "editor-confirm",
320
245
  ref_for: !0,
321
246
  ref_key: "editorConfirmRefList",
322
- ref: x,
323
- type: "button",
324
- "aria-label": "确认重命名",
325
- onClick: t[4] || (t[4] = //@ts-ignore
326
- (...d) => i(f) && i(f)(...d))
247
+ ref: _,
248
+ onClick: e[4] || (e[4] = //@ts-ignore
249
+ (...d) => n(v) && n(v)(...d))
327
250
  }, [
328
- B(i(we))
329
- ], 512)) : P("", !0),
330
- c.showRenameControls && i(w) === s ? (a(), v("button", {
251
+ T(n(me))
252
+ ], 512)) : G("", !0),
253
+ t.showRenameControls && n(p) === r ? (l(), u("button", {
331
254
  key: 1,
332
255
  class: "editor-cancel",
333
256
  ref_for: !0,
334
257
  ref_key: "editorCancelRefList",
335
- ref: H,
336
- type: "button",
337
- "aria-label": "取消重命名",
338
- onClick: t[5] || (t[5] = //@ts-ignore
339
- (...d) => i(o) && i(o)(...d))
258
+ ref: M,
259
+ onClick: e[5] || (e[5] = //@ts-ignore
260
+ (...d) => n(o) && n(o)(...d))
340
261
  }, [
341
- B(i(Ie))
342
- ], 512)) : P("", !0),
343
- T("button", {
344
- class: j(["menu", { hidden: i(w) === s }]),
345
- type: "button",
346
- "aria-label": `${s.title} 更多操作`,
347
- "aria-haspopup": "menu",
348
- "aria-expanded": m.value === s,
349
- onClick: (d) => y(d, s),
350
- onKeydown: [
351
- O((d) => L(d, s, "first"), ["down"]),
352
- O((d) => L(d, s, "last"), ["up"]),
353
- O(K, ["escape"]),
354
- O($, ["tab"])
355
- ]
262
+ T(n(fe))
263
+ ], 512)) : G("", !0),
264
+ w("button", {
265
+ class: U(["menu", { hidden: n(p) === r }]),
266
+ onClick: (d) => K(d, r)
356
267
  }, [
357
- B(i(Le))
358
- ], 42, ze)
268
+ T(n(pe))
269
+ ], 10, Se)
359
270
  ])
360
- ], 10, Ve))), 128))
271
+ ], 10, Ge))), 128))
361
272
  ])
362
273
  ]))), 128)),
363
- oe(B(Be, {
364
- ref_key: "menuListRef",
365
- ref: n,
274
+ A(T(Me, {
366
275
  trigger: g.value,
367
- "onUpdate:trigger": t[7] || (t[7] = (l) => g.value = l),
368
- data: m.value,
369
- "onUpdate:data": t[8] || (t[8] = (l) => m.value = l),
370
- items: c.menuItems,
371
- "menu-list-gap": c.menuListGap,
372
- onItemClick: de
276
+ "onUpdate:trigger": e[7] || (e[7] = (f) => g.value = f),
277
+ data: a.value,
278
+ "onUpdate:data": e[8] || (e[8] = (f) => a.value = f),
279
+ items: t.menuItems,
280
+ "menu-list-gap": t.menuListGap,
281
+ onItemClick: ee
373
282
  }, null, 8, ["trigger", "data", "items", "menu-list-gap"]), [
374
- [he, g.value]
283
+ [ue, g.value]
375
284
  ])
376
285
  ], 64))
377
286
  ], 2));
378
287
  }
379
- }), X = /* @__PURE__ */ Z(Fe, [["__scopeId", "data-v-85a4fc3d"]]), qe = function(u) {
380
- u.component(X.name, X);
288
+ }), N = /* @__PURE__ */ z(Be, [["__scopeId", "data-v-125148d2"]]), De = function(s) {
289
+ s.component(N.name, N);
381
290
  };
382
- Object.assign(X, {
291
+ Object.assign(N, {
383
292
  name: "TrHistory",
384
- install: qe
293
+ install: De
385
294
  });
386
295
  export {
387
- X as H,
388
- Me as u
296
+ N as H,
297
+ Ce as u
389
298
  };