ling-yun-custom-components 0.0.76 → 0.0.78

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,10 +1,10 @@
1
- import { w as x } from "./chunks/index.bCzIhWFw.js";
2
- import { computed as B, createBlock as c, openBlock as t, unref as p, withCtx as M, createElementBlock as n, Fragment as f, renderList as _, normalizeClass as $, toDisplayString as h, createTextVNode as D, ref as b, watch as I, onMounted as H, createCommentVNode as d, createVNode as P, createElementVNode as S, renderSlot as v, nextTick as z } from "vue";
3
- import { ElTable as R, ElTableColumn as j, ElSegmented as F, ElButton as J } from "element-plus";
4
- import { CustomTitle as V } from "color-star-custom-components";
5
- import { emitsMap as A } from "color-star-custom-methods";
1
+ import { w as N } from "./chunks/index.bCzIhWFw.js";
2
+ import { computed as q, openBlock as t, createBlock as c, unref as m, withCtx as B, createElementBlock as n, Fragment as h, renderList as H, normalizeClass as A, toDisplayString as b, createTextVNode as M, ref as y, watch as w, onMounted as z, createVNode as I, createElementVNode as O, renderSlot as P, createCommentVNode as d, nextTick as R } from "vue";
3
+ import { ElTable as F, ElTableColumn as _, ElSegmented as j, ElButton as J } from "element-plus";
4
+ import { CustomTitle as S } from "color-star-custom-components";
5
+ import { emitsMap as V } from "color-star-custom-methods";
6
6
  import { _ as L } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
7
- import './assets/PluginDetail.css';const k = {
7
+ import './assets/PluginDetail.css';const g = {
8
8
  name: "name",
9
9
  type: "type",
10
10
  required: "required",
@@ -12,24 +12,24 @@ import './assets/PluginDetail.css';const k = {
12
12
  }, U = [
13
13
  {
14
14
  label: "参数名",
15
- prop: k.name
15
+ prop: g.name
16
16
  },
17
17
  {
18
18
  label: "参数类型",
19
- prop: k.type
19
+ prop: g.type
20
20
  },
21
21
  {
22
22
  label: "必填",
23
- prop: k.required
23
+ prop: g.required
24
24
  },
25
25
  {
26
26
  label: "描述",
27
- prop: k.description
27
+ prop: g.description
28
28
  }
29
29
  ], W = {
30
30
  key: 1,
31
31
  class: "type-tag"
32
- }, O = {
32
+ }, x = {
33
33
  __name: "ParamsTable",
34
34
  props: {
35
35
  data: {
@@ -46,7 +46,7 @@ import './assets/PluginDetail.css';const k = {
46
46
  }
47
47
  },
48
48
  setup(a) {
49
- const s = a, T = B(() => {
49
+ const s = a, D = q(() => {
50
50
  let r = s.data;
51
51
  if (typeof r == "string")
52
52
  try {
@@ -55,27 +55,27 @@ import './assets/PluginDetail.css';const k = {
55
55
  return console.error("解析参数数据失败:", u), [];
56
56
  }
57
57
  return !r || !Array.isArray(r) ? [] : r;
58
- }), o = B(() => !s.hideColumns || s.hideColumns.length === 0 ? s.columns : s.columns.filter((r) => !s.hideColumns.includes(r.prop)));
59
- return (r, u) => (t(), c(p(R), {
60
- data: T.value,
58
+ }), o = q(() => !s.hideColumns || s.hideColumns.length === 0 ? s.columns : s.columns.filter((r) => !s.hideColumns.includes(r.prop)));
59
+ return (r, u) => (t(), c(m(F), {
60
+ data: D.value,
61
61
  "row-key": "uiid",
62
62
  "tree-props": { children: "children", hasChildren: "hasChildren" },
63
63
  stripe: ""
64
64
  }, {
65
- default: M(() => [
66
- (t(!0), n(f, null, _(o.value, (l) => (t(), c(p(j), {
65
+ default: B(() => [
66
+ (t(!0), n(h, null, H(o.value, (l) => (t(), c(m(_), {
67
67
  key: l.prop,
68
68
  prop: l.prop,
69
69
  label: l.label,
70
70
  width: l.width,
71
71
  "min-width": l.minWidth
72
72
  }, {
73
- default: M(({ row: i }) => [
73
+ default: B(({ row: i }) => [
74
74
  l.prop === "required" ? (t(), n("span", {
75
75
  key: 0,
76
- class: $(i.required ? "required-yes" : "required-no")
77
- }, h(i.required ? "是" : "否"), 3)) : l.prop === "type" ? (t(), n("span", W, h(i.type), 1)) : (t(), n(f, { key: 2 }, [
78
- D(h(i[l.prop] || "-"), 1)
76
+ class: A(i.required ? "required-yes" : "required-no")
77
+ }, b(i.required ? "是" : "否"), 3)) : l.prop === "type" ? (t(), n("span", W, b(i.type), 1)) : (t(), n(h, { key: 2 }, [
78
+ M(b(i[l.prop] || "-"), 1)
79
79
  ], 64))
80
80
  ]),
81
81
  _: 2
@@ -84,10 +84,7 @@ import './assets/PluginDetail.css';const k = {
84
84
  _: 1
85
85
  }, 8, ["data"]));
86
86
  }
87
- }, G = { key: 0 }, K = { key: 1 }, Q = {
88
- key: 3,
89
- class: "radius-12 border-f0f0f0 pd-l-20 pd-r-20 pd-b-24 pd-t-20 mg-b-34"
90
- }, X = { class: "weight-400 fz-16 text-666666 lh-24" }, Y = { class: "flex justify-end items-center gap-10 text-right" }, Z = /* @__PURE__ */ Object.assign({
87
+ }, G = { key: 0 }, K = { key: 1 }, Q = /* @__PURE__ */ Object.assign({
91
88
  name: "PluginDetail"
92
89
  }, {
93
90
  __name: "layout",
@@ -132,7 +129,7 @@ import './assets/PluginDetail.css';const k = {
132
129
  // 输出参数隐藏的列
133
130
  outputParamsHideColumns: {
134
131
  type: Array,
135
- default: () => [k.required]
132
+ default: () => [g.required]
136
133
  },
137
134
  // 是否 显示 插件简介
138
135
  showIntro: {
@@ -140,136 +137,132 @@ import './assets/PluginDetail.css';const k = {
140
137
  default: !0
141
138
  }
142
139
  },
143
- emits: [A.updateModelValue, A.tabChange],
144
- setup(a, { expose: s, emit: T }) {
145
- const o = a, r = T, u = b(!1), l = b(!1), i = b(null), m = b(o.modelValue), y = B(() => !o.tabItems?.length || !m.value ? null : o.tabItems.find((e) => e.bnid == m.value) || null), N = () => {
140
+ emits: [V.updateModelValue, V.tabChange],
141
+ setup(a, { expose: s, emit: D }) {
142
+ const o = a, r = D, u = y(!1), l = y(!1), i = y(null), p = y(o.modelValue), v = q(() => !o.tabItems?.length || !p.value ? null : o.tabItems.find((e) => e.bnid == p.value) || null), $ = () => {
146
143
  u.value = !u.value;
147
144
  }, E = (e) => {
148
- r(A.updateModelValue, e), r(A.tabChange, e);
149
- }, q = () => {
150
- z(() => {
145
+ r(V.updateModelValue, e), r(V.tabChange, e);
146
+ }, T = () => {
147
+ R(() => {
151
148
  const e = i.value;
152
149
  e && (l.value = e.scrollHeight > 24);
153
150
  });
154
- }, g = b(null);
155
- return I(
156
- () => y.value?.bnid,
151
+ }, f = y(null);
152
+ return w(
153
+ () => v.value?.bnid,
157
154
  (e) => {
158
- e && o.pluginDetailApi(e).then((C) => {
159
- g.value = C?.data?.[0];
155
+ e && o.pluginDetailApi(e).then((k) => {
156
+ f.value = k?.data?.[0];
160
157
  });
161
158
  },
162
159
  { immediate: !0 }
163
- ), I(
160
+ ), w(
164
161
  () => o.modelValue,
165
162
  (e) => {
166
- m.value = e;
163
+ p.value = e;
167
164
  }
168
- ), I(
165
+ ), w(
169
166
  () => o.tabItems,
170
167
  (e) => {
171
- m.value = e?.[0]?.bnid;
168
+ p.value = e?.[0]?.bnid;
172
169
  },
173
170
  { immediate: !0 }
174
- ), I(
175
- () => y.value?.description,
171
+ ), w(
172
+ () => v.value?.description,
176
173
  () => {
177
- q();
174
+ T();
178
175
  },
179
176
  { immediate: !0 }
180
- ), H(() => {
181
- q();
177
+ ), z(() => {
178
+ T();
182
179
  }), s({
183
- checkShowMoreBtn: q,
184
- currentTabItem: y
185
- }), (e, C) => (t(), n(f, null, [
186
- a.showIntro ? (t(), n(f, { key: 0 }, [
187
- P(p(V), {
180
+ checkShowMoreBtn: T,
181
+ currentTabItem: v
182
+ }), (e, k) => (t(), n(h, null, [
183
+ a.showIntro ? (t(), n(h, { key: 0 }, [
184
+ I(m(S), {
188
185
  content: "插件简介",
189
186
  class: "mg-b-16"
190
187
  }),
191
- S("div", {
192
- class: $(["weight-400 fz-16 text-666", u.value ? "" : "hide-more"]),
188
+ O("div", {
189
+ class: A(["weight-400 fz-16 text-666", u.value ? "" : "hide-more"]),
193
190
  ref_key: "descRef",
194
191
  ref: i
195
192
  }, [
196
- v(e.$slots, "intro", {}, () => [
197
- D(h(a.intro), 1)
193
+ P(e.$slots, "intro", {}, () => [
194
+ M(b(a.intro), 1)
198
195
  ], !0)
199
196
  ], 2)
200
197
  ], 64)) : d("", !0),
201
- a.tabItems?.length ? (t(), c(p(F), {
198
+ a.tabItems?.length ? (t(), c(m(j), {
202
199
  key: 1,
203
- modelValue: m.value,
204
- "onUpdate:modelValue": C[0] || (C[0] = (w) => m.value = w),
205
- options: a.tabItems.map((w) => ({
206
- label: w.interfaceName,
207
- value: w.bnid
200
+ modelValue: p.value,
201
+ "onUpdate:modelValue": k[0] || (k[0] = (C) => p.value = C),
202
+ options: a.tabItems.map((C) => ({
203
+ label: C.interfaceName,
204
+ value: C.bnid
208
205
  })),
209
206
  onChange: E,
210
207
  class: "mg-b-16"
211
208
  }, null, 8, ["modelValue", "options"])) : d("", !0),
212
- P(p(V), {
209
+ I(m(S), {
213
210
  content: "工具描述",
214
211
  class: "mg-b-16"
215
212
  }),
216
- S("div", {
217
- class: $(["weight-400 fz-16 text-666", u.value ? "" : "hide-more"]),
213
+ O("div", {
214
+ class: A(["weight-400 fz-16 text-666", u.value ? "" : "hide-more"]),
218
215
  ref_key: "descRef",
219
216
  ref: i
220
217
  }, [
221
- v(e.$slots, "description", {}, () => [
222
- D(h(y.value?.description), 1)
218
+ P(e.$slots, "description", {}, () => [
219
+ M(b(v.value?.description), 1)
223
220
  ], !0)
224
221
  ], 2),
225
- l.value ? (t(), c(p(J), {
222
+ l.value ? (t(), c(m(J), {
226
223
  key: 2,
227
224
  type: "text",
228
- onClick: N
225
+ onClick: $
229
226
  }, {
230
- default: M(() => [
227
+ default: B(() => [
231
228
  u.value ? (t(), n("span", K, "收起")) : (t(), n("span", G, "查看更多"))
232
229
  ]),
233
230
  _: 1
234
231
  })) : d("", !0),
235
- e.$slots.default || e.$slots.actions ? (t(), n("div", Q, [
236
- S("div", X, [
237
- v(e.$slots, "default", {}, () => [
238
- D(h(y.value?.description), 1)
239
- ], !0)
240
- ]),
241
- S("div", Y, [
242
- v(e.$slots, "actions", {}, void 0, !0)
243
- ])
244
- ])) : d("", !0),
245
- a.showInputParams && a.tabItems?.length ? (t(), n(f, { key: 4 }, [
246
- P(p(V), {
232
+ e.$slots.actions ? (t(), n("div", {
233
+ key: 3,
234
+ class: A(["flex items-center gap-10 text-right", { "actions-wrap--no-toggle": !l.value }])
235
+ }, [
236
+ P(e.$slots, "actions", {}, void 0, !0)
237
+ ], 2)) : d("", !0),
238
+ a.showInputParams && a.tabItems?.length ? (t(), n(h, { key: 4 }, [
239
+ I(m(S), {
247
240
  content: "输入参数",
248
241
  class: "mg-b-16 mg-t-34"
249
242
  }),
250
- g.value?.paramsOuter ? (t(), c(O, {
243
+ f.value?.paramsOuter ? (t(), c(x, {
251
244
  key: 0,
252
- data: g.value.paramsOuter,
245
+ data: f.value.paramsOuter,
253
246
  "hide-columns": a.inputParamsHideColumns
254
247
  }, null, 8, ["data", "hide-columns"])) : d("", !0)
255
248
  ], 64)) : d("", !0),
256
- a.showOutputParams && a.tabItems?.length ? (t(), n(f, { key: 5 }, [
257
- P(p(V), {
249
+ a.showOutputParams && a.tabItems?.length ? (t(), n(h, { key: 5 }, [
250
+ I(m(S), {
258
251
  content: "输出参数",
259
252
  class: "mg-b-16 mg-t-34"
260
253
  }),
261
- g.value?.responseOuter ? (t(), c(O, {
254
+ f.value?.responseOuter ? (t(), c(x, {
262
255
  key: 0,
263
- data: g.value.responseOuter,
256
+ data: f.value.responseOuter,
264
257
  "hide-columns": a.outputParamsHideColumns
265
258
  }, null, 8, ["data", "hide-columns"])) : d("", !0)
266
259
  ], 64)) : d("", !0),
267
- v(e.$slots, "plugin-detail", {}, void 0, !0)
260
+ P(e.$slots, "plugin-detail", {}, void 0, !0)
268
261
  ], 64));
269
262
  }
270
- }), ee = /* @__PURE__ */ L(Z, [["__scopeId", "data-v-70e5945d"]]), oe = x(ee), ue = x(O);
263
+ }), X = /* @__PURE__ */ L(Q, [["__scopeId", "data-v-a48c6966"]]), le = N(X), ne = N(x);
271
264
  export {
272
- oe as PluginDetail,
273
- ue as PluginDetailParamsTable,
274
- oe as default
265
+ le as PluginDetail,
266
+ ne as PluginDetailParamsTable,
267
+ le as default
275
268
  };
@@ -1,6 +1,6 @@
1
1
  import { w as h } from "./chunks/index.bCzIhWFw.js";
2
- import { ref as P, computed as v, createBlock as x, openBlock as C, withCtx as b, createVNode as I, unref as c, isRef as D } from "vue";
3
- import { C as E } from "./chunks/layout.BlsXj4-t.js";
2
+ import { ref as P, computed as v, openBlock as x, createBlock as C, withCtx as b, createVNode as I, unref as c, isRef as D } from "vue";
3
+ import { C as E } from "./chunks/layout.Cr_l_XR4.js";
4
4
  import { SearchBar as k } from "color-star-custom-components";
5
5
  import { componentType as w, emitsMap as u, codeMap as y, messageSuccess as A } from "color-star-custom-methods";
6
6
  import { AESCrypto as M } from "ling-yun-methods";
@@ -85,7 +85,7 @@ import './assets/UpdatePasswordDialog.css';const B = () => {
85
85
  (await a.apiConfig.updatePasswordApi(m)).code === y.success && (A("修改成功"), n.value = !1, o = !0, l(u.change));
86
86
  }), o;
87
87
  };
88
- return (o, s) => (C(), x(E, {
88
+ return (o, s) => (x(), C(E, {
89
89
  modelValue: n.value,
90
90
  "onUpdate:modelValue": s[1] || (s[1] = (r) => n.value = r),
91
91
  title: "修改密码",
@@ -1 +1 @@
1
- [data-v-8b1b65e5] .el-table-v2__header-cell-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
1
+ [data-v-7c948317] .el-table-v2__header-cell-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@@ -1 +1 @@
1
- .hide-more[data-v-70e5945d]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.border-f0f0f0[data-v-70e5945d]{border:1px solid var(--neutral-color-6)}
1
+ .hide-more[data-v-a48c6966]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.border-f0f0f0[data-v-a48c6966]{border:1px solid var(--neutral-color-6)}.actions-wrap--no-toggle[data-v-a48c6966]{margin-top:10px}
@@ -1,4 +1,4 @@
1
- import { computed as p, createBlock as z, openBlock as f, unref as y, mergeProps as C } from "vue";
1
+ import { computed as p, openBlock as z, createBlock as f, unref as y, mergeProps as C } from "vue";
2
2
  import { ElPagination as P } from "element-plus";
3
3
  import { IconRight as S, IconLeft as h } from "color-message-lingyun-vue";
4
4
  import { emitsMap as t, paginationConfig as l, pageParams as c } from "color-star-custom-methods";
@@ -75,7 +75,7 @@ const x = /* @__PURE__ */ Object.assign({
75
75
  }, m = (e) => {
76
76
  n(t.currentChange, e), n(t.updateCurrentPage, e);
77
77
  };
78
- return (e, o) => (f(), z(y(P), C({
78
+ return (e, o) => (z(), f(y(P), C({
79
79
  "current-page": u.value,
80
80
  "onUpdate:currentPage": o[0] || (o[0] = (g) => u.value = g),
81
81
  "page-size": i.value,
@@ -1,4 +1,4 @@
1
- import { useAttrs as $, computed as d, onMounted as L, createBlock as p, openBlock as c, unref as a, mergeProps as U, withCtx as r, createElementBlock as y, renderSlot as g, createElementVNode as v, createCommentVNode as A, createTextVNode as h, toDisplayString as C, Fragment as R, createVNode as E } from "vue";
1
+ import { useAttrs as $, computed as d, onMounted as L, openBlock as c, createBlock as p, unref as a, mergeProps as U, withCtx as r, createElementBlock as y, createElementVNode as g, renderSlot as v, createTextVNode as h, toDisplayString as C, createCommentVNode as A, Fragment as R, createVNode as E } from "vue";
2
2
  import { ElDialog as q, ElButton as x, ElIcon as z } from "element-plus";
3
3
  import { IconClose as H, IconBack as J } from "color-message-lingyun-vue";
4
4
  import { emitsMap as e } from "color-star-custom-methods";
@@ -171,14 +171,14 @@ import '../assets/layout.css';const t = {
171
171
  _: 1
172
172
  }),
173
173
  h(" " + C(u.titleName), 1)
174
- ])) : g(s.$slots, "header", { key: 1 }, void 0, !0)
174
+ ])) : v(s.$slots, "header", { key: 1 }, void 0, !0)
175
175
  ]),
176
176
  footer: r(() => [
177
- g(s.$slots, "footer", {}, () => [
178
- v("div", Y, [
177
+ v(s.$slots, "footer", {}, () => [
178
+ g("div", Y, [
179
179
  u.dialogMode === a(t).PAGE ? (c(), y("div", Z, [
180
- v("div", ee, [
181
- v("div", oe, [
180
+ g("div", ee, [
181
+ g("div", oe, [
182
182
  l.value.showConfirm ? (c(), p(a(x), {
183
183
  key: 0,
184
184
  type: "primary",
@@ -217,10 +217,10 @@ import '../assets/layout.css';const t = {
217
217
  ]),
218
218
  default: r(() => [
219
219
  u.dialogMode === a(t).PAGE ? (c(), y("div", Q, [
220
- v("div", W, [
221
- g(s.$slots, "default", {}, void 0, !0)
220
+ g("div", W, [
221
+ v(s.$slots, "default", {}, void 0, !0)
222
222
  ])
223
- ])) : g(s.$slots, "default", { key: 1 }, void 0, !0)
223
+ ])) : v(s.$slots, "default", { key: 1 }, void 0, !0)
224
224
  ]),
225
225
  _: 3
226
226
  }, 16, ["modelValue", "width", "top", "style", "modal", "modal-penetrable", "append-to-body", "class"]));
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/PaginationTable.css');const pe=require("./chunks/index.CkihWzK6.js"),l=require("vue"),B=require("element-plus"),V=require("color-star-custom-methods"),ge=require("./chunks/layout.DbtiD7D3.js"),me=require("lodash"),Se=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js"),ye={class:"flex h-full flex-col"},be={class:"w-full flex justify-between overflow-hidden",style:{height:"auto"}},Ce={key:0,class:"flex-1 overflow-hidden"},xe={class:"flex",style:{width:"auto",gap:"10px"}},Be={key:1,class:"flex items-center mg-b-18"},Ee={class:"fz-12 text-74798c"},ke={class:"btn-group mg-l-12"},we={class:"w-full flex-1 overflow-hidden flex flex-col"},Ne={class:"flex-1 overflow-hidden TABLE-AREA"},Te={key:0,class:"flex justify-end mg-t-20",style:{height:"auto"}},Re=Object.assign({name:"PaginationTable"},{__name:"layout",props:{isPagination:{type:Boolean,default:!0},disableBatchSelect:{type:Boolean,default:!1},disableBatchSelectText:{type:String,default:""},total:{type:Number,default:0},tableData:{type:Array,default:()=>[]},pagination:{type:Object,default:()=>V.paginationConfig},params:{type:Object,default:()=>{}},requestFn:{type:Function},columns:{type:Array,default:()=>[]},hasBatchSelect:{type:Boolean,default:!1},expandColumnKey:{type:String,default:""},tableDataKey:{type:String,default:"list"},tableDomWidth:{type:Number,default:0},pageMapping:{type:Object,default:()=>({pageSize:"pageSize",pageNum:"pageNum"})},sortState:{type:Object,default:()=>{}}},emits:[V.emitsMap.paginationChange,"updateTableData","handleTableSelect","handleBatchDelete","updateSortState","endReached"],setup(f,{expose:te,emit:le}){const g=le,i=f,z=l.useSlots(),E=l.computed(()=>typeof i.requestFn=="function"),d=l.computed({get:()=>E.value?m.value:i.tableData,set:e=>{E.value?m.value=e:g("updateTableData",e)}}),A=l.ref(0),M=l.computed(()=>E.value?A.value:i.total),y=l.computed({get:()=>i.sortState,set:e=>{g("updateSortState",e)}}),ae=({key:e,order:t})=>{y.value[e]=t,d.value=d.value.reverse()},ne=e=>{g("endReached",e)},m=l.ref([]),v=l.computed(()=>i.pageMapping.pageNum),k=l.computed(()=>i.pageMapping.pageSize),q={[v.value]:1,[k.value]:20},c=l.ref({...q}),p=l.ref([]),s=l.ref([]),_=l.ref([]),S=l.ref({}),K=l.computed(()=>oe(S.value));function oe(e){const t=new Set;for(const a in e)e.hasOwnProperty(a)&&e[a].forEach(n=>{t.add(n.id)});return t}const F=({value:e,intermediate:t=!1,onChange:a})=>l.h(B.ElCheckbox,{onChange:a,modelValue:e,indeterminate:t}),ue=(e,t)=>{if(e.selected=t,t?s.value.some(a=>a.id===e.id)||s.value.push(e):s.value=s.value.filter(({id:a})=>a!==e.id),e.children&&e.children.length>0){const a=n=>{n.forEach(u=>{u.selected=t,t?s.value.some(r=>r.id===u.id)||s.value.push(u):s.value=s.value.filter(({id:r})=>r!==u.id),u.children&&u.children.length>0&&a(u.children)})};a(e.children)}e.parentId&&L(e.parentId),U(),C()},L=e=>{const t=$(d.value,e);if(!t)return;const a=t.children.every(n=>n.selected);a&&!t.selected?(t.selected=!0,s.value.some(n=>n.id===t.id)||s.value.push(t)):!a&&t.selected&&(t.selected=!1,s.value=s.value.filter(({id:n})=>n!==t.id)),t.parentId&&L(t.parentId)},$=(e,t)=>{for(const a of e){if(a.id===t)return a;if(a.children){const n=$(a.children,t);if(n)return n}}return null};function U(){S.value[c.value[v.value]]=H(d.value)}function H(e){let t=[];return e.forEach(a=>{a.selected&&t.push(a),a.children&&a.children.length>0&&(t=t.concat(H(a.children)))}),t}function W(e,t){e.selected=t,e.children&&e.children.length>0&&e.children.forEach(a=>W(a,t))}const se=e=>{const t=d.value.map(a=>(W(a,e),a));return d.value=[...t],U(),s.value=e?[...Object.values(S.value).flat()]:[],C(),[...s.value]},ie=()=>{p.value.unshift({key:"selection",width:50,cellRenderer:e=>{const{rowData:t}=e,n=t.children&&t.children.length>0?re(t):!1;return l.h(F,{value:t.selected,intermediate:n,onChange:u=>ue(t,u)})},headerCellRenderer:()=>{const e=l.unref(d),t=e.every(n=>{const u=n.selected,r=G(n);return u&&r}),a=e.some(n=>n.selected||J(n));return l.h(F,{value:t,intermediate:a&&!t,onChange:se})}})},re=e=>{if(!e.children||e.children.length===0)return!1;const t=e.children.filter(a=>a.selected).length;return t>0&&t<e.children.length};function G(e){return e.children?.length?!!e.selected&&e.children.every(G):!!e.selected}function J(e){return e.selected?!0:e.children?.some(J)||!1}function Q(e){return e.map(t=>{const a={...t,selected:!1};return a.children&&(a.children=Q(a.children)),a})}const b=l.ref(!1),ce=()=>{b.value=!0,ie()},D=()=>{b.value=!1,s.value=[],d.value=d.value.map(e=>(W(e,!1),e)),S.value={},m.value=Q(m.value),p.value.shift(),C()},de=()=>{g("handleBatchDelete",{selectedRows:Object.values(S.value).flat(),cb:()=>{D(),C()}})},fe=()=>{s.value=[],C()};function C(){const e=Object.values(S.value).flat();g("handleTableSelect",{originNodeData:s.value,allSelectedNodes:e,selectedSubNodes:e.filter(t=>!t.children)})}const x=()=>{E.value?i.requestFn({...i.params,...c.value}).then(e=>{m.value=j(e?.data[i.tableDataKey],c.value[v.value],K.value)||[],A.value=e?.data?.total}):(m.value=j(i.tableData,c.value[v.value],K.value),A.value=i.total)};function j(e,t,a,n=!1){return e.map(u=>{const r=a.has(u.id)||n,h={...u,selected:r};return h.children&&(h.children=j(h.children,t,a,r)),h})}const he=()=>{c.value[v.value]=q[v.value],x()},ve=()=>{c.value={...q},x()},X=e=>{e==="size"&&(c.value[v.value]=1),x(),g(V.emitsMap.paginationChange,c.value)},w=l.ref(0),N=()=>{let e=w.value,t=me.cloneDeep(i.columns);const a=1/V.calculateScale(),n=t.filter(o=>o.fixedWidth),u=t.filter(o=>!o.fixedWidth);let r=0;n.forEach(o=>{o.width&&(r+=o.width)});let h=e-r,I=0;u.forEach(o=>{o.width&&(I+=o.width)});const Z=[];if(t.forEach((o,T)=>{let R;if(o.fixedWidth)R=o.width||100;else if(o.width&&I>0){const P=o.width/I,O=h*P;R=Math.max(O,o.width)}else{const P=u.filter(O=>!O.width);R=P.length>0?h/P.length:h/u.length}Z.push(R)}),t=t.map((o,T)=>(o.width=Z[T]*a,y.value&&Object.keys(y.value).length&&y.value[o.key]&&(o.sortable=!0),o)),b.value){const o=p.value.find(T=>T.key==="selection");o&&(p.value=[o,...t])}else p.value=[...t]};l.watch(()=>b.value,()=>{N()}),l.watch(()=>i.tableDomWidth,e=>{e&&(w.value=e,N())});const Y=()=>{w.value=document.querySelector(".TABLE-AREA").getBoundingClientRect().width,N()};return l.onMounted(()=>{x(),p.value=i.columns,w.value=document.querySelector(".TABLE-AREA").getBoundingClientRect().width,l.nextTick(()=>{N()}),window.addEventListener("resize",Y)}),te({getTableList:x,search:he,reset:ve,initBatchSelect:fe,handleCancelSelect:D,handleResize:Y}),(e,t)=>(l.openBlock(),l.createElementBlock("div",ye,[l.createElementVNode("div",be,[l.unref(z)["filter-left"]?(l.openBlock(),l.createElementBlock("div",Ce,[l.renderSlot(e.$slots,"filter-left",{},void 0,!0)])):l.createCommentVNode("",!0),l.createElementVNode("div",xe,[f.hasBatchSelect&&d.value.length?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[b.value?(l.openBlock(),l.createElementBlock("div",Be,[l.createElementVNode("div",Ee,"已选"+l.toDisplayString(s.value.length)+"条数据",1),l.createElementVNode("div",{class:"fz-12 text-3b64ff mg-l-4 pointer",onClick:D},"取消选择"),l.renderSlot(e.$slots,"btn-group",{},()=>[l.createElementVNode("div",ke,[l.createVNode(l.unref(B.ElButton),{type:"danger",onClick:de,disabled:!s.value.length},{default:l.withCtx(()=>[...t[6]||(t[6]=[l.createTextVNode(" 删除 ",-1)])]),_:1},8,["disabled"])])],!0)])):(l.openBlock(),l.createBlock(l.unref(B.ElButton),{key:0,disabled:f.disableBatchSelect,title:f.disableBatchSelect?f.disableBatchSelectText:"",type:"default",onClick:ce},{default:l.withCtx(()=>[...t[5]||(t[5]=[l.createTextVNode(" 批量选择 ",-1)])]),_:1},8,["disabled","title"]))],64)):l.createCommentVNode("",!0),l.unref(z)["filter-right"]?l.renderSlot(e.$slots,"filter-right",{key:1},void 0,!0):l.createCommentVNode("",!0)])]),l.createElementVNode("div",we,[l.createElementVNode("div",Ne,[l.createVNode(l.unref(B.ElAutoResizer),null,{default:l.withCtx(({width:a,height:n})=>[l.createVNode(l.unref(B.ElTableV2),{"expanded-row-keys":_.value,"onUpdate:expandedRowKeys":t[0]||(t[0]=u=>_.value=u),"expand-column-key":f.expandColumnKey,columns:p.value,data:d.value,width:a,height:n,fixed:"","sort-state":y.value,onEndReached:ne,onColumnSort:ae},l.createSlots({_:2},[l.renderList(l.unref(z),(u,r)=>({name:r,fn:l.withCtx(h=>[l.renderSlot(e.$slots,r,l.normalizeProps(l.guardReactiveProps(h)),void 0,!0)])}))]),1032,["expanded-row-keys","expand-column-key","columns","data","width","height","sort-state"])]),_:3})]),f.isPagination&&M.value>c.value[k.value]?(l.openBlock(),l.createElementBlock("div",Te,[f.isPagination?(l.openBlock(),l.createBlock(ge._sfc_main,{key:0,"current-page":c.value[v.value],"onUpdate:currentPage":t[1]||(t[1]=a=>c.value[v.value]=a),"page-size":c.value[k.value],"onUpdate:pageSize":t[2]||(t[2]=a=>c.value[k.value]=a),"page-sizes":f.pagination.pageSizes,layout:f.pagination.layout,total:M.value,onSizeChange:t[3]||(t[3]=a=>X("size")),onCurrentChange:t[4]||(t[4]=a=>X("page"))},null,8,["current-page","page-size","page-sizes","layout","total"])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)])]))}}),Pe=Se._export_sfc(Re,[["__scopeId","data-v-8b1b65e5"]]),ee=pe.withInstall(Pe);exports.PaginationTable=ee;exports.default=ee;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/PaginationTable.css');const pe=require("./chunks/index.CkihWzK6.js"),t=require("vue"),B=require("element-plus"),P=require("color-star-custom-methods"),ge=require("./chunks/layout.DbtiD7D3.js"),me=require("lodash"),Se=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js"),ye={class:"flex h-full flex-col"},be={class:"w-full flex justify-between overflow-hidden",style:{height:"auto"}},Ce={key:0,class:"flex-1 overflow-hidden"},xe={class:"flex",style:{width:"auto",gap:"10px"}},Be={key:1,class:"flex items-center mg-b-18"},Ee={class:"fz-12 text-74798c"},ke={class:"btn-group mg-l-12"},we={class:"w-full flex-1 overflow-hidden flex flex-col"},Ne={class:"flex-1 overflow-hidden TABLE-AREA"},Te={key:0,class:"flex justify-end mg-t-20",style:{height:"auto"}},Re=Object.assign({name:"PaginationTable"},{__name:"layout",props:{isPagination:{type:Boolean,default:!0},disableBatchSelect:{type:Boolean,default:!1},disableBatchSelectText:{type:String,default:""},total:{type:Number,default:0},tableData:{type:Array,default:()=>[]},pagination:{type:Object,default:()=>P.paginationConfig},params:{type:Object,default:()=>{}},requestFn:{type:Function},columns:{type:Array,default:()=>[]},hasBatchSelect:{type:Boolean,default:!1},expandColumnKey:{type:String,default:""},tableDataKey:{type:String,default:"list"},tableDomWidth:{type:Number,default:0},pageMapping:{type:Object,default:()=>({pageSize:"pageSize",pageNum:"pageNum"})},sortState:{type:Object,default:()=>{}}},emits:[P.emitsMap.paginationChange,"updateTableData","handleTableSelect","handleBatchDelete","updateSortState","endReached"],setup(f,{expose:ee,emit:te}){const g=te,i=f,V=t.useSlots(),E=t.computed(()=>typeof i.requestFn=="function"),d=t.computed({get:()=>E.value?m.value:i.tableData,set:e=>{E.value?m.value=e:g("updateTableData",e)}}),z=t.ref(0),le=t.computed(()=>E.value?z.value:i.total),y=t.computed({get:()=>i.sortState,set:e=>{g("updateSortState",e)}}),ae=({key:e,order:l})=>{y.value[e]=l,d.value=d.value.reverse()},ne=e=>{g("endReached",e)},m=t.ref([]),v=t.computed(()=>i.pageMapping.pageNum),A=t.computed(()=>i.pageMapping.pageSize),q={[v.value]:1,[A.value]:20},c=t.ref({...q}),p=t.ref([]),u=t.ref([]),M=t.ref([]),S=t.ref({}),K=t.computed(()=>oe(S.value));function oe(e){const l=new Set;for(const a in e)e.hasOwnProperty(a)&&e[a].forEach(n=>{l.add(n.id)});return l}const _=({value:e,intermediate:l=!1,onChange:a})=>t.h(B.ElCheckbox,{onChange:a,modelValue:e,indeterminate:l}),se=(e,l)=>{if(e.selected=l,l?u.value.some(a=>a.id===e.id)||u.value.push(e):u.value=u.value.filter(({id:a})=>a!==e.id),e.children&&e.children.length>0){const a=n=>{n.forEach(s=>{s.selected=l,l?u.value.some(r=>r.id===s.id)||u.value.push(s):u.value=u.value.filter(({id:r})=>r!==s.id),s.children&&s.children.length>0&&a(s.children)})};a(e.children)}e.parentId&&F(e.parentId),L(),C()},F=e=>{const l=$(d.value,e);if(!l)return;const a=l.children.every(n=>n.selected);a&&!l.selected?(l.selected=!0,u.value.some(n=>n.id===l.id)||u.value.push(l)):!a&&l.selected&&(l.selected=!1,u.value=u.value.filter(({id:n})=>n!==l.id)),l.parentId&&F(l.parentId)},$=(e,l)=>{for(const a of e){if(a.id===l)return a;if(a.children){const n=$(a.children,l);if(n)return n}}return null};function L(){S.value[c.value[v.value]]=U(d.value)}function U(e){let l=[];return e.forEach(a=>{a.selected&&l.push(a),a.children&&a.children.length>0&&(l=l.concat(U(a.children)))}),l}function W(e,l){e.selected=l,e.children&&e.children.length>0&&e.children.forEach(a=>W(a,l))}const ue=e=>{const l=d.value.map(a=>(W(a,e),a));return d.value=[...l],L(),u.value=e?[...Object.values(S.value).flat()]:[],C(),[...u.value]},ie=()=>{p.value.unshift({key:"selection",width:50,cellRenderer:e=>{const{rowData:l}=e,n=l.children&&l.children.length>0?re(l):!1;return t.h(_,{value:l.selected,intermediate:n,onChange:s=>se(l,s)})},headerCellRenderer:()=>{const e=t.unref(d),l=e.every(n=>{const s=n.selected,r=H(n);return s&&r}),a=e.some(n=>n.selected||G(n));return t.h(_,{value:l,intermediate:a&&!l,onChange:ue})}})},re=e=>{if(!e.children||e.children.length===0)return!1;const l=e.children.filter(a=>a.selected).length;return l>0&&l<e.children.length};function H(e){return e.children?.length?!!e.selected&&e.children.every(H):!!e.selected}function G(e){return e.selected?!0:e.children?.some(G)||!1}function J(e){return e.map(l=>{const a={...l,selected:!1};return a.children&&(a.children=J(a.children)),a})}const b=t.ref(!1),ce=()=>{b.value=!0,ie()},D=()=>{b.value=!1,u.value=[],d.value=d.value.map(e=>(W(e,!1),e)),S.value={},m.value=J(m.value),p.value.shift(),C()},de=()=>{g("handleBatchDelete",{selectedRows:Object.values(S.value).flat(),cb:()=>{D(),C()}})},fe=()=>{u.value=[],C()};function C(){const e=Object.values(S.value).flat();g("handleTableSelect",{originNodeData:u.value,allSelectedNodes:e,selectedSubNodes:e.filter(l=>!l.children)})}const x=()=>{E.value?i.requestFn({...i.params,...c.value}).then(e=>{m.value=j(e?.data[i.tableDataKey],c.value[v.value],K.value)||[],z.value=e?.data?.total}):(m.value=j(i.tableData,c.value[v.value],K.value),z.value=i.total)};function j(e,l,a,n=!1){return e.map(s=>{const r=a.has(s.id)||n,h={...s,selected:r};return h.children&&(h.children=j(h.children,l,a,r)),h})}const he=()=>{c.value[v.value]=q[v.value],x()},ve=()=>{c.value={...q},x()},Q=e=>{e==="size"&&(c.value[v.value]=1),x(),g(P.emitsMap.paginationChange,c.value)},k=t.ref(0),w=()=>{let e=k.value,l=me.cloneDeep(i.columns);const a=1/P.calculateScale(),n=l.filter(o=>o.fixedWidth),s=l.filter(o=>!o.fixedWidth);let r=0;n.forEach(o=>{o.width&&(r+=o.width)});let h=e-r,I=0;s.forEach(o=>{o.width&&(I+=o.width)});const Y=[];if(l.forEach((o,N)=>{let T;if(o.fixedWidth)T=o.width||100;else if(o.width&&I>0){const R=o.width/I,O=h*R;T=Math.max(O,o.width)}else{const R=s.filter(O=>!O.width);T=R.length>0?h/R.length:h/s.length}Y.push(T)}),l=l.map((o,N)=>(o.width=Y[N]*a,y.value&&Object.keys(y.value).length&&y.value[o.key]&&(o.sortable=!0),o)),b.value){const o=p.value.find(N=>N.key==="selection");o&&(p.value=[o,...l])}else p.value=[...l]};t.watch(()=>b.value,()=>{w()}),t.watch(()=>i.tableDomWidth,e=>{e&&(k.value=e,w())});const X=()=>{k.value=document.querySelector(".TABLE-AREA").getBoundingClientRect().width,w()};return t.onMounted(()=>{x(),p.value=i.columns,k.value=document.querySelector(".TABLE-AREA").getBoundingClientRect().width,t.nextTick(()=>{w()}),window.addEventListener("resize",X)}),ee({getTableList:x,search:he,reset:ve,initBatchSelect:fe,handleCancelSelect:D,handleResize:X}),(e,l)=>(t.openBlock(),t.createElementBlock("div",ye,[t.createElementVNode("div",be,[t.unref(V)["filter-left"]?(t.openBlock(),t.createElementBlock("div",Ce,[t.renderSlot(e.$slots,"filter-left",{},void 0,!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",xe,[f.hasBatchSelect&&d.value.length?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[b.value?(t.openBlock(),t.createElementBlock("div",Be,[t.createElementVNode("div",Ee,"已选"+t.toDisplayString(u.value.length)+"条数据",1),t.createElementVNode("div",{class:"fz-12 text-3b64ff mg-l-4 pointer",onClick:D},"取消选择"),t.renderSlot(e.$slots,"btn-group",{},()=>[t.createElementVNode("div",ke,[t.createVNode(t.unref(B.ElButton),{type:"danger",onClick:de,disabled:!u.value.length},{default:t.withCtx(()=>[...l[6]||(l[6]=[t.createTextVNode(" 删除 ",-1)])]),_:1},8,["disabled"])])],!0)])):(t.openBlock(),t.createBlock(t.unref(B.ElButton),{key:0,disabled:f.disableBatchSelect,title:f.disableBatchSelect?f.disableBatchSelectText:"",type:"default",onClick:ce},{default:t.withCtx(()=>[...l[5]||(l[5]=[t.createTextVNode(" 批量选择 ",-1)])]),_:1},8,["disabled","title"]))],64)):t.createCommentVNode("",!0),t.unref(V)["filter-right"]?t.renderSlot(e.$slots,"filter-right",{key:1},void 0,!0):t.createCommentVNode("",!0)])]),t.createElementVNode("div",we,[t.createElementVNode("div",Ne,[t.createVNode(t.unref(B.ElAutoResizer),null,{default:t.withCtx(({width:a,height:n})=>[t.createVNode(t.unref(B.ElTableV2),{"expanded-row-keys":M.value,"onUpdate:expandedRowKeys":l[0]||(l[0]=s=>M.value=s),"expand-column-key":f.expandColumnKey,columns:p.value,data:d.value,width:a,height:n,fixed:"","sort-state":y.value,onEndReached:ne,onColumnSort:ae},t.createSlots({_:2},[t.renderList(t.unref(V),(s,r)=>({name:r,fn:t.withCtx(h=>[t.renderSlot(e.$slots,r,t.normalizeProps(t.guardReactiveProps(h)),void 0,!0)])}))]),1032,["expanded-row-keys","expand-column-key","columns","data","width","height","sort-state"])]),_:3})]),f.isPagination?(t.openBlock(),t.createElementBlock("div",Te,[f.isPagination?(t.openBlock(),t.createBlock(ge._sfc_main,t.mergeProps({key:0,"current-page":c.value[v.value],"onUpdate:currentPage":l[1]||(l[1]=a=>c.value[v.value]=a),"page-size":c.value[A.value],"onUpdate:pageSize":l[2]||(l[2]=a=>c.value[A.value]=a),"page-sizes":f.pagination.pageSizes,layout:f.pagination.layout,total:le.value},e.$attrs,{onSizeChange:l[3]||(l[3]=a=>Q("size")),onCurrentChange:l[4]||(l[4]=a=>Q("page"))}),null,16,["current-page","page-size","page-sizes","layout","total"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)])]))}}),Pe=Se._export_sfc(Re,[["__scopeId","data-v-7c948317"]]),Z=pe.withInstall(Pe);exports.PaginationTable=Z;exports.default=Z;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/PluginDetail.css');const C=require("./chunks/index.CkihWzK6.js"),e=require("vue"),y=require("element-plus"),h=require("color-star-custom-components"),g=require("color-star-custom-methods"),S=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js"),m={name:"name",type:"type",required:"required",description:"description"},N=[{label:"参数名",prop:m.name},{label:"参数类型",prop:m.type},{label:"必填",prop:m.required},{label:"描述",prop:m.description}],E={key:1,class:"type-tag"},B={__name:"ParamsTable",props:{data:{type:[Array,String],default:()=>[]},columns:{type:Array,default:()=>N},hideColumns:{type:Array,default:()=>[]}},setup(a){const o=a,k=e.computed(()=>{let l=o.data;if(typeof l=="string")try{l=JSON.parse(l)}catch(s){return console.error("解析参数数据失败:",s),[]}return!l||!Array.isArray(l)?[]:l}),n=e.computed(()=>!o.hideColumns||o.hideColumns.length===0?o.columns:o.columns.filter(l=>!o.hideColumns.includes(l.prop)));return(l,s)=>(e.openBlock(),e.createBlock(e.unref(y.ElTable),{data:k.value,"row-key":"uiid","tree-props":{children:"children",hasChildren:"hasChildren"},stripe:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,r=>(e.openBlock(),e.createBlock(e.unref(y.ElTableColumn),{key:r.prop,prop:r.prop,label:r.label,width:r.width,"min-width":r.minWidth},{default:e.withCtx(({row:u})=>[r.prop==="required"?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(u.required?"required-yes":"required-no")},e.toDisplayString(u.required?"是":"否"),3)):r.prop==="type"?(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(u.type),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(u[r.prop]||"-"),1)],64))]),_:2},1032,["prop","label","width","min-width"]))),128))]),_:1},8,["data"]))}},P={key:0},T={key:1},D={key:3,class:"radius-12 border-f0f0f0 pd-l-20 pd-r-20 pd-b-24 pd-t-20 mg-b-34"},I={class:"weight-400 fz-16 text-666666 lh-24"},q={class:"flex justify-end items-center gap-10 text-right"},M=Object.assign({name:"PluginDetail"},{__name:"layout",props:{intro:{type:String,default:""},description:{type:String,default:""},modelValue:{type:[String,Number],default:""},tabItems:{type:Array,default:()=>[]},pluginDetailApi:{type:Function,default:()=>{}},showInputParams:{type:Boolean,default:!0},showOutputParams:{type:Boolean,default:!0},inputParamsHideColumns:{type:Array,default:()=>[]},outputParamsHideColumns:{type:Array,default:()=>[m.required]},showIntro:{type:Boolean,default:!0}},emits:[g.emitsMap.updateModelValue,g.emitsMap.tabChange],setup(a,{expose:o,emit:k}){const n=a,l=k,s=e.ref(!1),r=e.ref(!1),u=e.ref(null),i=e.ref(n.modelValue),c=e.computed(()=>!n.tabItems?.length||!i.value?null:n.tabItems.find(t=>t.bnid==i.value)||null),V=()=>{s.value=!s.value},w=t=>{l(g.emitsMap.updateModelValue,t),l(g.emitsMap.tabChange,t)},b=()=>{e.nextTick(()=>{const t=u.value;t&&(r.value=t.scrollHeight>24)})},d=e.ref(null);return e.watch(()=>c.value?.bnid,t=>{t&&n.pluginDetailApi(t).then(p=>{d.value=p?.data?.[0]})},{immediate:!0}),e.watch(()=>n.modelValue,t=>{i.value=t}),e.watch(()=>n.tabItems,t=>{i.value=t?.[0]?.bnid},{immediate:!0}),e.watch(()=>c.value?.description,()=>{b()},{immediate:!0}),e.onMounted(()=>{b()}),o({checkShowMoreBtn:b,currentTabItem:c}),(t,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.showIntro?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(h.CustomTitle),{content:"插件简介",class:"mg-b-16"}),e.createElementVNode("div",{class:e.normalizeClass(["weight-400 fz-16 text-666",s.value?"":"hide-more"]),ref_key:"descRef",ref:u},[e.renderSlot(t.$slots,"intro",{},()=>[e.createTextVNode(e.toDisplayString(a.intro),1)],!0)],2)],64)):e.createCommentVNode("",!0),a.tabItems?.length?(e.openBlock(),e.createBlock(e.unref(y.ElSegmented),{key:1,modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=f=>i.value=f),options:a.tabItems.map(f=>({label:f.interfaceName,value:f.bnid})),onChange:w,class:"mg-b-16"},null,8,["modelValue","options"])):e.createCommentVNode("",!0),e.createVNode(e.unref(h.CustomTitle),{content:"工具描述",class:"mg-b-16"}),e.createElementVNode("div",{class:e.normalizeClass(["weight-400 fz-16 text-666",s.value?"":"hide-more"]),ref_key:"descRef",ref:u},[e.renderSlot(t.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(c.value?.description),1)],!0)],2),r.value?(e.openBlock(),e.createBlock(e.unref(y.ElButton),{key:2,type:"text",onClick:V},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("span",T,"收起")):(e.openBlock(),e.createElementBlock("span",P,"查看更多"))]),_:1})):e.createCommentVNode("",!0),t.$slots.default||t.$slots.actions?(e.openBlock(),e.createElementBlock("div",D,[e.createElementVNode("div",I,[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(c.value?.description),1)],!0)]),e.createElementVNode("div",q,[e.renderSlot(t.$slots,"actions",{},void 0,!0)])])):e.createCommentVNode("",!0),a.showInputParams&&a.tabItems?.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(e.unref(h.CustomTitle),{content:"输入参数",class:"mg-b-16 mg-t-34"}),d.value?.paramsOuter?(e.openBlock(),e.createBlock(B,{key:0,data:d.value.paramsOuter,"hide-columns":a.inputParamsHideColumns},null,8,["data","hide-columns"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),a.showOutputParams&&a.tabItems?.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createVNode(e.unref(h.CustomTitle),{content:"输出参数",class:"mg-b-16 mg-t-34"}),d.value?.responseOuter?(e.openBlock(),e.createBlock(B,{key:0,data:d.value.responseOuter,"hide-columns":a.outputParamsHideColumns},null,8,["data","hide-columns"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"plugin-detail",{},void 0,!0)],64))}}),x=S._export_sfc(M,[["__scopeId","data-v-70e5945d"]]),v=C.withInstall(x),A=C.withInstall(B);exports.PluginDetail=v;exports.PluginDetailParamsTable=A;exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/PluginDetail.css');const B=require("./chunks/index.CkihWzK6.js"),e=require("vue"),y=require("element-plus"),f=require("color-star-custom-components"),g=require("color-star-custom-methods"),S=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js"),d={name:"name",type:"type",required:"required",description:"description"},N=[{label:"参数名",prop:d.name},{label:"参数类型",prop:d.type},{label:"必填",prop:d.required},{label:"描述",prop:d.description}],P={key:1,class:"type-tag"},C={__name:"ParamsTable",props:{data:{type:[Array,String],default:()=>[]},columns:{type:Array,default:()=>N},hideColumns:{type:Array,default:()=>[]}},setup(a){const o=a,k=e.computed(()=>{let l=o.data;if(typeof l=="string")try{l=JSON.parse(l)}catch(s){return console.error("解析参数数据失败:",s),[]}return!l||!Array.isArray(l)?[]:l}),n=e.computed(()=>!o.hideColumns||o.hideColumns.length===0?o.columns:o.columns.filter(l=>!o.hideColumns.includes(l.prop)));return(l,s)=>(e.openBlock(),e.createBlock(e.unref(y.ElTable),{data:k.value,"row-key":"uiid","tree-props":{children:"children",hasChildren:"hasChildren"},stripe:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,r=>(e.openBlock(),e.createBlock(e.unref(y.ElTableColumn),{key:r.prop,prop:r.prop,label:r.label,width:r.width,"min-width":r.minWidth},{default:e.withCtx(({row:u})=>[r.prop==="required"?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(u.required?"required-yes":"required-no")},e.toDisplayString(u.required?"是":"否"),3)):r.prop==="type"?(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(u.type),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(u[r.prop]||"-"),1)],64))]),_:2},1032,["prop","label","width","min-width"]))),128))]),_:1},8,["data"]))}},E={key:0},T={key:1},D=Object.assign({name:"PluginDetail"},{__name:"layout",props:{intro:{type:String,default:""},description:{type:String,default:""},modelValue:{type:[String,Number],default:""},tabItems:{type:Array,default:()=>[]},pluginDetailApi:{type:Function,default:()=>{}},showInputParams:{type:Boolean,default:!0},showOutputParams:{type:Boolean,default:!0},inputParamsHideColumns:{type:Array,default:()=>[]},outputParamsHideColumns:{type:Array,default:()=>[d.required]},showIntro:{type:Boolean,default:!0}},emits:[g.emitsMap.updateModelValue,g.emitsMap.tabChange],setup(a,{expose:o,emit:k}){const n=a,l=k,s=e.ref(!1),r=e.ref(!1),u=e.ref(null),i=e.ref(n.modelValue),m=e.computed(()=>!n.tabItems?.length||!i.value?null:n.tabItems.find(t=>t.bnid==i.value)||null),V=()=>{s.value=!s.value},w=t=>{l(g.emitsMap.updateModelValue,t),l(g.emitsMap.tabChange,t)},b=()=>{e.nextTick(()=>{const t=u.value;t&&(r.value=t.scrollHeight>24)})},c=e.ref(null);return e.watch(()=>m.value?.bnid,t=>{t&&n.pluginDetailApi(t).then(p=>{c.value=p?.data?.[0]})},{immediate:!0}),e.watch(()=>n.modelValue,t=>{i.value=t}),e.watch(()=>n.tabItems,t=>{i.value=t?.[0]?.bnid},{immediate:!0}),e.watch(()=>m.value?.description,()=>{b()},{immediate:!0}),e.onMounted(()=>{b()}),o({checkShowMoreBtn:b,currentTabItem:m}),(t,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.showIntro?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(f.CustomTitle),{content:"插件简介",class:"mg-b-16"}),e.createElementVNode("div",{class:e.normalizeClass(["weight-400 fz-16 text-666",s.value?"":"hide-more"]),ref_key:"descRef",ref:u},[e.renderSlot(t.$slots,"intro",{},()=>[e.createTextVNode(e.toDisplayString(a.intro),1)],!0)],2)],64)):e.createCommentVNode("",!0),a.tabItems?.length?(e.openBlock(),e.createBlock(e.unref(y.ElSegmented),{key:1,modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=h=>i.value=h),options:a.tabItems.map(h=>({label:h.interfaceName,value:h.bnid})),onChange:w,class:"mg-b-16"},null,8,["modelValue","options"])):e.createCommentVNode("",!0),e.createVNode(e.unref(f.CustomTitle),{content:"工具描述",class:"mg-b-16"}),e.createElementVNode("div",{class:e.normalizeClass(["weight-400 fz-16 text-666",s.value?"":"hide-more"]),ref_key:"descRef",ref:u},[e.renderSlot(t.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(m.value?.description),1)],!0)],2),r.value?(e.openBlock(),e.createBlock(e.unref(y.ElButton),{key:2,type:"text",onClick:V},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("span",T,"收起")):(e.openBlock(),e.createElementBlock("span",E,"查看更多"))]),_:1})):e.createCommentVNode("",!0),t.$slots.actions?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["flex items-center gap-10 text-right",{"actions-wrap--no-toggle":!r.value}])},[e.renderSlot(t.$slots,"actions",{},void 0,!0)],2)):e.createCommentVNode("",!0),a.showInputParams&&a.tabItems?.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(e.unref(f.CustomTitle),{content:"输入参数",class:"mg-b-16 mg-t-34"}),c.value?.paramsOuter?(e.openBlock(),e.createBlock(C,{key:0,data:c.value.paramsOuter,"hide-columns":a.inputParamsHideColumns},null,8,["data","hide-columns"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),a.showOutputParams&&a.tabItems?.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createVNode(e.unref(f.CustomTitle),{content:"输出参数",class:"mg-b-16 mg-t-34"}),c.value?.responseOuter?(e.openBlock(),e.createBlock(C,{key:0,data:c.value.responseOuter,"hide-columns":a.outputParamsHideColumns},null,8,["data","hide-columns"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"plugin-detail",{},void 0,!0)],64))}}),I=S._export_sfc(D,[["__scopeId","data-v-a48c6966"]]),v=B.withInstall(I),q=B.withInstall(C);exports.PluginDetail=v;exports.PluginDetailParamsTable=q;exports.default=v;
@@ -1 +1 @@
1
- [data-v-8b1b65e5] .el-table-v2__header-cell-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
1
+ [data-v-7c948317] .el-table-v2__header-cell-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@@ -1 +1 @@
1
- .hide-more[data-v-70e5945d]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.border-f0f0f0[data-v-70e5945d]{border:1px solid var(--neutral-color-6)}
1
+ .hide-more[data-v-a48c6966]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.border-f0f0f0[data-v-a48c6966]{border:1px solid var(--neutral-color-6)}.actions-wrap--no-toggle[data-v-a48c6966]{margin-top:10px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ling-yun-custom-components",
3
- "version": "0.0.76",
3
+ "version": "0.0.78",
4
4
  "keywords": [
5
5
  "component library",
6
6
  "ui framework",
@@ -137,7 +137,7 @@
137
137
  "dependencies": {
138
138
  "@vueuse/core": "^14.0.0",
139
139
  "dayjs": "^1.11.18",
140
- "element-plus": "^2.13.2",
140
+ "element-plus": "^2.13.5",
141
141
  "element-tree-line": "^0.2.1",
142
142
  "js-cookie": "^3.0.5",
143
143
  "lodash.debounce": "^4.0.8",
@@ -185,9 +185,9 @@
185
185
  "axios": "^1.8.2",
186
186
  "vue": "^3.5.27",
187
187
  "color-message-lingyun-vue": "0.0.30",
188
- "color-message-aibox-vue": "0.1.4",
188
+ "color-message-aibox-vue": "0.1.7",
189
189
  "color-star-atom-style": "0.0.4",
190
- "color-star-custom-components": "0.0.43",
190
+ "color-star-custom-components": "0.0.47",
191
191
  "color-star-custom-methods": "0.0.27",
192
192
  "ling-yun-methods": "0.0.53"
193
193
  },