@duxweb/dvha-pro 1.1.1 → 1.1.2

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,8 +1,8 @@
1
- import { defineComponent as Q, toRef as v, computed as u, reactive as w, createVNode as e, h as C, mergeProps as X, isVNode as Y } from "vue";
2
- import { useI18n as Z, useJsonSchema as N, useTabStore as $ } from "@duxweb/dvha-core";
3
- import { useWindowSize as ee } from "@vueuse/core";
4
- import { NTabs as te, NTab as oe, NButton as r, NPopselect as ie, NTooltip as f, NProgress as le, NPagination as ae, NModal as re, NDrawer as S } from "naive-ui";
5
- import { useAction as ne } from "../../hooks/action.js";
1
+ import { defineComponent as $, toRef as x, reactive as w, computed as d, ref as k, watch as O, nextTick as v, onMounted as ee, createVNode as e, h as te, mergeProps as ae } from "vue";
2
+ import { useI18n as ie, useJsonSchema as le, useTabStore as oe } from "@duxweb/dvha-core";
3
+ import { useWindowSize as re } from "@vueuse/core";
4
+ import { NTabs as ne, NTab as se, NButton as s, NPopselect as ue, NTooltip as h, NProgress as ce, NPagination as pe, NDrawer as j } from "naive-ui";
5
+ import { useAction as de } from "../../hooks/action.js";
6
6
  import "@overlastic/vue";
7
7
  import "clsx";
8
8
  import "vue-echarts";
@@ -18,12 +18,10 @@ import "ace-builds/src-noconflict/ext-searchbox";
18
18
  import "ace-builds/src-noconflict/ext-language_tools";
19
19
  import "ace-builds/src-noconflict/mode-snippets";
20
20
  import "vue-cropper";
21
- import se from "../modal/modalPage.js";
22
21
  import "jinrishici";
23
22
  import "lodash-es";
24
23
  import "vue-draggable-plus";
25
- import { DuxTableFilter as ue } from "./filter.js";
26
- import { DuxFilterLayout as ce } from "./filterLayout.js";
24
+ import { DuxTableFilter as me } from "./filter.js";
27
25
  import "@vee-validate/i18n";
28
26
  import "colorizr";
29
27
  import "echarts";
@@ -51,10 +49,10 @@ import "vee-validate";
51
49
  import "vue-router";
52
50
  import "vue-command-palette";
53
51
  import "@duxweb/dvha-naiveui";
54
- import { DuxPage as me } from "../../pages/page.js";
52
+ import { DuxPage as fe } from "../../pages/page.js";
55
53
  import "../../pages/page404.js";
56
- import { DuxDrawerPage as T } from "../drawer/drawerPage.js";
57
- import { DuxTableTools as de } from "./tools.js";
54
+ import { DuxDrawerPage as P } from "../drawer/drawerPage.js";
55
+ import { DuxTableTools as be } from "./tools.js";
58
56
  import "short-unique-id";
59
57
  import "aieditor";
60
58
  import "@vue-flow/core";
@@ -66,12 +64,9 @@ import "../posterEditor/elements/index.js";
66
64
  import "fabric";
67
65
  import "dayjs";
68
66
  import "@tanstack/vue-query";
69
- import { useTable as pe } from "../../hooks/table.js";
67
+ import { useTable as ve } from "../../hooks/table.js";
70
68
  import "pinia";
71
- function fe(t) {
72
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !Y(t);
73
- }
74
- const zt = /* @__PURE__ */ Q({
69
+ const zt = /* @__PURE__ */ $({
75
70
  name: "DuxTableLayout",
76
71
  props: {
77
72
  path: {
@@ -123,107 +118,143 @@ const zt = /* @__PURE__ */ Q({
123
118
  type: Object
124
119
  }
125
120
  },
126
- setup(t, {
127
- slots: i,
128
- expose: j
121
+ setup(a, {
122
+ slots: l,
123
+ expose: z
129
124
  }) {
130
- const b = v(t, "filter", {}), L = v(t, "sorter", {}), P = v(t, "columns", []), {
131
- t: l
132
- } = Z(), {
133
- renderAction: z
134
- } = ne(), n = pe({
135
- ...t.hookTableProps,
136
- path: t.path,
137
- filters: b.value,
125
+ const r = x(a, "filter", {}), L = x(a, "sorter", {}), B = x(a, "columns", []), {
126
+ t: n
127
+ } = ie(), {
128
+ renderAction: U
129
+ } = de(), o = w({
130
+ ...r.value || {}
131
+ }), u = ve({
132
+ ...a.hookTableProps,
133
+ path: a.path,
134
+ filters: o,
138
135
  sorters: L.value,
139
- columns: P,
140
- pagination: t.pagination
136
+ columns: B,
137
+ pagination: a.pagination
141
138
  });
142
- j(n);
139
+ z(u);
143
140
  const {
144
- columns: y,
145
- tablePagination: D,
146
- table: x,
147
- onUpdateColumnSelected: O,
148
- onUpdateChecked: A,
149
- columnSelected: U,
150
- autoRefetch: B,
151
- autoCountdown: k,
152
- onAutoRefetch: E,
153
- isExporting: F,
154
- isExportingRows: I,
155
- isImporting: V,
156
- onExport: W,
157
- onExportRows: K,
158
- onImport: M
159
- } = n, _ = u(() => y.value.filter((o) => "title" in o && "key" in o).map((o) => ({
160
- label: o.title,
161
- value: o.key
141
+ columns: C,
142
+ tablePagination: A,
143
+ table: R,
144
+ onUpdateColumnSelected: D,
145
+ onUpdateChecked: E,
146
+ columnSelected: q,
147
+ autoRefetch: F,
148
+ autoCountdown: S,
149
+ onAutoRefetch: I,
150
+ isExporting: J,
151
+ isExportingRows: W,
152
+ isImporting: K,
153
+ onExport: V,
154
+ onExportRows: M,
155
+ onImport: G
156
+ } = u, H = d(() => C.value.filter((t) => "title" in t && "key" in t).map((t) => ({
157
+ label: t.title,
158
+ value: t.key
162
159
  }))), {
163
- width: s
164
- } = ee(), q = u(() => y.value.reduce((a, p) => a + (Number(p?.width) || Number(p?.minWidth) || 110), 0)), c = w({
160
+ width: c
161
+ } = re(), Q = d(() => C.value.reduce((i, p) => i + (Number(p?.width) || Number(p?.minWidth) || 110), 0)), m = w({
165
162
  show: !1
166
- }), m = w({
163
+ }), f = w({
167
164
  show: !1
168
- }), d = w({
169
- show: !1
170
- }), h = u(() => (t.filterSchema || []).map((o) => {
165
+ }), g = k(!1), X = d(() => (a.filterSchema || []).map((t) => {
171
166
  const {
172
- label: a,
167
+ label: i,
173
168
  ...p
174
- } = o;
169
+ } = t;
175
170
  return {
176
- tag: ue,
171
+ tag: me,
177
172
  attrs: {
178
- label: a
173
+ label: i
179
174
  },
180
175
  children: p
181
176
  };
182
177
  })), {
183
- render: J
184
- } = N({
185
- data: u(() => h.value?.slice(t.filterNumber))
186
- }), {
187
- render: G
188
- } = N({
189
- data: u(() => h.value?.slice(0, t.filterNumber))
190
- }), g = u(() => ({
178
+ render: Y
179
+ } = le({
180
+ data: d(() => X.value)
181
+ }), y = d(() => ({
191
182
  import: !1,
192
183
  export: !0,
193
184
  refresh: !0,
194
- ...t.tools
195
- })), R = $(), H = R.tabs.find((o) => o.path === R.current);
196
- return () => e(me, {
197
- actions: t.actions,
185
+ ...a.tools
186
+ })), T = k(0), b = k(null);
187
+ O(() => a.tabs?.map((t) => t.value), () => {
188
+ const t = a.tabs?.map((i) => i.value) || [];
189
+ if (r.value?.tab === void 0) {
190
+ const i = t[0];
191
+ i !== void 0 && (r.value.tab = i);
192
+ }
193
+ v(() => b.value?.syncBarPosition());
194
+ }, {
195
+ deep: !0
196
+ }), O(() => c.value, () => {
197
+ v(() => {
198
+ b.value?.syncBarPosition();
199
+ });
200
+ });
201
+ const N = oe(), Z = N.tabs.find((t) => t.path === N.current), _ = d(() => {
202
+ const t = a.tabs?.map((p) => p.value) || [], i = r.value?.tab;
203
+ return t.includes(i) ? i : t[0];
204
+ });
205
+ return ee(() => {
206
+ v(() => {
207
+ b.value?.syncBarPosition();
208
+ });
209
+ }), () => e(fe, {
210
+ actions: a.actions,
198
211
  scrollbar: !1
199
212
  }, {
200
- sideLeft: () => i?.sideLeft && s.value >= 1024 ? i?.sideLeft?.() : void 0,
201
- sideRight: () => i?.sideRight && s.value >= 1024 ? i?.sideRight?.() : void 0,
213
+ sideLeft: () => l?.sideLeft && c.value >= 1024 ? l?.sideLeft?.() : void 0,
214
+ sideRight: () => l?.sideRight && c.value >= 1024 ? l?.sideRight?.() : void 0,
202
215
  default: () => e("div", {
203
- class: "flex flex-col gap-2 h-full relative"
216
+ class: "flex flex-col gap-3 h-full relative"
217
+ }, [e("div", {
218
+ class: "flex gap-2 justify-between flex-row border-b border-muted"
204
219
  }, [e("div", {
205
- class: "flex gap-2 justify-between flex-col lg:flex-row"
206
- }, [t.tabs && e("div", {
207
- class: "flex flex-none"
208
- }, [e(te, {
209
- type: "segment",
220
+ class: "relative top-1.5px"
221
+ }, [!a.tabs && e("div", {
222
+ class: "pt-1 text-base"
223
+ }, [Z?.label]), a.tabs && e(ne, {
224
+ ref: b,
225
+ type: "bar",
210
226
  size: "small",
211
227
  style: {
212
- "--n-tab-padding": "4px 10px"
228
+ "--n-tab-padding": "5px 20px 15px 20px",
229
+ "--n-tab-gap": "20px"
213
230
  },
214
- "default-value": t.tabs?.[0]?.value,
215
- value: b.value?.tab,
216
- onUpdateValue: (o) => {
217
- b.value.tab = o;
231
+ "default-value": a.tabs?.[0]?.value || "",
232
+ value: _.value,
233
+ onUpdateValue: (t) => {
234
+ r.value.tab = t, o.tab = t, v(() => b.value?.syncBarPosition());
218
235
  }
219
236
  }, {
220
- default: () => [t.tabs?.map((o) => e(oe, {
221
- name: o.value,
222
- tab: o.label
237
+ default: () => [a.tabs?.map((t) => e(se, {
238
+ name: t.value,
239
+ tab: t.label
223
240
  }, null))]
224
241
  })]), e("div", {
225
- class: ["overflow-hidden flex-1 flex gap-2"]
226
- }, [i?.sideLeft && s.value < 1024 && e(r, {
242
+ class: "flex gap-2 justify-end pb-2"
243
+ }, [l.actions?.(), a.actions?.length > 0 && U({
244
+ type: c.value < 1024 ? "dropdown" : "button",
245
+ items: a.actions
246
+ })])]), e("div", {
247
+ class: "flex gap-2 justify-between flex-col-reverse lg:flex-row"
248
+ }, [(c.value >= 1024 || g.value) && e("div", {
249
+ class: ["flex-1 flex flex-col lg:flex-row gap-2 flex-wrap"]
250
+ }, [e("div", {
251
+ key: T.value,
252
+ class: "contents"
253
+ }, [te(Y)])]), e("div", {
254
+ class: "flex justify-between gap-2"
255
+ }, [e("div", {
256
+ class: ["flex gap-2"]
257
+ }, [l?.sideLeft && c.value < 1024 && e(s, {
227
258
  class: "flex-none",
228
259
  secondary: !0,
229
260
  onClick: () => {
@@ -233,179 +264,194 @@ const zt = /* @__PURE__ */ Q({
233
264
  icon: () => e("div", {
234
265
  class: "i-tabler:layout-sidebar-inactive size-4"
235
266
  }, null)
236
- }), e("div", {
237
- class: ["flex-1 flex flex-col lg:flex-row gap-2 flex-wrap", t.tabs ? "justify-end" : "justify-start"]
238
- }, [!t.tabs && !t.filterSchema?.length && e("div", {
239
- class: "flex flex-none items-center text-base font-medium"
240
- }, [H?.label]), C(G)]), i?.sideRight && s.value < 1024 && e(r, {
267
+ }), l?.sideRight && c.value < 1024 && e(s, {
241
268
  class: "flex-none",
242
269
  secondary: !0,
243
270
  onClick: () => {
244
- d.show = !d.show;
271
+ f.show = !f.show;
245
272
  }
246
273
  }, {
247
274
  icon: () => e("div", {
248
275
  class: "i-tabler:layout-sidebar-right-inactive size-4"
249
276
  }, null)
250
- })]), e("div", {
251
- class: "flex gap-2 justify-between lg:justify-end"
277
+ }), e("div", {
278
+ class: "flex-none lg:hidden"
279
+ }, [e(s, {
280
+ secondary: !0,
281
+ onClick: () => {
282
+ g.value = !g.value;
283
+ }
284
+ }, {
285
+ icon: () => e("div", {
286
+ class: "i-tabler:filter size-4"
287
+ }, null)
288
+ })])]), e("div", {
289
+ class: ["flex gap-2 flex-row"]
252
290
  }, [e("div", {
253
- class: "flex gap-2 items-center"
254
- }, [h.value.length > t.filterNumber && e(r, {
255
- iconPlacement: "right",
291
+ class: "flex lg:hidden"
292
+ }, [e(s, {
293
+ type: "primary",
294
+ secondary: !0,
256
295
  onClick: () => {
257
- c.show = !c.show;
296
+ Object.keys(o).forEach((t) => {
297
+ delete o[t];
298
+ }), Object.assign(o, JSON.parse(JSON.stringify(r.value || {}))), u.onUpdatePage?.(1);
258
299
  }
259
300
  }, {
260
- default: () => l("components.button.filter"),
261
301
  icon: () => e("div", {
262
- class: ["i-tabler:chevrons-down size-4 transition-all"]
302
+ class: "i-tabler:search size-4"
263
303
  }, null)
264
- }), i?.tools?.(), e(ie, {
265
- options: _.value,
266
- value: U.value,
267
- onUpdateValue: (o) => {
268
- O(o);
304
+ })]), e("div", {
305
+ class: ["hidden lg:flex gap-2"]
306
+ }, [e(s, {
307
+ type: "primary",
308
+ secondary: !0,
309
+ onClick: () => {
310
+ Object.keys(o).forEach((t) => delete o[t]), Object.assign(o, JSON.parse(JSON.stringify(r.value || {}))), u.onUpdatePage?.(1);
311
+ }
312
+ }, {
313
+ icon: () => e("div", {
314
+ class: "i-tabler:search size-4"
315
+ }, null),
316
+ default: () => n("components.button.search")
317
+ }), e(s, {
318
+ secondary: !0,
319
+ onClick: () => {
320
+ const t = r.value.tab;
321
+ Object.keys(r.value || {}).forEach((i) => {
322
+ i !== "tab" && delete r.value[i];
323
+ }), Object.keys(o).forEach((i) => {
324
+ delete o[i];
325
+ }), t !== void 0 && (o.tab = t), u.onUpdatePage?.(1), T.value++;
326
+ }
327
+ }, {
328
+ icon: () => e("div", {
329
+ class: "i-tabler:arrow-back-up size-4"
330
+ }, null),
331
+ default: () => n("components.button.reset")
332
+ })])])])]), l?.header?.(), e("div", {
333
+ class: "flex-1 min-h-0"
334
+ }, [l?.default?.({
335
+ ...u,
336
+ width: Q.value
337
+ })]), e("div", {
338
+ class: "flex justify-between"
339
+ }, [e("div", {
340
+ class: "flex items-center gap-0.5"
341
+ }, [l?.bottom?.(), l?.tools?.(), e(ue, {
342
+ options: H.value,
343
+ value: q.value,
344
+ onUpdateValue: (t) => {
345
+ D(t);
269
346
  },
270
347
  multiple: !0,
271
348
  placement: "bottom-start",
272
349
  trigger: "click"
273
350
  }, {
274
- default: () => [e(f, null, {
275
- trigger: () => e(r, {
276
- secondary: !0,
351
+ default: () => [e(h, null, {
352
+ trigger: () => e(s, {
353
+ quaternary: !0,
354
+ circle: !0,
277
355
  "icon-placement": "right"
278
356
  }, {
279
357
  icon: () => e("div", {
280
358
  class: "i-tabler:columns size-4"
281
359
  }, null)
282
360
  }),
283
- default: () => l("components.list.columnSetting")
361
+ default: () => n("components.list.columnSetting")
284
362
  })]
285
- }), g.value.export && e(f, null, {
286
- trigger: () => e(r, {
287
- secondary: !0,
288
- loading: F.value,
289
- onClick: W
363
+ }), y.value.export && e(h, null, {
364
+ trigger: () => e(s, {
365
+ quaternary: !0,
366
+ circle: !0,
367
+ loading: J.value,
368
+ onClick: V
290
369
  }, {
291
370
  icon: () => e("div", {
292
371
  class: "i-tabler:database-export size-4"
293
372
  }, null)
294
373
  }),
295
- default: () => l("components.button.export")
296
- }), g.value.import && e(f, null, {
297
- trigger: () => e(r, {
298
- secondary: !0,
299
- loading: V.value,
300
- onClick: M
374
+ default: () => n("components.button.export")
375
+ }), y.value.import && e(h, null, {
376
+ trigger: () => e(s, {
377
+ quaternary: !0,
378
+ circle: !0,
379
+ loading: K.value,
380
+ onClick: G
301
381
  }, {
302
382
  icon: () => e("div", {
303
383
  class: "i-tabler:database-import size-4"
304
384
  }, null)
305
385
  }),
306
- default: () => l("components.button.import")
307
- }), g.value.refresh && e(f, null, {
308
- trigger: () => e(r, {
309
- secondary: !0,
310
- onClick: E
386
+ default: () => n("components.button.import")
387
+ }), y.value.refresh && e(h, null, {
388
+ trigger: () => e(s, {
389
+ quaternary: !0,
390
+ circle: !0,
391
+ onClick: I
311
392
  }, {
312
- icon: () => B.value ? e(le, {
393
+ icon: () => F.value ? e(ce, {
313
394
  class: "size-4",
314
395
  type: "circle",
315
- percentage: k.value * 10,
396
+ percentage: S.value * 10,
316
397
  strokeWidth: 20,
317
398
  color: "rgba(var(--ui-color-primary))"
318
399
  }, {
319
400
  default: () => [e("span", {
320
401
  class: "text-8px"
321
- }, [k.value])]
402
+ }, [S.value])]
322
403
  }) : e("div", {
323
404
  class: "i-tabler:refresh size-4"
324
405
  }, null)
325
406
  }),
326
- default: () => l("components.button.autoRefresh")
327
- })]), e("div", {
328
- class: "flex gap-2 justify-end"
329
- }, [i.actions?.(), t.actions?.length > 0 && z({
330
- type: s.value < 1024 ? "dropdown" : "button",
331
- items: t.actions
332
- })])])]), i?.header?.(), e("div", {
333
- class: "flex-1 min-h-0"
334
- }, [i?.default?.({
335
- ...n,
336
- width: q.value
337
- })]), e("div", {
338
- class: "flex justify-between"
339
- }, [e("div", null, [i?.bottom?.()]), e("div", null, [t.pagination && e(ae, X(D.value, {
340
- simple: s.value < 768
407
+ default: () => n("components.button.autoRefresh")
408
+ })]), e("div", null, [a.pagination && e(pe, ae(A.value, {
409
+ simple: c.value < 768
341
410
  }), {
342
- prefix: () => e("div", null, [l("components.list.total", {
343
- total: n.total.value || 0
411
+ prefix: () => e("div", null, [n("components.list.total", {
412
+ total: u.total.value || 0
344
413
  })])
345
- })])]), e(de, {
346
- isLoading: n.isBatching.value,
347
- onBatch: n.onBatch,
348
- selecteds: x.value.checkedRowKeys,
349
- number: x.value.checkedRowKeys?.length || 0 || 0,
414
+ })])]), e(be, {
415
+ isLoading: u.isBatching.value,
416
+ onBatch: u.onBatch,
417
+ selecteds: R.value.checkedRowKeys,
418
+ number: R.value.checkedRowKeys?.length || 0 || 0,
350
419
  group: [[{
351
420
  icon: "i-tabler:x",
352
421
  onClick: () => {
353
- A?.([]);
422
+ E?.([]);
354
423
  }
355
424
  }], [{
356
- label: l("components.button.export"),
425
+ label: n("components.button.export"),
357
426
  icon: "i-tabler:file-export",
358
- loading: I.value,
359
- onClick: K
360
- }, ...t.batchOptions || []]]
361
- }, null), e(re, {
362
- draggable: !0,
363
- class: "bg-white rounded dark:shadow-gray-950/80 dark:bg-gray-800/60 backdrop-blur min-w-110",
364
- show: c.show,
365
- onUpdateShow: (o) => c.show = o
366
- }, {
367
- default: ({
368
- draggableClass: o
369
- }) => {
370
- let a;
371
- return e(se, {
372
- title: l("components.button.filter"),
373
- handle: o,
374
- onClose: () => c.show = !1
375
- }, {
376
- default: () => [e(ce, {
377
- showLabel: !0,
378
- labelPlacement: "top"
379
- }, fe(a = C(J)) ? a : {
380
- default: () => [a]
381
- })]
382
- });
383
- }
384
- }), e(S, {
427
+ loading: W.value,
428
+ onClick: M
429
+ }, ...a.batchOptions || []]]
430
+ }, null), e(j, {
385
431
  show: m.show,
386
- onUpdateShow: (o) => m.show = o,
432
+ onUpdateShow: (t) => m.show = t,
387
433
  autoFocus: !1,
388
434
  placement: "left"
389
435
  }, {
390
- default: () => [e(T, {
391
- title: t.sideLeftTitle || l("components.button.sideLeft"),
436
+ default: () => [e(P, {
437
+ title: a.sideLeftTitle || n("components.button.sideLeft"),
392
438
  onClose: () => m.show = !1,
393
439
  scrollbar: !1
394
440
  }, {
395
- default: () => [i?.sideLeft?.()]
441
+ default: () => [l?.sideLeft?.()]
396
442
  })]
397
- }), e(S, {
398
- show: d.show,
399
- onUpdateShow: (o) => d.show = o,
443
+ }), e(j, {
444
+ show: f.show,
445
+ onUpdateShow: (t) => f.show = t,
400
446
  autoFocus: !1,
401
447
  placement: "right"
402
448
  }, {
403
- default: () => [e(T, {
404
- title: t.sideRightTitle || l("components.button.sideRight"),
405
- onClose: () => d.show = !1,
449
+ default: () => [e(P, {
450
+ title: a.sideRightTitle || n("components.button.sideRight"),
451
+ onClose: () => f.show = !1,
406
452
  scrollbar: !1
407
453
  }, {
408
- default: () => [i?.sideRight?.()]
454
+ default: () => [l?.sideRight?.()]
409
455
  })]
410
456
  })])
411
457
  });
@@ -105,7 +105,7 @@ const Bt = /* @__PURE__ */ u({
105
105
  leaveToClass: "transform translate-y-full opacity-0"
106
106
  }, {
107
107
  default: () => [m.value ? o("div", {
108
- class: "flex h-12 px-1 justify-between lg:justify-center gap-2 pointer-events-auto"
108
+ class: "flex h-10 px-1 justify-between lg:justify-center gap-2 pointer-events-auto"
109
109
  }, [i.value?.map((s, n) => o("div", {
110
110
  class: "h-10 mt-1 bg-default rounded px-4 py-1 shadow flex items-center gap-4"
111
111
  }, [n === i.value.length - 1 && o(c, null, [o("span", {
@@ -1,63 +1,28 @@
1
- import { defineComponent as a, createVNode as e, h as c, mergeProps as n } from "vue";
1
+ import { defineComponent as r, createVNode as t, h as m, mergeProps as d } from "vue";
2
2
  import { NImage as i } from "naive-ui";
3
- import { DuxPlaceholder as o } from "./placeholder.js";
4
- const g = /* @__PURE__ */ a({
3
+ import { DuxPlaceholder as h } from "./placeholder.js";
4
+ const o = /* @__PURE__ */ r({
5
5
  name: "DuxImage",
6
6
  props: {},
7
7
  extends: i,
8
- setup(r) {
9
- return () => {
10
- const l = `size-${r.height}px`, t = e("svg", {
11
- viewBox: "0 0 100 100",
12
- class: l
13
- }, [e("circle", {
14
- cx: "50",
15
- cy: "50",
16
- r: "50",
17
- fill: "rgb(var(--ui-color-primary))",
18
- "fill-opacity": "0.1"
19
- }, null), e("g", {
20
- fill: "rgb(var(--ui-color-primary))",
21
- "fill-opacity": "0.65"
22
- }, [e("circle", {
23
- cx: "50",
24
- cy: "36",
25
- r: "14"
26
- }, null), e("path", {
27
- d: "M 50 54 C 30 54 15 69 15 87 L 15 100 L 85 100 L 85 87 C 85 69 70 54 50 54 Z"
28
- }, null)]), e("g", {
29
- fill: "rgb(var(--ui-color-primary))",
30
- "fill-opacity": "0.3"
31
- }, [e("circle", {
32
- cx: "20",
33
- cy: "20",
34
- r: "1.5"
35
- }, [e("animate", {
36
- attributeName: "r",
37
- values: "1.5;2.5;1.5",
38
- dur: "3s",
39
- repeatCount: "indefinite"
40
- }, null)]), e("circle", {
41
- cx: "80",
42
- cy: "25",
43
- r: "1"
44
- }, [e("animate", {
45
- attributeName: "r",
46
- values: "1;2;1",
47
- dur: "4s",
48
- repeatCount: "indefinite"
49
- }, null)])])]);
50
- return r.src ? e(i, n(r, {
51
- src: r.src
52
- }), {
53
- placeholder: () => e(o, {
54
- width: r.width,
55
- height: r.height
56
- }, null)
57
- }) : c(t);
58
- };
8
+ setup(e) {
9
+ return () => e.src ? t(i, d(e, {
10
+ src: e.src
11
+ }), {
12
+ placeholder: () => t(h, {
13
+ width: e.width,
14
+ height: e.height
15
+ }, null),
16
+ error: () => t(h, {
17
+ width: e.width,
18
+ height: e.height
19
+ }, null)
20
+ }) : m(h, {
21
+ width: e.width,
22
+ height: e.height
23
+ });
59
24
  }
60
25
  });
61
26
  export {
62
- g as DuxImage
27
+ o as DuxImage
63
28
  };