rhjy-ui 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,82 +1,83 @@
1
- import { defineComponent as S, openBlock as l, createElementBlock as c, createElementVNode as h, toDisplayString as g, createCommentVNode as C, computed as D, normalizeClass as K, normalizeStyle as Q, Fragment as U, renderList as q, ref as p, onMounted as Z, renderSlot as T, createTextVNode as X, createBlock as Y, createVNode as O, onBeforeUnmount as ee, watch as oe, nextTick as le, withModifiers as j, Teleport as re, withCtx as L, normalizeProps as N, guardReactiveProps as H, resolveComponent as J } from "vue";
2
- const ie = { class: "rh-data-center-panel__state" }, W = /* @__PURE__ */ S({
1
+ import { defineComponent as O, openBlock as l, createElementBlock as i, createElementVNode as h, toDisplayString as g, createCommentVNode as C, computed as L, normalizeClass as K, normalizeStyle as Q, Fragment as U, renderList as q, ref as m, onMounted as Z, renderSlot as b, createTextVNode as X, createBlock as Y, createVNode as S, onBeforeUnmount as ee, watch as oe, nextTick as le, withModifiers as j, Teleport as re, withCtx as V, normalizeProps as N, guardReactiveProps as H, resolveComponent as J } from "vue";
2
+ import { _ as ie } from "../_plugin-vue_export-helper-dad06003.js";
3
+ const ce = { class: "rh-data-center-panel__state" }, W = /* @__PURE__ */ O({
3
4
  __name: "RhDataCenterState",
4
5
  props: {
5
6
  text: {},
6
7
  retryable: { type: Boolean, default: !1 }
7
8
  },
8
9
  emits: ["retry"],
9
- setup(e, { emit: m }) {
10
- const t = m;
11
- return (i, u) => (l(), c("div", ie, [
10
+ setup(e, { emit: p }) {
11
+ const t = p;
12
+ return (c, d) => (l(), i("div", ce, [
12
13
  h("span", null, g(e.text), 1),
13
- e.retryable ? (l(), c("button", {
14
+ e.retryable ? (l(), i("button", {
14
15
  key: 0,
15
16
  type: "button",
16
17
  class: "rh-data-center-panel__retry",
17
- onClick: u[0] || (u[0] = (d) => t("retry"))
18
+ onClick: d[0] || (d[0] = (u) => t("retry"))
18
19
  }, " 重新加载 ")) : C("", !0)
19
20
  ]));
20
21
  }
21
- }), ce = { class: "rh-data-center-panel__task" }, ue = { class: "rh-data-center-panel__taskMain" }, de = { class: "rh-data-center-panel__taskTitle" }, ve = {
22
+ }), ue = { class: "rh-data-center-panel__task" }, de = { class: "rh-data-center-panel__taskMain" }, ve = { class: "rh-data-center-panel__taskTitle" }, fe = {
22
23
  key: 0,
23
24
  class: "rh-data-center-panel__taskTag"
24
- }, fe = {
25
+ }, he = {
25
26
  key: 0,
26
27
  class: "rh-data-center-panel__progress"
27
- }, he = { class: "rh-data-center-panel__meta" }, me = {
28
+ }, me = { class: "rh-data-center-panel__meta" }, pe = {
28
29
  key: 0,
29
30
  class: "rh-data-center-panel__actions"
30
- }, pe = ["disabled", "onClick"], ye = /* @__PURE__ */ S({
31
+ }, ye = ["disabled", "onClick"], _e = /* @__PURE__ */ O({
31
32
  __name: "RhDataCenterTaskItem",
32
33
  props: {
33
34
  task: {}
34
35
  },
35
36
  emits: ["action"],
36
- setup(e, { emit: m }) {
37
- const t = e, i = m, u = D(() => {
38
- const d = Number(t.task.progress || 0);
39
- return Math.min(100, Math.max(0, d));
37
+ setup(e, { emit: p }) {
38
+ const t = e, c = p, d = L(() => {
39
+ const u = Number(t.task.progress || 0);
40
+ return Math.min(100, Math.max(0, u));
40
41
  });
41
- return (d, b) => {
42
+ return (u, T) => {
42
43
  var y;
43
- return l(), c("div", ce, [
44
- h("div", ue, [
45
- h("div", de, [
44
+ return l(), i("div", ue, [
45
+ h("div", de, [
46
+ h("div", ve, [
46
47
  h("span", null, g(e.task.title), 1),
47
- e.task.tag ? (l(), c("span", ve, g(e.task.tag), 1)) : C("", !0)
48
+ e.task.tag ? (l(), i("span", fe, g(e.task.tag), 1)) : C("", !0)
48
49
  ]),
49
- e.task.status !== "success" ? (l(), c("div", fe, [
50
+ e.task.status !== "success" ? (l(), i("div", he, [
50
51
  h("div", {
51
52
  class: K(["rh-data-center-panel__progressBar", { "is-failed": e.task.status === "failed" }]),
52
- style: Q({ width: `${u.value}%` })
53
+ style: Q({ width: `${d.value}%` })
53
54
  }, null, 6)
54
55
  ])) : C("", !0),
55
- h("div", he, g(e.task.createdAt), 1),
56
- e.task.message ? (l(), c("div", {
56
+ h("div", me, g(e.task.createdAt), 1),
57
+ e.task.message ? (l(), i("div", {
57
58
  key: 1,
58
59
  class: K(["rh-data-center-panel__message", { "is-failed": e.task.status === "failed" }])
59
60
  }, g(e.task.message), 3)) : C("", !0)
60
61
  ]),
61
- (y = e.task.actions) != null && y.length ? (l(), c("div", me, [
62
- (l(!0), c(U, null, q(e.task.actions, (k) => (l(), c("button", {
62
+ (y = e.task.actions) != null && y.length ? (l(), i("div", pe, [
63
+ (l(!0), i(U, null, q(e.task.actions, (k) => (l(), i("button", {
63
64
  key: k.key,
64
65
  type: "button",
65
66
  class: "rh-data-center-panel__action",
66
67
  disabled: k.disabled,
67
- onClick: (w) => i("action", k.key)
68
- }, g(k.label), 9, pe))), 128))
68
+ onClick: (w) => c("action", k.key)
69
+ }, g(k.label), 9, ye))), 128))
69
70
  ])) : C("", !0)
70
71
  ]);
71
72
  };
72
73
  }
73
- }), _e = "数据处理中心", ke = 606, ge = 500, Ce = 1e3, be = "-此处仅展示近15天内的数据-", Te = { class: "rh-data-center-panel" }, we = { class: "rh-data-center-panel__sidebar" }, $e = ["onClick"], Re = {
74
+ }), ke = "数据处理中心", ge = 606, Ce = 500, Te = 1e3, be = "-此处仅展示近15天内的数据-", we = { class: "rh-data-center-panel" }, $e = { class: "rh-data-center-panel__sidebar" }, Re = ["onClick"], Ee = {
74
75
  key: 0,
75
76
  class: "rh-data-center-panel__categoryCount"
76
- }, Ee = { class: "rh-data-center-panel__main" }, Ae = { class: "rh-data-center-panel__title" }, De = { class: "rh-data-center-panel__scroll" }, Le = {
77
+ }, Ae = { class: "rh-data-center-panel__main" }, De = { class: "rh-data-center-panel__title" }, Le = { class: "rh-data-center-panel__scroll" }, Ve = {
77
78
  key: 0,
78
79
  class: "rh-data-center-panel__footer"
79
- }, Ve = /* @__PURE__ */ S({
80
+ }, xe = /* @__PURE__ */ O({
80
81
  __name: "RhDataCenterPanel",
81
82
  props: {
82
83
  categories: {},
@@ -87,113 +88,113 @@ const ie = { class: "rh-data-center-panel__state" }, W = /* @__PURE__ */ S({
87
88
  recentDaysText: { default: be }
88
89
  },
89
90
  emits: ["close", "refresh", "task-action", "error"],
90
- setup(e, { expose: m, emit: t }) {
91
- const i = e, u = t, d = p(i.activeCategoryKey), b = p({}), y = p({}), k = p({}), w = p({}), R = p({}), v = D(() => i.categories.find((n) => n.key === d.value) || i.categories[0]), E = D(() => {
91
+ setup(e, { expose: p, emit: t }) {
92
+ const c = e, d = t, u = m(c.activeCategoryKey), T = m({}), y = m({}), k = m({}), w = m({}), E = m({}), v = L(() => c.categories.find((n) => n.key === u.value) || c.categories[0]), A = L(() => {
92
93
  var n;
93
94
  return String(((n = v.value) == null ? void 0 : n.key) ?? "");
94
- }), V = D(() => b.value[E.value]), M = D(() => y.value[E.value] === !0), A = D(() => k.value[E.value]), z = (n) => {
95
+ }), R = L(() => T.value[A.value]), M = L(() => y.value[A.value] === !0), D = L(() => k.value[A.value]), z = (n) => {
95
96
  var a;
96
- const r = b.value[String(n.key)];
97
+ const r = T.value[String(n.key)];
97
98
  return ((a = r == null ? void 0 : r.counts) == null ? void 0 : a[String(n.key)]) ?? (r == null ? void 0 : r.total);
98
99
  }, x = async (n = !1) => {
99
100
  const r = v.value;
100
101
  if (!r)
101
102
  return;
102
103
  const a = String(r.key);
103
- if (R.value[a] && !n)
104
+ if (E.value[a] && !n)
104
105
  return;
105
- R.value[a] = !0, y.value[a] = !0, k.value[a] = void 0;
106
+ E.value[a] = !0, y.value[a] = !0, k.value[a] = void 0;
106
107
  const s = (w.value[a] || 0) + 1;
107
- w.value[a] = s, u("refresh", r);
108
+ w.value[a] = s, d("refresh", r);
108
109
  try {
109
- const $ = await i.loadTasks({ category: r });
110
- if (w.value[a] !== s || E.value !== a)
110
+ const $ = await c.loadTasks({ category: r });
111
+ if (w.value[a] !== s || A.value !== a)
111
112
  return;
112
- b.value[a] = $;
113
+ T.value[a] = $;
113
114
  } catch ($) {
114
- if (w.value[a] !== s || E.value !== a)
115
+ if (w.value[a] !== s || A.value !== a)
115
116
  return;
116
- k.value[a] = $, u("error", $, r);
117
+ k.value[a] = $, d("error", $, r);
117
118
  } finally {
118
- w.value[a] === s && (y.value[a] = !1, R.value[a] = !1);
119
+ w.value[a] === s && (y.value[a] = !1, E.value[a] = !1);
119
120
  }
120
121
  }, B = async (n) => {
121
- d.value !== n.key && (d.value = n.key, await x());
122
+ u.value !== n.key && (u.value = n.key, await x());
122
123
  }, P = (n, r) => {
123
124
  const a = v.value;
124
- a && u("task-action", { action: n, task: r, category: a });
125
+ a && d("task-action", { action: n, task: r, category: a });
125
126
  };
126
127
  return Z(() => {
127
128
  var n;
128
- d.value === void 0 && (d.value = (n = i.categories[0]) == null ? void 0 : n.key);
129
- }), m({
129
+ u.value === void 0 && (u.value = (n = c.categories[0]) == null ? void 0 : n.key);
130
+ }), p({
130
131
  refresh: x
131
132
  }), (n, r) => {
132
133
  var a;
133
- return l(), c("div", Te, [
134
- h("aside", we, [
134
+ return l(), i("div", we, [
135
+ h("aside", $e, [
135
136
  r[1] || (r[1] = h("div", { class: "rh-data-center-panel__title" }, "数据类型", -1)),
136
- (l(!0), c(U, null, q(e.categories, (s) => (l(), c("button", {
137
+ (l(!0), i(U, null, q(e.categories, (s) => (l(), i("button", {
137
138
  key: s.key,
138
139
  type: "button",
139
- class: K(["rh-data-center-panel__category", { "is-active": d.value === s.key }]),
140
+ class: K(["rh-data-center-panel__category", { "is-active": u.value === s.key }]),
140
141
  onClick: ($) => B(s)
141
142
  }, [
142
143
  h("span", null, g(s.label), 1),
143
- z(s) !== void 0 ? (l(), c("span", Re, g(z(s)), 1)) : C("", !0)
144
- ], 10, $e))), 128))
144
+ z(s) !== void 0 ? (l(), i("span", Ee, g(z(s)), 1)) : C("", !0)
145
+ ], 10, Re))), 128))
145
146
  ]),
146
- h("section", Ee, [
147
- h("div", Ae, [
148
- T(n.$slots, "header", { category: v.value }, () => [
147
+ h("section", Ae, [
148
+ h("div", De, [
149
+ b(n.$slots, "header", { category: v.value }, () => [
149
150
  r[2] || (r[2] = X("数据处理进度", -1))
150
151
  ]),
151
- e.closeable ? (l(), c("button", {
152
+ e.closeable ? (l(), i("button", {
152
153
  key: 0,
153
154
  type: "button",
154
155
  class: "rh-data-center-panel__action",
155
- onClick: r[0] || (r[0] = (s) => u("close"))
156
+ onClick: r[0] || (r[0] = (s) => d("close"))
156
157
  }, "关闭")) : C("", !0)
157
158
  ]),
158
- h("div", De, [
159
- M.value ? (l(), Y(W, {
159
+ h("div", Le, [
160
+ M.value && !R.value ? (l(), Y(W, {
160
161
  key: 0,
161
162
  text: "加载中..."
162
- })) : A.value ? T(n.$slots, "error", {
163
+ })) : D.value && !R.value ? b(n.$slots, "error", {
163
164
  key: 1,
164
- error: A.value,
165
+ error: D.value,
165
166
  retry: x
166
167
  }, () => [
167
- O(W, {
168
+ S(W, {
168
169
  text: "任务加载失败",
169
170
  retryable: !0,
170
171
  onRetry: x
171
172
  })
172
- ]) : (a = V.value) != null && a.items.length ? (l(!0), c(U, { key: 2 }, q(V.value.items, (s) => T(n.$slots, "task", {
173
+ ]) : (a = R.value) != null && a.items.length ? (l(!0), i(U, { key: 2 }, q(R.value.items, (s) => b(n.$slots, "task", {
173
174
  key: s.id,
174
175
  task: s,
175
176
  category: v.value,
176
177
  action: P
177
178
  }, () => [
178
- O(ye, {
179
+ S(_e, {
179
180
  task: s,
180
181
  onAction: ($) => P($, s)
181
182
  }, null, 8, ["task", "onAction"])
182
- ])), 128)) : T(n.$slots, "empty", {
183
+ ])), 128)) : b(n.$slots, "empty", {
183
184
  key: 3,
184
185
  category: v.value
185
186
  }, () => [
186
- O(W, { text: "暂无任务" })
187
+ S(W, { text: "暂无任务" })
187
188
  ])
188
189
  ]),
189
- T(n.$slots, "footer", {
190
- result: V.value,
190
+ b(n.$slots, "footer", {
191
+ result: R.value,
191
192
  category: v.value
192
193
  }, () => {
193
194
  var s;
194
195
  return [
195
- e.showTotal ? (l(), c("div", Le, [
196
- h("span", null, g(((s = V.value) == null ? void 0 : s.total) || 0) + "条记录", 1),
196
+ e.showTotal ? (l(), i("div", Ve, [
197
+ h("span", null, g(((s = R.value) == null ? void 0 : s.total) || 0) + "条记录", 1),
197
198
  h("span", null, g(e.recentDaysText), 1)
198
199
  ])) : C("", !0)
199
200
  ];
@@ -202,37 +203,37 @@ const ie = { class: "rh-data-center-panel__state" }, W = /* @__PURE__ */ S({
202
203
  ]);
203
204
  };
204
205
  }
205
- }), xe = (e) => typeof e == "function" ? e() : e.value, Be = (e, m) => {
206
- const t = (i) => {
207
- const u = i.target;
208
- if (!u)
206
+ }), Be = (e) => typeof e == "function" ? e() : e.value, Pe = (e, p) => {
207
+ const t = (c) => {
208
+ const d = c.target;
209
+ if (!d)
209
210
  return;
210
- e.some((b) => {
211
+ e.some((T) => {
211
212
  var y;
212
- return (y = xe(b)) == null ? void 0 : y.contains(u);
213
- }) || m();
213
+ return (y = Be(T)) == null ? void 0 : y.contains(d);
214
+ }) || p();
214
215
  };
215
216
  Z(() => document.addEventListener("click", t, !0)), ee(() => document.removeEventListener("click", t, !0));
216
- }, Pe = ["src"], Ie = /* @__PURE__ */ S({
217
+ }, Ie = ["src"], Ne = /* @__PURE__ */ O({
217
218
  __name: "RhDataCenter",
218
219
  props: {
219
220
  modelValue: { type: Boolean, default: void 0 },
220
221
  categories: {},
221
222
  loadTasks: {},
222
- label: { default: _e },
223
- width: { default: ke },
224
- panelHeight: { default: ge },
223
+ label: { default: ke },
224
+ width: { default: ge },
225
+ panelHeight: { default: Ce },
225
226
  panelRight: { default: 0 },
226
- pollInterval: { default: Ce },
227
+ pollInterval: { default: Te },
227
228
  refreshOnOpen: { type: Boolean, default: !0 },
228
229
  closeOnClickOutside: { type: Boolean, default: !0 },
229
230
  icon: { default: "" },
230
231
  activeIcon: { default: "" }
231
232
  },
232
233
  emits: ["update:modelValue", "open", "close", "refresh", "task-action", "error"],
233
- setup(e, { emit: m }) {
234
- const t = e, i = m, u = p(!1), d = p(null), b = p(null), y = p(null), k = p({}), w = p(), R = p(!1), v = D(() => t.modelValue === void 0 ? u.value : t.modelValue), E = D(() => v.value ? t.activeIcon || t.icon : t.icon || t.activeIcon), V = (o) => typeof o == "number" ? `${o}px` : o, M = (o) => typeof o == "number" ? o : Number.parseFloat(o) || 0, A = () => {
235
- const o = d.value, _ = b.value;
234
+ setup(e, { emit: p }) {
235
+ const t = e, c = p, d = m(!1), u = m(null), T = m(null), y = m(null), k = m({}), w = m(), E = m(!1), v = L(() => t.modelValue === void 0 ? d.value : t.modelValue), A = L(() => v.value ? t.activeIcon || t.icon : t.icon || t.activeIcon), R = (o) => typeof o == "number" ? `${o}px` : o, M = (o) => typeof o == "number" ? o : Number.parseFloat(o) || 0, D = () => {
236
+ const o = u.value, _ = T.value;
236
237
  if (!o || !_)
237
238
  return;
238
239
  const f = o.getBoundingClientRect(), F = _.offsetWidth || M(t.width), te = M(t.panelRight), I = 8, ae = f.right - F - te, ne = Math.min(
@@ -245,13 +246,13 @@ const ie = { class: "rh-data-center-panel__state" }, W = /* @__PURE__ */ S({
245
246
  k.value = {
246
247
  top: `${se}px`,
247
248
  left: `${ne}px`,
248
- width: V(t.width),
249
- "--rh-ui-data-center-panel-height": V(t.panelHeight)
249
+ width: R(t.width),
250
+ "--rh-ui-data-center-panel-height": R(t.panelHeight)
250
251
  };
251
252
  }, z = () => {
252
- R.value || (R.value = !0, window.addEventListener("resize", A), window.addEventListener("scroll", A, !0));
253
+ E.value || (E.value = !0, window.addEventListener("resize", D), window.addEventListener("scroll", D, !0));
253
254
  }, x = () => {
254
- R.value && (R.value = !1, window.removeEventListener("resize", A), window.removeEventListener("scroll", A, !0));
255
+ E.value && (E.value = !1, window.removeEventListener("resize", D), window.removeEventListener("scroll", D, !0));
255
256
  }, B = () => {
256
257
  w.value !== void 0 && (window.clearInterval(w.value), w.value = void 0);
257
258
  }, P = () => {
@@ -260,11 +261,11 @@ const ie = { class: "rh-data-center-panel__state" }, W = /* @__PURE__ */ S({
260
261
  }, n = () => {
261
262
  B(), !(!v.value || t.pollInterval <= 0) && (w.value = window.setInterval(P, t.pollInterval));
262
263
  }, r = (o) => {
263
- t.modelValue === void 0 && (u.value = o), i("update:modelValue", o);
264
+ t.modelValue === void 0 && (d.value = o), c("update:modelValue", o);
264
265
  }, a = () => {
265
- v.value || (r(!0), i("open"));
266
+ v.value || (r(!0), c("open"));
266
267
  }, s = () => {
267
- v.value && (r(!1), i("close"));
268
+ v.value && (r(!1), c("close"));
268
269
  }, $ = () => v.value ? s() : a(), G = () => {
269
270
  if (document.visibilityState === "hidden") {
270
271
  B();
@@ -277,19 +278,19 @@ const ie = { class: "rh-data-center-panel__state" }, W = /* @__PURE__ */ S({
277
278
  document.removeEventListener("visibilitychange", G);
278
279
  return;
279
280
  }
280
- await le(), A(), z(), document.addEventListener("visibilitychange", G), t.refreshOnOpen && P(), n();
281
- }, { immediate: !0 }), Be([d, b], () => {
281
+ await le(), D(), z(), document.addEventListener("visibilitychange", G), t.refreshOnOpen && P(), n();
282
+ }, { immediate: !0 }), Pe([u, T], () => {
282
283
  t.closeOnClickOutside && v.value && s();
283
284
  }), ee(() => {
284
285
  B(), x(), document.removeEventListener("visibilitychange", G);
285
- }), (o, _) => (l(), c(U, null, [
286
+ }), (o, _) => (l(), i(U, null, [
286
287
  h("div", {
287
288
  ref_key: "triggerRef",
288
- ref: d,
289
+ ref: u,
289
290
  class: "rh-data-center",
290
291
  onClick: j($, ["stop"])
291
292
  }, [
292
- T(o.$slots, "trigger", {
293
+ b(o.$slots, "trigger", {
293
294
  visible: v.value,
294
295
  open: a,
295
296
  close: s,
@@ -298,53 +299,53 @@ const ie = { class: "rh-data-center-panel__state" }, W = /* @__PURE__ */ S({
298
299
  h("span", {
299
300
  class: K(["rh-data-center__trigger", { "is-active": v.value }])
300
301
  }, [
301
- E.value ? (l(), c("img", {
302
+ A.value ? (l(), i("img", {
302
303
  key: 0,
303
- src: E.value,
304
+ src: A.value,
304
305
  class: "rh-data-center__icon",
305
306
  alt: ""
306
- }, null, 8, Pe)) : C("", !0),
307
+ }, null, 8, Ie)) : C("", !0),
307
308
  h("span", null, g(e.label), 1)
308
309
  ], 2)
309
310
  ], !0)
310
311
  ], 512),
311
312
  (l(), Y(re, { to: "body" }, [
312
- v.value ? (l(), c("div", {
313
+ v.value ? (l(), i("div", {
313
314
  key: 0,
314
315
  ref_key: "contentRef",
315
- ref: b,
316
+ ref: T,
316
317
  class: "rh-data-center__popover",
317
318
  style: Q(k.value),
318
319
  onClick: _[3] || (_[3] = j(() => {
319
320
  }, ["stop"]))
320
321
  }, [
321
- O(Ve, {
322
+ S(xe, {
322
323
  ref_key: "panelRef",
323
324
  ref: y,
324
325
  categories: e.categories,
325
326
  "load-tasks": e.loadTasks,
326
327
  closeable: !0,
327
328
  onClose: s,
328
- onRefresh: _[0] || (_[0] = (f) => i("refresh", f)),
329
- onTaskAction: _[1] || (_[1] = (f) => i("task-action", f)),
330
- onError: _[2] || (_[2] = (f, F) => i("error", f, F))
329
+ onRefresh: _[0] || (_[0] = (f) => c("refresh", f)),
330
+ onTaskAction: _[1] || (_[1] = (f) => c("task-action", f)),
331
+ onError: _[2] || (_[2] = (f, F) => c("error", f, F))
331
332
  }, {
332
- header: L((f) => [
333
- T(o.$slots, "header", N(H(f)), () => [
333
+ header: V((f) => [
334
+ b(o.$slots, "header", N(H(f)), () => [
334
335
  _[4] || (_[4] = X("数据处理进度", -1))
335
336
  ], !0)
336
337
  ]),
337
- task: L((f) => [
338
- T(o.$slots, "task", N(H(f)), void 0, !0)
338
+ task: V((f) => [
339
+ b(o.$slots, "task", N(H(f)), void 0, !0)
339
340
  ]),
340
- empty: L((f) => [
341
- T(o.$slots, "empty", N(H(f)), void 0, !0)
341
+ empty: V((f) => [
342
+ b(o.$slots, "empty", N(H(f)), void 0, !0)
342
343
  ]),
343
- error: L((f) => [
344
- T(o.$slots, "error", N(H(f)), void 0, !0)
344
+ error: V((f) => [
345
+ b(o.$slots, "error", N(H(f)), void 0, !0)
345
346
  ]),
346
- footer: L((f) => [
347
- T(o.$slots, "footer", N(H(f)), void 0, !0)
347
+ footer: V((f) => [
348
+ b(o.$slots, "footer", N(H(f)), void 0, !0)
348
349
  ]),
349
350
  _: 3
350
351
  }, 8, ["categories", "load-tasks"])
@@ -353,21 +354,16 @@ const ie = { class: "rh-data-center-panel__state" }, W = /* @__PURE__ */ S({
353
354
  ], 64));
354
355
  }
355
356
  });
356
- const Ne = (e, m) => {
357
- const t = e.__vccOpts || e;
358
- for (const [i, u] of m)
359
- t[i] = u;
360
- return t;
361
- }, Fe = /* @__PURE__ */ Ne(Ie, [["__scopeId", "data-v-b6caa4d9"]]), He = {
357
+ const Ke = /* @__PURE__ */ ie(Ne, [["__scopeId", "data-v-94eef479"]]), He = {
362
358
  key: 0,
363
359
  class: "rh-data-center-tip__guide"
364
- }, Oe = { class: "rh-data-center-tip__content" }, Se = {
360
+ }, Se = { class: "rh-data-center-tip__content" }, Oe = {
365
361
  key: 0,
366
362
  class: "rh-data-center-tip__minutes"
367
363
  }, Me = {
368
364
  key: 1,
369
365
  class: "rh-data-center-tip__description"
370
- }, Ke = /* @__PURE__ */ S({
366
+ }, Ue = /* @__PURE__ */ O({
371
367
  __name: "RhDataCenterTip",
372
368
  props: {
373
369
  modelValue: { type: Boolean, default: !1 },
@@ -379,50 +375,50 @@ const Ne = (e, m) => {
379
375
  showGuideAnimation: { type: Boolean, default: !0 }
380
376
  },
381
377
  emits: ["update:modelValue", "close"],
382
- setup(e, { emit: m }) {
383
- const t = m, i = () => {
378
+ setup(e, { emit: p }) {
379
+ const t = p, c = () => {
384
380
  t("update:modelValue", !1), t("close");
385
381
  };
386
- return (u, d) => {
387
- const b = J("el-button"), y = J("el-dialog");
382
+ return (d, u) => {
383
+ const T = J("el-button"), y = J("el-dialog");
388
384
  return l(), Y(y, {
389
385
  "model-value": e.modelValue,
390
386
  title: e.title || "提示",
391
387
  width: e.width,
392
388
  "append-to-body": "",
393
- "onUpdate:modelValue": d[0] || (d[0] = (k) => t("update:modelValue", k)),
394
- onClose: i
389
+ "onUpdate:modelValue": u[0] || (u[0] = (k) => t("update:modelValue", k)),
390
+ onClose: c
395
391
  }, {
396
- footer: L(() => [
397
- O(b, {
392
+ footer: V(() => [
393
+ S(T, {
398
394
  type: "primary",
399
- onClick: i
395
+ onClick: c
400
396
  }, {
401
- default: L(() => [...d[1] || (d[1] = [
397
+ default: V(() => [...u[1] || (u[1] = [
402
398
  X("关闭弹框", -1)
403
399
  ])]),
404
400
  _: 1
405
401
  })
406
402
  ]),
407
- default: L(() => [
408
- e.showGuideAnimation ? (l(), c("div", He)) : C("", !0),
409
- h("div", Oe, [
410
- e.minutes !== void 0 ? (l(), c("span", Se, g((e.title || "任务处理中,大概需要") + e.minutes + "分钟"), 1)) : C("", !0),
411
- e.content ? (l(), c("div", Me, g(e.content), 1)) : C("", !0),
412
- T(u.$slots, "extra")
403
+ default: V(() => [
404
+ e.showGuideAnimation ? (l(), i("div", He)) : C("", !0),
405
+ h("div", Se, [
406
+ e.minutes !== void 0 ? (l(), i("span", Oe, g((e.title || "任务处理中,大概需要") + e.minutes + "分钟"), 1)) : C("", !0),
407
+ e.content ? (l(), i("div", Me, g(e.content), 1)) : C("", !0),
408
+ b(d.$slots, "extra")
413
409
  ])
414
410
  ]),
415
411
  _: 3
416
412
  }, 8, ["model-value", "title", "width"]);
417
413
  };
418
414
  }
419
- }), Ue = () => {
420
- const e = p(!1), m = p({});
415
+ }), Ge = () => {
416
+ const e = m(!1), p = m({});
421
417
  return {
422
418
  tipVisible: e,
423
- tipConfig: m,
424
- showTip: (u) => {
425
- m.value = { ...u }, e.value = !0;
419
+ tipConfig: p,
420
+ showTip: (d) => {
421
+ p.value = { ...d }, e.value = !0;
426
422
  },
427
423
  closeTip: () => {
428
424
  e.value = !1;
@@ -430,8 +426,8 @@ const Ne = (e, m) => {
430
426
  };
431
427
  };
432
428
  export {
433
- Fe as RhDataCenter,
434
- Ve as RhDataCenterPanel,
435
- Ke as RhDataCenterTip,
436
- Ue as useRhDataCenter
429
+ Ke as RhDataCenter,
430
+ xe as RhDataCenterPanel,
431
+ Ue as RhDataCenterTip,
432
+ Ge as useRhDataCenter
437
433
  };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./data-center/index.cjs");require("vue");exports.RhDataCenter=e.RhDataCenter;exports.RhDataCenterPanel=e.RhDataCenterPanel;exports.RhDataCenterTip=e.RhDataCenterTip;exports.useRhDataCenter=e.useRhDataCenter;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./data-center/index.cjs"),t=require("./responsive-info-grid/index.cjs");require("vue");require("./_plugin-vue_export-helper-f246444f.cjs");exports.RhDataCenter=e.RhDataCenter;exports.RhDataCenterPanel=e.RhDataCenterPanel;exports.RhDataCenterTip=e.RhDataCenterTip;exports.useRhDataCenter=e.useRhDataCenter;exports.RhResponsiveInfoGrid=t.RhResponsiveInfoGrid;exports.RhResponsiveInfoGridItem=t.RhResponsiveInfoGridItem;
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
 
2
2
  export * from './data-center';
3
+ export * from './responsive-info-grid';
package/dist/index.js CHANGED
@@ -1,8 +1,12 @@
1
- import { RhDataCenter as r, RhDataCenterPanel as n, RhDataCenterTip as h, useRhDataCenter as C } from "./data-center/index.js";
1
+ import { RhDataCenter as a, RhDataCenterPanel as n, RhDataCenterTip as R, useRhDataCenter as i } from "./data-center/index.js";
2
+ import { RhResponsiveInfoGrid as h, RhResponsiveInfoGridItem as m } from "./responsive-info-grid/index.js";
2
3
  import "vue";
4
+ import "./_plugin-vue_export-helper-dad06003.js";
3
5
  export {
4
- r as RhDataCenter,
6
+ a as RhDataCenter,
5
7
  n as RhDataCenterPanel,
6
- h as RhDataCenterTip,
7
- C as useRhDataCenter
8
+ R as RhDataCenterTip,
9
+ h as RhResponsiveInfoGrid,
10
+ m as RhResponsiveInfoGridItem,
11
+ i as useRhDataCenter
8
12
  };
@@ -0,0 +1,53 @@
1
+ declare function __VLS_template(): {
2
+ default?(_: {}): any;
3
+ };
4
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
5
+ columns?: number;
6
+ tabletColumns?: number;
7
+ mobileColumns?: number;
8
+ gap?: string;
9
+ }>, {
10
+ columns: number;
11
+ tabletColumns: number;
12
+ mobileColumns: number;
13
+ gap: string;
14
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
15
+ columns?: number;
16
+ tabletColumns?: number;
17
+ mobileColumns?: number;
18
+ gap?: string;
19
+ }>, {
20
+ columns: number;
21
+ tabletColumns: number;
22
+ mobileColumns: number;
23
+ gap: string;
24
+ }>>> & Readonly<{}>, {
25
+ columns: number;
26
+ tabletColumns: number;
27
+ mobileColumns: number;
28
+ gap: string;
29
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
30
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
31
+ export default _default;
32
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
33
+ type __VLS_TypePropsToRuntimeProps<T> = {
34
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
35
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
36
+ } : {
37
+ type: import('vue').PropType<T[K]>;
38
+ required: true;
39
+ };
40
+ };
41
+ type __VLS_WithDefaults<P, D> = {
42
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
43
+ default: D[K];
44
+ }> : P[K];
45
+ };
46
+ type __VLS_Prettify<T> = {
47
+ [K in keyof T]: T[K];
48
+ } & {};
49
+ type __VLS_WithTemplateSlots<T, S> = T & {
50
+ new (): {
51
+ $slots: S;
52
+ };
53
+ };