@opentiny/tiny-robot 0.5.2-alpha.8 → 1.0.0-beta.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 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;
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;
11
11
  };
12
- m(), s.addEventListener("change", m);
13
- const t = (c) => {
14
- D.value = c.pointerType !== "mouse";
12
+ h(), u.addEventListener("change", h);
13
+ const c = (r) => {
14
+ q.value = r.pointerType !== "mouse";
15
15
  };
16
- return window.addEventListener("pointerdown", t, !0), () => {
17
- s.removeEventListener("change", m), window.removeEventListener("pointerdown", t, !0);
16
+ return window.addEventListener("pointerdown", c, !0), () => {
17
+ u.removeEventListener("change", h), window.removeEventListener("pointerdown", c, !0);
18
18
  };
19
19
  }
20
- function he() {
21
- $ == null || $(), $ = void 0;
20
+ function be() {
21
+ A == null || A(), A = void 0;
22
22
  }
23
- function Ce() {
23
+ function Me() {
24
24
  return typeof window > "u" ? {
25
- isTouchDevice: D
26
- } : (ne(() => {
27
- b++, b === 1 && ($ = ye());
28
- }), oe(() => {
29
- b = Math.max(0, b - 1), b === 0 && he();
25
+ isTouchDevice: q
26
+ } : (me(() => {
27
+ U++, U === 1 && (A = Te());
28
+ }), pe(() => {
29
+ U = Math.max(0, U - 1), U === 0 && be();
30
30
  }), {
31
- isTouchDevice: D
31
+ isTouchDevice: q
32
32
  });
33
33
  }
34
- const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon" }, Ee = { class: "tr-history__empty-text" }, we = /* @__PURE__ */ P({
34
+ const De = { class: "tr-history__empty" }, $e = { class: "tr-history__empty-icon" }, Oe = { class: "tr-history__empty-text" }, Ge = /* @__PURE__ */ Y({
35
35
  __name: "Empty",
36
36
  props: {
37
37
  text: { default: "暂无内容" }
38
38
  },
39
- setup(s) {
40
- const m = s;
41
- return (t, c) => (l(), u("div", ke, [
42
- w("span", Le, [
43
- T(n(ae))
39
+ setup(u) {
40
+ const h = u;
41
+ return (c, r) => (a(), v("div", De, [
42
+ T("span", $e, [
43
+ B(i(_e))
44
44
  ]),
45
- w("span", Ee, B(m.text), 1)
45
+ T("span", Oe, z(h.text), 1)
46
46
  ]));
47
47
  }
48
- }), Re = /* @__PURE__ */ z(we, [["__scopeId", "data-v-d0340c39"]]), Ie = ["onClick"], Q = 4, xe = /* @__PURE__ */ P({
48
+ }), He = /* @__PURE__ */ Z(Ge, [["__scopeId", "data-v-d0340c39"]]), Se = ["onClick"], le = 4, Ue = /* @__PURE__ */ Y({
49
49
  __name: "MenuList",
50
- props: /* @__PURE__ */ j({
50
+ props: /* @__PURE__ */ te({
51
51
  items: {},
52
52
  menuListGap: { default: 8 }
53
53
  }, {
@@ -56,85 +56,132 @@ const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon
56
56
  data: { default: null },
57
57
  dataModifiers: {}
58
58
  }),
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,
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,
64
64
  () => {
65
- t.value = null, c.value = null;
65
+ r.value = null, k.value = null;
66
66
  },
67
67
  {
68
- ignore: [t]
68
+ ignore: [r]
69
69
  }
70
70
  );
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;
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();
78
109
  };
79
- return (L, g) => (l(), u("ul", {
110
+ return h({ focusFirstItem: W, focusLastItem: g }), (n, p) => (a(), v("ul", {
80
111
  class: "tr-history__menu-list",
81
112
  ref_key: "menuRef",
82
- ref: E,
83
- style: ie(o.value)
113
+ ref: C,
114
+ style: ve(D.value),
115
+ role: "menu",
116
+ onKeydown: m
84
117
  }, [
85
- (l(!0), u(S, null, V(h.items, (a) => (l(), u("li", {
118
+ (a(!0), v(N, null, J(_.items, (y) => (a(), v("li", {
86
119
  class: "tr-history__menu-list__item",
87
- key: a.id,
88
- onClick: (K) => v(a)
120
+ key: y.id,
121
+ role: "menuitem",
122
+ tabindex: "-1",
123
+ onClick: (L) => o(y)
89
124
  }, [
90
- (l(), H(Y(a.icon))),
91
- w("span", null, B(a.text), 1)
92
- ], 8, Ie))), 128))
93
- ], 4));
125
+ (a(), Q(re(y.icon))),
126
+ T("span", null, z(y.text), 1)
127
+ ], 8, Se))), 128))
128
+ ], 36));
94
129
  }
95
- }), Me = /* @__PURE__ */ z(xe, [["__scopeId", "data-v-89fdb41c"]]), be = ({
96
- renameControlOnClickOutside: s,
97
- onItemTitleChange: m
130
+ }), Be = /* @__PURE__ */ Z(Ue, [["__scopeId", "data-v-e4a482e7"]]), Ae = ({
131
+ renameControlOnClickOutside: u,
132
+ onItemTitleChange: h,
133
+ resolveItem: c
98
134
  }) => {
99
- const t = y(void 0), c = y(null), h = I(() => {
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(() => {
100
140
  var o;
101
- return (o = c.value) == null ? void 0 : o.at(0);
102
- }), C = y(null), E = I(() => {
141
+ return (o = _.value) == null ? void 0 : o.at(0);
142
+ }), C = R(null), M = E(() => {
103
143
  var o;
104
144
  return (o = C.value) == null ? void 0 : o.at(0);
105
- }), p = y(null), x = I(() => {
145
+ }), w = R(null), G = E(() => {
106
146
  var o;
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());
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());
112
152
  });
113
- }, k = () => {
114
- t.value = void 0, _.value = "";
115
- }, R = () => {
116
- t.value && m(_.value, t.value), t.value = void 0, _.value = "";
153
+ }, I = () => {
154
+ r.value = void 0, x.value = "";
155
+ }, D = () => {
156
+ const o = k.value;
157
+ o && h(x.value, o), I();
117
158
  };
118
- return (s === "confirm" || s === "cancel") && Z(
119
- h,
159
+ return ae(
160
+ k,
161
+ (o, f) => {
162
+ f && !o && I();
163
+ },
164
+ { flush: "sync" }
165
+ ), (u === "confirm" || u === "cancel") && ce(
166
+ b,
120
167
  () => {
121
- s === "confirm" ? R() : k();
168
+ u === "confirm" ? D() : I();
122
169
  },
123
- { ignore: [E, x] }
170
+ { ignore: [M, G] }
124
171
  ), {
125
- editingItem: t,
126
- editorRefList: c,
172
+ editingItem: k,
173
+ editorRefList: _,
127
174
  editorConfirmRefList: C,
128
- editorCancelRefList: p,
129
- editorValue: _,
130
- handleEdit: M,
131
- handleEditCancel: k,
132
- handleEditConfirm: R
175
+ editorCancelRefList: w,
176
+ editorValue: x,
177
+ handleEdit: H,
178
+ handleEditCancel: I,
179
+ handleEditConfirm: D
133
180
  };
134
- }, X = Symbol("NO_GROUP"), Te = {
181
+ }, ie = Symbol("NO_GROUP"), Ke = {
135
182
  key: 0,
136
183
  class: "tr-history__group-title"
137
- }, $e = { class: "tr-history__group-items" }, Ge = ["onClick"], Oe = ["title"], Se = ["onClick"], Be = /* @__PURE__ */ P({
184
+ }, Pe = { class: "tr-history__group-items" }, Ve = ["onClick"], Ne = ["title"], ze = ["aria-label", "aria-expanded", "onClick", "onKeydown"], Fe = /* @__PURE__ */ Y({
138
185
  __name: "index",
139
186
  props: {
140
187
  data: {},
@@ -142,157 +189,201 @@ const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon
142
189
  showRenameControls: { type: Boolean, default: !1 },
143
190
  renameControlOnClickOutside: { default: "confirm" },
144
191
  menuItems: { default: () => [
145
- { id: "rename", text: "重命名", icon: ce },
146
- { id: "delete", text: "删除", icon: de }
192
+ { id: "rename", text: "重命名", icon: ke },
193
+ { id: "delete", text: "删除", icon: Ce }
147
194
  ] },
148
195
  menuListGap: { default: 8 }
149
196
  },
150
197
  emits: ["item-click", "item-title-change", "item-action"],
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,
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,
166
213
  handleEditCancel: o,
167
- handleEditConfirm: v
168
- } = be({
169
- renameControlOnClickOutside: t.renameControlOnClickOutside,
170
- onItemTitleChange: (i, e) => {
171
- c("item-title-change", i, e);
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;
172
228
  }
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;
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;
177
238
  return;
178
239
  }
179
- g.value = i.currentTarget, a.value = e;
240
+ g.value = e.currentTarget, m.value = t, e.detail === 0 && p("first");
180
241
  } else
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));
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));
185
260
  };
186
- return (i, e) => (l(), u("div", {
187
- class: U(["tr-history", { "touch-device": n(L) }])
261
+ return (e, t) => (a(), v("div", {
262
+ class: j(["tr-history", { "touch-device": i(W) }])
188
263
  }, [
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", {
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", {
191
266
  class: "tr-history__group",
192
- key: f.group
267
+ key: l.group
193
268
  }, [
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
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
201
276
  }]),
202
- key: r.id || te,
203
- onClick: (d) => c("item-click", r)
277
+ key: s.id || fe,
278
+ onClick: (d) => r("item-click", s)
204
279
  }, [
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", {
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", {
208
283
  key: 1,
209
284
  class: "tr-history__item-editor",
210
285
  type: "text",
211
- onClick: e[0] || (e[0] = J(() => {
286
+ onClick: t[0] || (t[0] = se(() => {
212
287
  }, ["stop"])),
213
288
  ref_for: !0,
214
289
  ref_key: "editorRefList",
215
- ref: x,
216
- "onUpdate:modelValue": e[1] || (e[1] = (d) => re(k) ? k.value = d : null),
290
+ ref: G,
291
+ "onUpdate:modelValue": t[1] || (t[1] = (d) => ye(I) ? I.value = d : null),
217
292
  onKeydown: [
218
- e[2] || (e[2] = F(
293
+ t[2] || (t[2] = O(
219
294
  //@ts-ignore
220
- (...d) => n(v) && n(v)(...d),
295
+ (...d) => i(f) && i(f)(...d),
221
296
  ["enter"]
222
297
  )),
223
- e[3] || (e[3] = F(
298
+ t[3] || (t[3] = O(
224
299
  //@ts-ignore
225
- (...d) => n(o) && n(o)(...d),
300
+ (...d) => i(o) && i(o)(...d),
226
301
  ["escape"]
227
302
  ))
228
303
  ]
229
304
  }, null, 544)), [
230
- [le, n(k)]
231
- ]) : q(i.$slots, "item-title", { item: r }, () => [
232
- w("span", {
305
+ [ge, i(I)]
306
+ ]) : ne(e.$slots, "item-title", { item: s }, () => [
307
+ T("span", {
233
308
  class: "text",
234
- title: r.title
235
- }, B(r.title), 9, Oe)
309
+ title: s.title
310
+ }, z(s.title), 9, Ne)
236
311
  ], !0, 2),
237
- w("span", {
312
+ T("span", {
238
313
  class: "tr-history__item-actions",
239
- onClick: e[6] || (e[6] = J(() => {
314
+ onClick: t[6] || (t[6] = se(() => {
240
315
  }, ["stop"]))
241
316
  }, [
242
- t.showRenameControls && n(p) === r ? (l(), u("button", {
317
+ c.showRenameControls && i(w) === s ? (a(), v("button", {
243
318
  key: 0,
244
319
  class: "editor-confirm",
245
320
  ref_for: !0,
246
321
  ref_key: "editorConfirmRefList",
247
- ref: _,
248
- onClick: e[4] || (e[4] = //@ts-ignore
249
- (...d) => n(v) && n(v)(...d))
322
+ ref: x,
323
+ type: "button",
324
+ "aria-label": "确认重命名",
325
+ onClick: t[4] || (t[4] = //@ts-ignore
326
+ (...d) => i(f) && i(f)(...d))
250
327
  }, [
251
- T(n(me))
252
- ], 512)) : G("", !0),
253
- t.showRenameControls && n(p) === r ? (l(), u("button", {
328
+ B(i(we))
329
+ ], 512)) : P("", !0),
330
+ c.showRenameControls && i(w) === s ? (a(), v("button", {
254
331
  key: 1,
255
332
  class: "editor-cancel",
256
333
  ref_for: !0,
257
334
  ref_key: "editorCancelRefList",
258
- ref: M,
259
- onClick: e[5] || (e[5] = //@ts-ignore
260
- (...d) => n(o) && n(o)(...d))
335
+ ref: H,
336
+ type: "button",
337
+ "aria-label": "取消重命名",
338
+ onClick: t[5] || (t[5] = //@ts-ignore
339
+ (...d) => i(o) && i(o)(...d))
261
340
  }, [
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)
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
+ ]
267
356
  }, [
268
- T(n(pe))
269
- ], 10, Se)
357
+ B(i(Le))
358
+ ], 42, ze)
270
359
  ])
271
- ], 10, Ge))), 128))
360
+ ], 10, Ve))), 128))
272
361
  ])
273
362
  ]))), 128)),
274
- A(T(Me, {
363
+ oe(B(Be, {
364
+ ref_key: "menuListRef",
365
+ ref: n,
275
366
  trigger: g.value,
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
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
282
373
  }, null, 8, ["trigger", "data", "items", "menu-list-gap"]), [
283
- [ue, g.value]
374
+ [he, g.value]
284
375
  ])
285
376
  ], 64))
286
377
  ], 2));
287
378
  }
288
- }), N = /* @__PURE__ */ z(Be, [["__scopeId", "data-v-125148d2"]]), De = function(s) {
289
- s.component(N.name, N);
379
+ }), X = /* @__PURE__ */ Z(Fe, [["__scopeId", "data-v-85a4fc3d"]]), qe = function(u) {
380
+ u.component(X.name, X);
290
381
  };
291
- Object.assign(N, {
382
+ Object.assign(X, {
292
383
  name: "TrHistory",
293
- install: De
384
+ install: qe
294
385
  });
295
386
  export {
296
- N as H,
297
- Ce as u
387
+ X as H,
388
+ Me as u
298
389
  };