ling-yun-custom-components 0.0.64 → 0.0.66

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,7 +1,7 @@
1
1
  import { w as x } from "./chunks/index.bCzIhWFw.js";
2
- import { computed as B, createBlock as p, openBlock as t, unref as u, withCtx as M, createElementBlock as n, Fragment as f, renderList as H, normalizeClass as $, toDisplayString as h, createTextVNode as D, ref as g, watch as P, onMounted as z, createCommentVNode as o, createVNode as S, createElementVNode as V, renderSlot as b, nextTick as _ } from "vue";
3
- import { ElTable as R, ElTableColumn as j, ElButton as F, ElSegmented as J } from "element-plus";
4
- import { CustomTitle as v } from "color-star-custom-components";
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
5
  import { emitsMap as A } from "color-star-custom-methods";
6
6
  import { _ as L } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
7
7
  import './assets/PluginDetail.css';const k = {
@@ -46,36 +46,36 @@ import './assets/PluginDetail.css';const k = {
46
46
  }
47
47
  },
48
48
  setup(a) {
49
- const i = a, T = B(() => {
50
- let r = i.data;
49
+ const s = a, T = B(() => {
50
+ let r = s.data;
51
51
  if (typeof r == "string")
52
52
  try {
53
53
  r = JSON.parse(r);
54
- } catch (d) {
55
- return console.error("解析参数数据失败:", d), [];
54
+ } catch (u) {
55
+ return console.error("解析参数数据失败:", u), [];
56
56
  }
57
57
  return !r || !Array.isArray(r) ? [] : r;
58
- }), s = B(() => !i.hideColumns || i.hideColumns.length === 0 ? i.columns : i.columns.filter((r) => !i.hideColumns.includes(r.prop)));
59
- return (r, d) => (t(), p(u(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
60
  data: T.value,
61
61
  "row-key": "uiid",
62
62
  "tree-props": { children: "children", hasChildren: "hasChildren" },
63
63
  stripe: ""
64
64
  }, {
65
65
  default: M(() => [
66
- (t(!0), n(f, null, H(s.value, (l) => (t(), p(u(j), {
66
+ (t(!0), n(f, null, _(o.value, (l) => (t(), c(p(j), {
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: m }) => [
73
+ default: M(({ row: i }) => [
74
74
  l.prop === "required" ? (t(), n("span", {
75
75
  key: 0,
76
- class: $(m.required ? "required-yes" : "required-no")
77
- }, h(m.required ? "是" : "否"), 3)) : l.prop === "type" ? (t(), n("span", W, h(m.type), 1)) : (t(), n(f, { key: 2 }, [
78
- D(h(m[l.prop] || "-"), 1)
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)
79
79
  ], 64))
80
80
  ]),
81
81
  _: 2
@@ -85,7 +85,7 @@ import './assets/PluginDetail.css';const k = {
85
85
  }, 8, ["data"]));
86
86
  }
87
87
  }, G = { key: 0 }, K = { key: 1 }, Q = {
88
- key: 4,
88
+ key: 3,
89
89
  class: "radius-12 border-f0f0f0 pd-l-20 pd-r-20 pd-b-24 pd-t-20 mg-b-34"
90
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({
91
91
  name: "PluginDetail"
@@ -141,138 +141,133 @@ import './assets/PluginDetail.css';const k = {
141
141
  }
142
142
  },
143
143
  emits: [A.updateModelValue, A.tabChange],
144
- setup(a, { expose: i, emit: T }) {
145
- const s = a, r = T, d = g(!1), l = g(!1), m = g(null), c = g(s.modelValue), C = B(() => !s.tabItems?.length || !c.value ? null : s.tabItems.find((e) => e.bnid == c.value) || null), N = () => {
146
- d.value = !d.value;
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 = () => {
146
+ u.value = !u.value;
147
147
  }, E = (e) => {
148
148
  r(A.updateModelValue, e), r(A.tabChange, e);
149
149
  }, q = () => {
150
- _(() => {
151
- const e = m.value;
150
+ z(() => {
151
+ const e = i.value;
152
152
  e && (l.value = e.scrollHeight > 24);
153
153
  });
154
- }, y = g(null);
155
- return P(
156
- () => C.value?.bnid,
154
+ }, g = b(null);
155
+ return I(
156
+ () => y.value?.bnid,
157
157
  (e) => {
158
- e && s.pluginDetailApi(e).then((w) => {
159
- y.value = w?.data?.[0];
158
+ e && o.pluginDetailApi(e).then((C) => {
159
+ g.value = C?.data?.[0];
160
160
  });
161
161
  },
162
162
  { immediate: !0 }
163
- ), P(
164
- () => s.modelValue,
163
+ ), I(
164
+ () => o.modelValue,
165
165
  (e) => {
166
- c.value = e;
166
+ m.value = e;
167
167
  }
168
- ), P(
169
- () => s.tabItems,
168
+ ), I(
169
+ () => o.tabItems,
170
170
  (e) => {
171
- c.value = e?.[0]?.bnid;
171
+ m.value = e?.[0]?.bnid;
172
172
  },
173
173
  { immediate: !0 }
174
- ), P(
175
- () => s.description,
174
+ ), I(
175
+ () => y.value?.description,
176
176
  () => {
177
177
  q();
178
178
  },
179
179
  { immediate: !0 }
180
- ), z(() => {
180
+ ), H(() => {
181
181
  q();
182
- }), i({
182
+ }), s({
183
183
  checkShowMoreBtn: q,
184
- currentTabItem: C
185
- }), (e, w) => (t(), n(f, null, [
184
+ currentTabItem: y
185
+ }), (e, C) => (t(), n(f, null, [
186
186
  a.showIntro ? (t(), n(f, { key: 0 }, [
187
- S(u(v), {
187
+ P(p(V), {
188
188
  content: "插件简介",
189
189
  class: "mg-b-16"
190
190
  }),
191
- V("div", {
192
- class: $(["weight-400 fz-16 text-666", d.value ? "" : "hide-more"]),
191
+ S("div", {
192
+ class: $(["weight-400 fz-16 text-666", u.value ? "" : "hide-more"]),
193
193
  ref_key: "descRef",
194
- ref: m
194
+ ref: i
195
195
  }, [
196
- b(e.$slots, "intro", {}, () => [
196
+ v(e.$slots, "intro", {}, () => [
197
197
  D(h(a.intro), 1)
198
198
  ], !0)
199
199
  ], 2)
200
- ], 64)) : o("", !0),
201
- S(u(v), {
200
+ ], 64)) : d("", !0),
201
+ a.tabItems?.length ? (t(), c(p(F), {
202
+ 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
208
+ })),
209
+ onChange: E,
210
+ class: "mg-b-16"
211
+ }, null, 8, ["modelValue", "options"])) : d("", !0),
212
+ P(p(V), {
202
213
  content: "工具描述",
203
- class: "mg-b-16 mg-t-34"
214
+ class: "mg-b-16"
204
215
  }),
205
- V("div", {
206
- class: $(["weight-400 fz-16 text-666", d.value ? "" : "hide-more"]),
216
+ S("div", {
217
+ class: $(["weight-400 fz-16 text-666", u.value ? "" : "hide-more"]),
207
218
  ref_key: "descRef",
208
- ref: m
219
+ ref: i
209
220
  }, [
210
- b(e.$slots, "description", {}, () => [
211
- D(h(C.value?.description), 1)
221
+ v(e.$slots, "description", {}, () => [
222
+ D(h(y.value?.description), 1)
212
223
  ], !0)
213
224
  ], 2),
214
- l.value ? (t(), p(u(F), {
215
- key: 1,
225
+ l.value ? (t(), c(p(J), {
226
+ key: 2,
216
227
  type: "text",
217
228
  onClick: N
218
229
  }, {
219
230
  default: M(() => [
220
- d.value ? (t(), n("span", K, "收起")) : (t(), n("span", G, "查看更多"))
231
+ u.value ? (t(), n("span", K, "收起")) : (t(), n("span", G, "查看更多"))
221
232
  ]),
222
233
  _: 1
223
- })) : o("", !0),
224
- a.tabItems?.length ? (t(), p(u(v), {
225
- key: 2,
226
- content: "插件工具",
227
- class: "mg-b-16 mg-t-34"
228
- })) : o("", !0),
229
- a.tabItems?.length ? (t(), p(u(J), {
230
- key: 3,
231
- modelValue: c.value,
232
- "onUpdate:modelValue": w[0] || (w[0] = (I) => c.value = I),
233
- options: a.tabItems.map((I) => ({
234
- label: I.interfaceName,
235
- value: I.bnid
236
- })),
237
- onChange: E,
238
- class: "mg-b-16"
239
- }, null, 8, ["modelValue", "options"])) : o("", !0),
234
+ })) : d("", !0),
240
235
  e.$slots.default || e.$slots.actions ? (t(), n("div", Q, [
241
- V("div", X, [
242
- b(e.$slots, "default", {}, () => [
243
- D(h(C.value?.description), 1)
236
+ S("div", X, [
237
+ v(e.$slots, "default", {}, () => [
238
+ D(h(y.value?.description), 1)
244
239
  ], !0)
245
240
  ]),
246
- V("div", Y, [
247
- b(e.$slots, "actions", {}, void 0, !0)
241
+ S("div", Y, [
242
+ v(e.$slots, "actions", {}, void 0, !0)
248
243
  ])
249
- ])) : o("", !0),
250
- a.showInputParams && a.tabItems?.length ? (t(), n(f, { key: 5 }, [
251
- S(u(v), {
244
+ ])) : d("", !0),
245
+ a.showInputParams && a.tabItems?.length ? (t(), n(f, { key: 4 }, [
246
+ P(p(V), {
252
247
  content: "输入参数",
253
- class: "mg-b-16"
248
+ class: "mg-b-16 mg-t-34"
254
249
  }),
255
- y.value?.paramsOuter ? (t(), p(O, {
250
+ g.value?.paramsOuter ? (t(), c(O, {
256
251
  key: 0,
257
- data: y.value.paramsOuter,
252
+ data: g.value.paramsOuter,
258
253
  "hide-columns": a.inputParamsHideColumns
259
- }, null, 8, ["data", "hide-columns"])) : o("", !0)
260
- ], 64)) : o("", !0),
261
- a.showOutputParams && a.tabItems?.length ? (t(), n(f, { key: 6 }, [
262
- S(u(v), {
254
+ }, null, 8, ["data", "hide-columns"])) : d("", !0)
255
+ ], 64)) : d("", !0),
256
+ a.showOutputParams && a.tabItems?.length ? (t(), n(f, { key: 5 }, [
257
+ P(p(V), {
263
258
  content: "输出参数",
264
259
  class: "mg-b-16 mg-t-34"
265
260
  }),
266
- y.value?.responseOuter ? (t(), p(O, {
261
+ g.value?.responseOuter ? (t(), c(O, {
267
262
  key: 0,
268
- data: y.value.responseOuter,
263
+ data: g.value.responseOuter,
269
264
  "hide-columns": a.outputParamsHideColumns
270
- }, null, 8, ["data", "hide-columns"])) : o("", !0)
271
- ], 64)) : o("", !0),
272
- b(e.$slots, "plugin-detail", {}, void 0, !0)
265
+ }, null, 8, ["data", "hide-columns"])) : d("", !0)
266
+ ], 64)) : d("", !0),
267
+ v(e.$slots, "plugin-detail", {}, void 0, !0)
273
268
  ], 64));
274
269
  }
275
- }), ee = /* @__PURE__ */ L(Z, [["__scopeId", "data-v-b8ced588"]]), oe = x(ee), ue = x(O);
270
+ }), ee = /* @__PURE__ */ L(Z, [["__scopeId", "data-v-70e5945d"]]), oe = x(ee), ue = x(O);
276
271
  export {
277
272
  oe as PluginDetail,
278
273
  ue as PluginDetailParamsTable,
@@ -1 +1 @@
1
- .hide-more[data-v-b8ced588]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.border-f0f0f0[data-v-b8ced588]{border:1px solid var(--neutral-color-6)}
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 +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"),d=require("color-star-custom-components"),g=require("color-star-custom-methods"),N=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js"),m={name:"name",type:"type",required:"required",description:"description"},S=[{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:()=>S},hideColumns:{type:Array,default:()=>[]}},setup(a){const n=a,k=e.computed(()=>{let l=n.data;if(typeof l=="string")try{l=JSON.parse(l)}catch(s){return console.error("解析参数数据失败:",s),[]}return!l||!Array.isArray(l)?[]:l}),r=e.computed(()=>!n.hideColumns||n.hideColumns.length===0?n.columns:n.columns.filter(l=>!n.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(r.value,o=>(e.openBlock(),e.createBlock(e.unref(y.ElTableColumn),{key:o.prop,prop:o.prop,label:o.label,width:o.width,"min-width":o.minWidth},{default:e.withCtx(({row:u})=>[o.prop==="required"?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(u.required?"required-yes":"required-no")},e.toDisplayString(u.required?"是":"否"),3)):o.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[o.prop]||"-"),1)],64))]),_:2},1032,["prop","label","width","min-width"]))),128))]),_:1},8,["data"]))}},T={key:0},P={key:1},D={key:4,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:n,emit:k}){const r=a,l=k,s=e.ref(!1),o=e.ref(!1),u=e.ref(null),i=e.ref(r.modelValue),p=e.computed(()=>!r.tabItems?.length||!i.value?null:r.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&&(o.value=t.scrollHeight>24)})},c=e.ref(null);return e.watch(()=>p.value?.bnid,t=>{t&&r.pluginDetailApi(t).then(f=>{c.value=f?.data?.[0]})},{immediate:!0}),e.watch(()=>r.modelValue,t=>{i.value=t}),e.watch(()=>r.tabItems,t=>{i.value=t?.[0]?.bnid},{immediate:!0}),e.watch(()=>r.description,()=>{b()},{immediate:!0}),e.onMounted(()=>{b()}),n({checkShowMoreBtn:b,currentTabItem:p}),(t,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.showIntro?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(d.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),e.createVNode(e.unref(d.CustomTitle),{content:"工具描述",class:"mg-b-16 mg-t-34"}),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(p.value?.description),1)],!0)],2),o.value?(e.openBlock(),e.createBlock(e.unref(y.ElButton),{key:1,type:"text",onClick:V},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("span",P,"收起")):(e.openBlock(),e.createElementBlock("span",T,"查看更多"))]),_:1})):e.createCommentVNode("",!0),a.tabItems?.length?(e.openBlock(),e.createBlock(e.unref(d.CustomTitle),{key:2,content:"插件工具",class:"mg-b-16 mg-t-34"})):e.createCommentVNode("",!0),a.tabItems?.length?(e.openBlock(),e.createBlock(e.unref(y.ElSegmented),{key:3,modelValue:i.value,"onUpdate:modelValue":f[0]||(f[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),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(p.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:5},[e.createVNode(e.unref(d.CustomTitle),{content:"输入参数",class:"mg-b-16"}),c.value?.paramsOuter?(e.openBlock(),e.createBlock(B,{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:6},[e.createVNode(e.unref(d.CustomTitle),{content:"输出参数",class:"mg-b-16 mg-t-34"}),c.value?.responseOuter?(e.openBlock(),e.createBlock(B,{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))}}),x=N._export_sfc(M,[["__scopeId","data-v-b8ced588"]]),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 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 +1 @@
1
- .hide-more[data-v-b8ced588]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.border-f0f0f0[data-v-b8ced588]{border:1px solid var(--neutral-color-6)}
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)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ling-yun-custom-components",
3
- "version": "0.0.64",
3
+ "version": "0.0.66",
4
4
  "keywords": [
5
5
  "component library",
6
6
  "ui framework",
@@ -184,11 +184,11 @@
184
184
  "peerDependencies": {
185
185
  "axios": "^1.8.2",
186
186
  "vue": "^3.5.25",
187
+ "color-message-aibox-vue": "0.0.75",
187
188
  "color-message-lingyun-vue": "0.0.30",
189
+ "color-star-custom-components": "0.0.10",
190
+ "color-star-custom-methods": "0.0.14",
188
191
  "color-star-atom-style": "0.0.2",
189
- "color-star-custom-methods": "0.0.11",
190
- "color-message-aibox-vue": "0.0.70",
191
- "color-star-custom-components": "0.0.7",
192
192
  "ling-yun-methods": "0.0.49"
193
193
  },
194
194
  "optionalDependencies": {