ling-yun-custom-components 0.0.46 → 0.0.47

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/es/AppIntro.mjs CHANGED
@@ -1,30 +1,11 @@
1
- import { w as $ } from "./chunks/index.bCzIhWFw.js";
2
- import { createElementBlock as i, openBlock as n, createElementVNode as u, toDisplayString as m, renderSlot as R, createCommentVNode as _, unref as o, ref as w, resolveDirective as M, createVNode as c, Fragment as v, renderList as N, withCtx as r, createBlock as I, createTextVNode as E, withDirectives as A, onMounted as j } from "vue";
3
- import { ElIcon as P, ElLink as V, ElTimeline as q, ElTimelineItem as B, ElCard as z, ElTag as U, ElTabs as J, ElTabPane as k } from "element-plus";
4
- import { IconLook as H } from "color-message-lingyun-vue";
5
- import { C as K } from "./chunks/layout.DXw3haOP.js";
6
- import { _ as L } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
7
- import { pageParams as Q } from "ling-yun-methods";
8
- import './assets/AppIntro.css';const W = { class: "flex w-full mg-b-10" }, X = { class: "config-item__label text-right inline-block" }, Y = {
9
- class: "flex-1 flex justify-start items-flex-start flex-wrap flex-gap-row-wrap-8 fz-14",
10
- style: { color: "#303133" }
11
- }, Z = {
12
- __name: "ConfigItem",
13
- props: {
14
- title: {
15
- type: String,
16
- required: !0
17
- }
18
- },
19
- setup(l) {
20
- return (s, f) => (n(), i("div", W, [
21
- u("div", X, m(l.title), 1),
22
- u("div", Y, [
23
- R(s.$slots, "default", {}, void 0, !0)
24
- ])
25
- ]));
26
- }
27
- }, F = /* @__PURE__ */ L(Z, [["__scopeId", "data-v-0188f394"]]), a = {
1
+ import { w as G } from "./chunks/index.bCzIhWFw.js";
2
+ import { createElementBlock as s, createCommentVNode as m, unref as n, openBlock as o, createElementVNode as c, ref as g, resolveDirective as R, renderSlot as C, createVNode as p, Fragment as N, renderList as w, withCtx as d, createBlock as h, createTextVNode as L, toDisplayString as I, withDirectives as M, onMounted as A, computed as j } from "vue";
3
+ import { ElIcon as P, ElForm as q, ElFormItem as k, ElLink as x, ElTimeline as B, ElTimelineItem as z, ElCard as U, ElTag as J, ElSegmented as H } from "element-plus";
4
+ import { IconLook as K } from "color-message-lingyun-vue";
5
+ import { C as Q } from "./chunks/layout.DXw3haOP.js";
6
+ import { _ as V } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
7
+ import { pageParams as W } from "ling-yun-methods";
8
+ import './assets/AppIntro.css';const a = {
28
9
  LISTING: 1,
29
10
  // 上架申请
30
11
  DELISTING: 2,
@@ -40,22 +21,22 @@ import './assets/AppIntro.css';const W = { class: "flex w-full mg-b-10" }, X = {
40
21
  // 已通过
41
22
  REJECTED: 2
42
23
  // 已驳回
43
- }, S = {
24
+ }, O = {
44
25
  IMAGE: 1,
45
26
  // 图片
46
27
  VIDEO: 2
47
28
  // 视频
48
- }, b = {
29
+ }, _ = {
49
30
  INTRO: "intro",
50
31
  // 应用介绍
51
32
  TIMELINE: "timeline"
52
33
  // 迭代时间轴
53
- }, ee = {
34
+ }, X = {
54
35
  [a.LISTING]: "上架申请",
55
36
  [a.DELISTING]: "下架申请",
56
37
  [a.ONLINE]: "上线应用",
57
38
  [a.OFFLINE]: "下线应用"
58
- }, O = {
39
+ }, b = {
59
40
  [D.PENDING]: {
60
41
  type: "warning",
61
42
  text: "待审核"
@@ -68,7 +49,7 @@ import './assets/AppIntro.css';const W = { class: "flex w-full mg-b-10" }, X = {
68
49
  type: "danger",
69
50
  text: "已驳回"
70
51
  }
71
- }, te = [
52
+ }, Y = [
72
53
  { title: "申请人:", field: "appCreatorName" },
73
54
  { title: "应用省份:", field: "appCreatorOrg" },
74
55
  { title: "应用说明:", field: "appDesc" },
@@ -76,7 +57,7 @@ import './assets/AppIntro.css';const W = { class: "flex w-full mg-b-10" }, X = {
76
57
  { title: "业务背景:", field: "businessBackground" },
77
58
  { title: "业务目标:", field: "businessTarget" },
78
59
  { title: "成效数据:", field: "resultData" }
79
- ], ae = [
60
+ ], Z = [
80
61
  {
81
62
  title: "申请人",
82
63
  field: "creatorName",
@@ -123,20 +104,20 @@ import './assets/AppIntro.css';const W = { class: "flex w-full mg-b-10" }, X = {
123
104
  field: "offlineReason",
124
105
  showForTypes: [a.OFFLINE]
125
106
  }
126
- ], C = {
107
+ ], F = {
127
108
  [a.LISTING]: {
128
109
  text: "查看上架申请"
129
110
  },
130
111
  [a.DELISTING]: {
131
112
  text: "查看下架申请"
132
113
  }
133
- }, le = {
114
+ }, ee = {
134
115
  key: 0,
135
116
  class: "media-video relative w-full"
136
- }, oe = ["src"], ne = {
117
+ }, te = ["src"], ae = {
137
118
  key: 1,
138
119
  class: "media-image relative w-full"
139
- }, ie = ["src"], x = {
120
+ }, le = ["src"], S = {
140
121
  __name: "MediaViewer",
141
122
  props: {
142
123
  media: {
@@ -145,24 +126,24 @@ import './assets/AppIntro.css';const W = { class: "flex w-full mg-b-10" }, X = {
145
126
  }
146
127
  },
147
128
  setup(l) {
148
- return (s, f) => l.media?.type === o(S).VIDEO ? (n(), i("div", le, [
149
- u("video", {
129
+ return (u, f) => l.media?.type === n(O).VIDEO ? (o(), s("div", ee, [
130
+ c("video", {
150
131
  class: "w-full",
151
132
  src: l.media.url,
152
133
  controls: ""
153
- }, null, 8, oe)
154
- ])) : l.media?.type === o(S).IMAGE ? (n(), i("div", ne, [
155
- u("img", {
134
+ }, null, 8, te)
135
+ ])) : l.media?.type === n(O).IMAGE ? (o(), s("div", ae, [
136
+ c("img", {
156
137
  class: "w-full",
157
138
  src: l.media.url,
158
139
  alt: ""
159
- }, null, 8, ie)
160
- ])) : _("", !0);
140
+ }, null, 8, le)
141
+ ])) : m("", !0);
161
142
  }
162
- }, se = { class: "app-intro-content overflow-hidden h-full" }, re = {
143
+ }, oe = { class: "app-intro-content overflow-hidden h-full" }, ne = {
163
144
  key: 0,
164
145
  class: "media-section w-full pd-b-12"
165
- }, de = { class: "media-content relative w-full" }, ce = ["onClick"], ue = { class: "info-section" }, pe = { class: "preview-content" }, fe = {
146
+ }, se = { class: "media-content relative w-full" }, ie = ["onClick"], re = { class: "info-section" }, de = { class: "flex items-center" }, ue = { class: "fz-14 text-666 pd-r-12" }, ce = { class: "preview-content" }, pe = {
166
147
  __name: "AppIntroContent",
167
148
  props: {
168
149
  introData: {
@@ -171,96 +152,109 @@ import './assets/AppIntro.css';const W = { class: "flex w-full mg-b-10" }, X = {
171
152
  }
172
153
  },
173
154
  setup(l) {
174
- const s = w(!1), f = w(null), h = (p) => {
175
- f.value = p, s.value = !0;
176
- }, T = () => {
177
- s.value = !1, f.value = null;
178
- }, y = (p) => {
155
+ const u = g(!1), f = g(null), y = (i) => {
156
+ f.value = i, u.value = !0;
157
+ }, E = () => {
158
+ u.value = !1, f.value = null;
159
+ }, v = (i) => {
179
160
  try {
180
161
  const e = document.createElement("a");
181
- e.href = p.attachementUrl, e.download = p.attachementName, e.style.display = "none", e.target = "_blank", document.body.appendChild(e), e.click(), document.body.removeChild(e);
162
+ e.href = i.attachementUrl, e.download = i.attachementName, e.style.display = "none", e.target = "_blank", document.body.appendChild(e), e.click(), document.body.removeChild(e);
182
163
  } catch (e) {
183
164
  console.error(e);
184
165
  }
185
166
  };
186
- return (p, e) => {
187
- const g = M("loading");
188
- return n(), i("div", se, [
189
- l.introData?.pics?.length > 0 ? (n(), i("div", re, [
190
- u("div", de, [
191
- (n(!0), i(v, null, N(l.introData.pics, (t, d) => (n(), i("div", {
192
- key: d,
167
+ return (i, e) => {
168
+ const T = R("loading");
169
+ return o(), s("div", oe, [
170
+ l.introData?.pics?.length > 0 ? (o(), s("div", ne, [
171
+ c("div", se, [
172
+ (o(!0), s(N, null, w(l.introData.pics, (t, r) => (o(), s("div", {
173
+ key: r,
193
174
  class: "media-item w-full"
194
175
  }, [
195
- c(x, { media: t }, null, 8, ["media"]),
196
- u("div", {
176
+ p(S, { media: t }, null, 8, ["media"]),
177
+ c("div", {
197
178
  class: "hover-overlay absolute top-0 left-0 w-full h-full flex justify-center items-center",
198
- onClick: (G) => h(t)
179
+ onClick: ($) => y(t)
199
180
  }, [
200
- c(o(P), {
181
+ p(n(P), {
201
182
  size: 24,
202
183
  class: "view-icon"
203
184
  }, {
204
- default: r(() => [
205
- c(o(H))
185
+ default: d(() => [
186
+ p(n(K))
206
187
  ]),
207
188
  _: 1
208
189
  })
209
- ], 8, ce)
190
+ ], 8, ie)
210
191
  ]))), 128))
211
192
  ])
212
- ])) : _("", !0),
213
- u("div", ue, [
214
- (n(!0), i(v, null, N(o(te), (t) => (n(), I(F, {
215
- key: t.title,
216
- title: t.title
193
+ ])) : m("", !0),
194
+ C(i.$slots, "default", {}, void 0, !0),
195
+ c("div", re, [
196
+ p(n(q), {
197
+ model: l.introData,
198
+ "label-width": "auto"
217
199
  }, {
218
- default: r(() => [
219
- E(m(l.introData?.[t.field] ?? "--"), 1)
220
- ]),
221
- _: 2
222
- }, 1032, ["title"]))), 128)),
223
- c(F, { title: "附件:" }, {
224
- default: r(() => [
225
- (n(!0), i(v, null, N(l.introData?.attachements, (t, d) => (n(), i("div", {
226
- key: d,
227
- class: "file-item"
228
- }, [
229
- A((n(), i("div", null, [
230
- E(m(t.attachementName) + " ", 1),
231
- t.attachementUrl ? (n(), I(o(V), {
232
- key: 0,
233
- type: "primary",
234
- underline: !1,
235
- onClick: (G) => y(t)
236
- }, {
237
- default: r(() => [...e[1] || (e[1] = [
238
- E(" 点击查看 ", -1)
239
- ])]),
240
- _: 1
241
- }, 8, ["onClick"])) : _("", !0)
242
- ])), [
243
- [g, !t.attachementUrl]
244
- ])
245
- ]))), 128))
200
+ default: d(() => [
201
+ ["agent", "workflow"].includes(l.introData?.appCategory) ? (o(!0), s(N, { key: 0 }, w(n(Y), (t) => (o(), h(n(k), {
202
+ key: t.field,
203
+ label: t.title,
204
+ class: "mg-b-0"
205
+ }, {
206
+ default: d(() => [
207
+ L(I(l.introData?.[t.field] ?? "--"), 1)
208
+ ]),
209
+ _: 2
210
+ }, 1032, ["label"]))), 128)) : m("", !0),
211
+ l.introData?.attachements?.length ? (o(), h(n(k), {
212
+ key: 1,
213
+ label: "附件:"
214
+ }, {
215
+ default: d(() => [
216
+ (o(!0), s(N, null, w(l.introData.attachements, (t, r) => (o(), s("div", {
217
+ key: r,
218
+ class: "mg-b-8"
219
+ }, [
220
+ M((o(), s("div", de, [
221
+ c("span", ue, I(t.attachementName), 1),
222
+ t.attachementUrl ? (o(), h(n(x), {
223
+ key: 0,
224
+ type: "primary",
225
+ underline: !1,
226
+ onClick: ($) => v(t)
227
+ }, {
228
+ default: d(() => [...e[1] || (e[1] = [
229
+ L(" 点击查看 ", -1)
230
+ ])]),
231
+ _: 1
232
+ }, 8, ["onClick"])) : m("", !0)
233
+ ])), [
234
+ [T, !t.attachementUrl]
235
+ ])
236
+ ]))), 128))
237
+ ]),
238
+ _: 1
239
+ })) : m("", !0)
246
240
  ]),
247
241
  _: 1
248
- })
242
+ }, 8, ["model"])
249
243
  ]),
250
- c(K, {
251
- modelValue: s.value,
252
- "onUpdate:modelValue": e[0] || (e[0] = (t) => s.value = t),
244
+ p(Q, {
245
+ modelValue: u.value,
246
+ "onUpdate:modelValue": e[0] || (e[0] = (t) => u.value = t),
253
247
  width: "60%",
254
248
  "show-close": !0,
255
- onClose: T,
249
+ onClose: E,
256
250
  buttons: {
257
251
  showCancel: !1,
258
252
  showConfirm: !1
259
253
  }
260
254
  }, {
261
- default: r(() => [
262
- u("div", pe, [
263
- c(x, {
255
+ default: d(() => [
256
+ c("div", ce, [
257
+ p(S, {
264
258
  media: f.value,
265
259
  class: "preview-media"
266
260
  }, null, 8, ["media"])
@@ -271,13 +265,13 @@ import './assets/AppIntro.css';const W = { class: "flex w-full mg-b-10" }, X = {
271
265
  ]);
272
266
  };
273
267
  }
274
- }, me = /* @__PURE__ */ L(fe, [["__scopeId", "data-v-ba3ada8e"]]), ye = { class: "flex items-center flex-gap-row-nowrap-8 mg-b-12" }, Ie = {
268
+ }, me = /* @__PURE__ */ V(pe, [["__scopeId", "data-v-f13b81ec"]]), fe = { class: "flex items-center flex-gap-row-nowrap-8 mg-b-12" }, ye = {
275
269
  class: "fz-14 weight-500",
276
270
  style: { color: "#1d2129" }
277
- }, he = {
271
+ }, Ie = {
278
272
  class: "fz-14",
279
273
  style: { color: "#4e5969" }
280
- }, _e = {
274
+ }, he = {
281
275
  __name: "AppTimeline",
282
276
  props: {
283
277
  appId: {
@@ -299,8 +293,8 @@ import './assets/AppIntro.css';const W = { class: "flex w-full mg-b-10" }, X = {
299
293
  }
300
294
  },
301
295
  setup(l) {
302
- const s = l, f = async (e) => {
303
- s.vueRouter.push({
296
+ const u = l, f = async (e) => {
297
+ u.vueRouter.push({
304
298
  path: "/promptTestDetail",
305
299
  query: {
306
300
  id: e.id,
@@ -310,66 +304,66 @@ import './assets/AppIntro.css';const W = { class: "flex w-full mg-b-10" }, X = {
310
304
  sourceHistory: "1"
311
305
  }
312
306
  });
313
- }, h = (e) => [a.LISTING, a.DELISTING].includes(e), T = (e) => ae.filter((g) => g.showForTypes.includes(e)), y = w([]), p = async () => {
314
- await s.appOperationList({
315
- appId: s.appId,
307
+ }, y = (e) => [a.LISTING, a.DELISTING].includes(e), E = (e) => Z.filter((T) => T.showForTypes.includes(e)), v = g([]), i = async () => {
308
+ await u.appOperationList({
309
+ appId: u.appId,
316
310
  operationType: [
317
311
  a.LISTING,
318
312
  a.DELISTING,
319
313
  a.ONLINE,
320
314
  a.OFFLINE
321
315
  ].join(","),
322
- pageNum: Q.pageNum,
316
+ pageNum: W.pageNum,
323
317
  pageSize: 1e6
324
318
  }).then(({ data: e }) => {
325
- y.value = e.list;
319
+ v.value = e.list;
326
320
  });
327
321
  };
328
- return j(() => {
329
- p();
330
- }), (e, g) => (n(), I(o(q), { class: "overflow-y-auto h-full pd-l-4" }, {
331
- default: r(() => [
332
- (n(!0), i(v, null, N(y.value, (t) => (n(), I(o(B), {
322
+ return A(() => {
323
+ i();
324
+ }), (e, T) => (o(), h(n(B), { class: "overflow-y-auto h-full pd-l-4" }, {
325
+ default: d(() => [
326
+ (o(!0), s(N, null, w(v.value, (t) => (o(), h(n(z), {
333
327
  key: t.id,
334
328
  timestamp: t.createTime,
335
329
  placement: "top",
336
330
  color: "var(--primary-color-1)"
337
331
  }, {
338
- default: r(() => [
339
- c(o(z), { shadow: "hover" }, {
340
- default: r(() => [
341
- u("div", ye, [
342
- u("span", Ie, m(o(ee)[t.operationType] || "--"), 1),
343
- h(t.operationType) ? (n(), i(v, { key: 0 }, [
344
- o(O)[t.auditStatus] ? (n(), I(o(U), {
332
+ default: d(() => [
333
+ p(n(U), { shadow: "hover" }, {
334
+ default: d(() => [
335
+ c("div", fe, [
336
+ c("span", ye, I(n(X)[t.operationType] || "--"), 1),
337
+ y(t.operationType) ? (o(), s(N, { key: 0 }, [
338
+ n(b)[t.auditStatus] ? (o(), h(n(J), {
345
339
  key: 0,
346
- type: o(O)[t.auditStatus].type
340
+ type: n(b)[t.auditStatus].type
347
341
  }, {
348
- default: r(() => [
349
- E(m(o(O)[t.auditStatus].text), 1)
342
+ default: d(() => [
343
+ L(I(n(b)[t.auditStatus].text), 1)
350
344
  ]),
351
345
  _: 2
352
- }, 1032, ["type"])) : _("", !0)
353
- ], 64)) : _("", !0)
346
+ }, 1032, ["type"])) : m("", !0)
347
+ ], 64)) : m("", !0)
354
348
  ]),
355
- u("div", he, [
356
- (n(!0), i(v, null, N(T(t.operationType), (d) => (n(), i("div", {
357
- key: d.field + d.title,
349
+ c("div", Ie, [
350
+ (o(!0), s(N, null, w(E(t.operationType), (r) => (o(), s("div", {
351
+ key: r.field + r.title,
358
352
  class: "mg-t-8 mg-b-8",
359
353
  style: { "line-height": "1.5" }
360
- }, m(d.title) + ":" + m(d.formatter ? d.formatter(t[d.field]) : t[d.field] ?? "--"), 1))), 128)),
361
- o(C)[t.operationType] && !l.square ? (n(), I(o(V), {
354
+ }, I(r.title) + ":" + I(r.formatter ? r.formatter(t[r.field]) : t[r.field] ?? "--"), 1))), 128)),
355
+ n(F)[t.operationType] && !l.square ? (o(), h(n(x), {
362
356
  key: 0,
363
357
  type: "primary",
364
358
  underline: !1,
365
359
  class: "mg-t-8",
366
- onClick: (d) => f(t)
360
+ onClick: (r) => f(t)
367
361
  }, {
368
- default: r(() => [
369
- E(m(o(C)[t.operationType].text), 1)
362
+ default: d(() => [
363
+ L(I(n(F)[t.operationType].text), 1)
370
364
  ]),
371
365
  _: 2
372
- }, 1032, ["onClick"])) : _("", !0)
366
+ }, 1032, ["onClick"])) : m("", !0)
373
367
  ])
374
368
  ]),
375
369
  _: 2
@@ -381,7 +375,13 @@ import './assets/AppIntro.css';const W = { class: "flex w-full mg-b-10" }, X = {
381
375
  _: 1
382
376
  }));
383
377
  }
384
- }, ve = /* @__PURE__ */ L(_e, [["__scopeId", "data-v-3a2170d7"]]), Te = /* @__PURE__ */ Object.assign({
378
+ }, ve = /* @__PURE__ */ V(he, [["__scopeId", "data-v-3a2170d7"]]), Te = { class: "h-full overflow-hidden flex flex-col pd-t-12" }, Ne = { class: "pd-b-12" }, Ee = {
379
+ key: 0,
380
+ class: "flex-1 overflow-hidden"
381
+ }, _e = {
382
+ key: 1,
383
+ class: "flex-1 overflow-hidden"
384
+ }, we = /* @__PURE__ */ Object.assign({
385
385
  name: "AppIntro"
386
386
  }, {
387
387
  __name: "layout",
@@ -410,46 +410,41 @@ import './assets/AppIntro.css';const W = { class: "flex w-full mg-b-10" }, X = {
410
410
  }
411
411
  },
412
412
  emits: ["tab-change"],
413
- setup(l, { emit: s }) {
414
- const f = s, h = w(b.INTRO), T = (y) => {
415
- f("tab-change", y);
413
+ setup(l, { emit: u }) {
414
+ const f = u, y = g(_.INTRO), E = j(() => [
415
+ { label: "应用介绍", value: _.INTRO },
416
+ { label: "迭代时间轴", value: _.TIMELINE }
417
+ ]), v = (i) => {
418
+ f("tab-change", i);
416
419
  };
417
- return (y, p) => (n(), I(o(J), {
418
- class: "overflow-hidden h-full",
419
- modelValue: h.value,
420
- "onUpdate:modelValue": p[0] || (p[0] = (e) => h.value = e),
421
- onTabChange: T
422
- }, {
423
- default: r(() => [
424
- c(o(k), {
425
- label: "应用介绍",
426
- name: o(b).INTRO
427
- }, {
428
- default: r(() => [
429
- c(me, { "intro-data": l.introData }, null, 8, ["intro-data"])
430
- ]),
431
- _: 1
432
- }, 8, ["name"]),
433
- c(o(k), {
434
- label: "迭代时间轴",
435
- name: o(b).TIMELINE
436
- }, {
437
- default: r(() => [
438
- c(ve, {
439
- "app-operation-list": l.appOperationList,
440
- square: l.square,
441
- "vue-router": l.vueRouter,
442
- "app-id": l.appId
443
- }, null, 8, ["app-operation-list", "square", "vue-router", "app-id"])
444
- ]),
445
- _: 1
446
- }, 8, ["name"])
420
+ return (i, e) => (o(), s("div", Te, [
421
+ c("div", Ne, [
422
+ p(n(H), {
423
+ modelValue: y.value,
424
+ "onUpdate:modelValue": e[0] || (e[0] = (T) => y.value = T),
425
+ options: E.value,
426
+ onChange: v
427
+ }, null, 8, ["modelValue", "options"])
447
428
  ]),
448
- _: 1
449
- }, 8, ["modelValue"]));
429
+ y.value === n(_).INTRO ? (o(), s("div", Ee, [
430
+ p(me, { "intro-data": l.introData }, {
431
+ default: d(() => [
432
+ C(i.$slots, "plugin-detail")
433
+ ]),
434
+ _: 3
435
+ }, 8, ["intro-data"])
436
+ ])) : y.value === n(_).TIMELINE ? (o(), s("div", _e, [
437
+ p(ve, {
438
+ "app-operation-list": l.appOperationList,
439
+ square: l.square,
440
+ "vue-router": l.vueRouter,
441
+ "app-id": l.appId
442
+ }, null, 8, ["app-operation-list", "square", "vue-router", "app-id"])
443
+ ])) : m("", !0)
444
+ ]));
450
445
  }
451
- }), Ne = /* @__PURE__ */ L(Te, [["__scopeId", "data-v-e0a3d317"]]), ke = $(Ne);
446
+ }), Se = G(we);
452
447
  export {
453
- ke as AppIntro,
454
- ke as default
448
+ Se as AppIntro,
449
+ Se as default
455
450
  };
package/es/CustomTab.mjs CHANGED
@@ -1,33 +1,59 @@
1
- import { w as m } from "./chunks/index.bCzIhWFw.js";
2
- import { useModel as p, useAttrs as c, useSlots as i, createBlock as f, openBlock as _, unref as e, mergeProps as V, createSlots as v, renderList as y, withCtx as S, renderSlot as g, normalizeProps as w, guardReactiveProps as x } from "vue";
3
- import { ElTabs as P } from "element-plus";
4
- import { _ as b } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
5
- import './assets/CustomTab.css';const k = {
1
+ import { w as _ } from "./chunks/index.bCzIhWFw.js";
2
+ import { mergeModels as g, useModel as v, computed as k, useAttrs as C, useSlots as V, createBlock as m, openBlock as a, unref as t, mergeProps as P, createSlots as S, withCtx as d, createElementBlock as w, Fragment as x, renderList as c, renderSlot as B, normalizeProps as E, guardReactiveProps as M } from "vue";
3
+ import { ElTabs as T, ElTabPane as A } from "element-plus";
4
+ import { _ as I } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
5
+ import './assets/CustomTab.css';const h = {
6
6
  __name: "layout",
7
- props: {
7
+ props: /* @__PURE__ */ g({
8
+ // 标签页列表
9
+ list: {
10
+ type: Array,
11
+ default: () => []
12
+ },
13
+ // 列表中的键名映射
14
+ keyConfig: {
15
+ type: Object,
16
+ default: () => ({
17
+ label: "label",
18
+ name: "name"
19
+ })
20
+ }
21
+ }, {
8
22
  modelValue: {
9
23
  type: String,
10
24
  default: ""
11
25
  },
12
26
  modelModifiers: {}
13
- },
27
+ }),
14
28
  emits: ["update:modelValue"],
15
- setup(a) {
16
- const t = p(a, "modelValue"), l = c(), u = i();
17
- return (n, o) => (_(), f(e(P), V({
18
- modelValue: t.value,
19
- "onUpdate:modelValue": o[0] || (o[0] = (r) => t.value = r)
20
- }, e(l), { type: "card" }), v({ _: 2 }, [
21
- y(e(u), (r, s) => ({
22
- name: s,
23
- fn: S((d) => [
24
- g(n.$slots, s, w(x(d)), void 0, !0)
29
+ setup(o) {
30
+ const r = o, i = {
31
+ label: "label",
32
+ name: "name"
33
+ }, n = v(o, "modelValue"), l = k(() => ({ ...i, ...r.keyConfig })), p = C(), f = V();
34
+ return (y, s) => (a(), m(t(T), P({
35
+ modelValue: n.value,
36
+ "onUpdate:modelValue": s[0] || (s[0] = (e) => n.value = e)
37
+ }, t(p), { type: "card" }), S({
38
+ default: d(() => [
39
+ (a(!0), w(x, null, c(r.list, (e) => (a(), m(t(A), {
40
+ key: e[l.value.name],
41
+ label: e[l.value.label],
42
+ name: e[l.value.name]
43
+ }, null, 8, ["label", "name"]))), 128))
44
+ ]),
45
+ _: 2
46
+ }, [
47
+ c(t(f), (e, u) => ({
48
+ name: u,
49
+ fn: d((b) => [
50
+ B(y.$slots, u, E(M(b)), void 0, !0)
25
51
  ])
26
52
  }))
27
53
  ]), 1040, ["modelValue"]));
28
54
  }
29
- }, B = /* @__PURE__ */ b(k, [["__scopeId", "data-v-4cd45c17"]]), h = m(B);
55
+ }, j = /* @__PURE__ */ I(h, [["__scopeId", "data-v-cd15b5ea"]]), N = _(j);
30
56
  export {
31
- h as CustomTab,
32
- h as default
57
+ N as CustomTab,
58
+ N as default
33
59
  };
@@ -12,7 +12,7 @@ const a = {
12
12
  const { icons: o } = await import("./chunks/global.C1Iy_saH.js");
13
13
  return o[n] || null;
14
14
  case a.aibox:
15
- const { icons: t } = await import("./chunks/global.Dasz_fnL.js");
15
+ const { icons: t } = await import("./chunks/global.2EmeYAhV.js");
16
16
  return t[n] || null;
17
17
  }
18
18
  } catch (o) {