ling-yun-custom-components 0.0.58 → 0.0.59
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/PluginDetail.mjs +40 -40
- package/es/assets/PluginDetail.css +1 -1
- package/lib/PluginDetail.js +1 -1
- package/lib/assets/PluginDetail.css +1 -1
- package/package.json +1 -1
package/es/PluginDetail.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { w as x } from "./chunks/index.bCzIhWFw.js";
|
|
2
|
-
import { computed as B, createBlock as m, openBlock as t, unref as
|
|
3
|
-
import { ElTable as
|
|
2
|
+
import { computed as B, createBlock as m, openBlock as t, unref as D, withCtx as M, createElementBlock as n, Fragment as c, renderList as H, normalizeClass as $, toDisplayString as f, createTextVNode as A, ref as y, watch as I, onMounted as z, createCommentVNode as o, createVNode as P, createElementVNode as S, renderSlot as g, nextTick as _ } from "vue";
|
|
3
|
+
import { ElTable as R, ElTableColumn as j, ElButton as F, ElSegmented as J } from "element-plus";
|
|
4
4
|
import { C as b } from "./chunks/layout.BKJPyxR8.js";
|
|
5
|
-
import { emitsMap as
|
|
5
|
+
import { emitsMap as V } from "ling-yun-methods";
|
|
6
6
|
import { _ as L } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
7
7
|
import './assets/PluginDetail.css';const v = {
|
|
8
8
|
name: "name",
|
|
@@ -46,7 +46,7 @@ import './assets/PluginDetail.css';const v = {
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
setup(a) {
|
|
49
|
-
const u = a,
|
|
49
|
+
const u = a, T = B(() => {
|
|
50
50
|
let r = u.data;
|
|
51
51
|
if (typeof r == "string")
|
|
52
52
|
try {
|
|
@@ -56,14 +56,14 @@ import './assets/PluginDetail.css';const v = {
|
|
|
56
56
|
}
|
|
57
57
|
return !r || !Array.isArray(r) ? [] : r;
|
|
58
58
|
}), s = B(() => !u.hideColumns || u.hideColumns.length === 0 ? u.columns : u.columns.filter((r) => !u.hideColumns.includes(r.prop)));
|
|
59
|
-
return (r, i) => (t(), m(
|
|
60
|
-
data:
|
|
59
|
+
return (r, i) => (t(), m(D(R), {
|
|
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(c, null, H(s.value, (l) => (t(), m(
|
|
66
|
+
(t(!0), n(c, null, H(s.value, (l) => (t(), m(D(j), {
|
|
67
67
|
key: l.prop,
|
|
68
68
|
prop: l.prop,
|
|
69
69
|
label: l.label,
|
|
@@ -75,7 +75,7 @@ import './assets/PluginDetail.css';const v = {
|
|
|
75
75
|
key: 0,
|
|
76
76
|
class: $(d.required ? "required-yes" : "required-no")
|
|
77
77
|
}, f(d.required ? "是" : "否"), 3)) : l.prop === "type" ? (t(), n("span", W, f(d.type), 1)) : (t(), n(c, { key: 2 }, [
|
|
78
|
-
|
|
78
|
+
A(f(d[l.prop] || "-"), 1)
|
|
79
79
|
], 64))
|
|
80
80
|
]),
|
|
81
81
|
_: 2
|
|
@@ -140,38 +140,38 @@ import './assets/PluginDetail.css';const v = {
|
|
|
140
140
|
default: !0
|
|
141
141
|
}
|
|
142
142
|
},
|
|
143
|
-
emits: [
|
|
144
|
-
setup(a, { expose: u, emit:
|
|
145
|
-
const s = a, r =
|
|
143
|
+
emits: [V.updateModelValue, V.tabChange],
|
|
144
|
+
setup(a, { expose: u, emit: T }) {
|
|
145
|
+
const s = a, r = T, i = y(!1), l = y(!1), d = y(null), p = y(s.modelValue), k = B(() => !s.tabItems?.length || !p.value ? null : s.tabItems.find((e) => e.bnid == p.value) || null), N = () => {
|
|
146
146
|
i.value = !i.value;
|
|
147
147
|
}, E = (e) => {
|
|
148
|
-
r(
|
|
148
|
+
r(V.updateModelValue, e), r(V.tabChange, e);
|
|
149
149
|
}, q = () => {
|
|
150
|
-
|
|
150
|
+
_(() => {
|
|
151
151
|
const e = d.value;
|
|
152
152
|
e && (l.value = e.scrollHeight > 24);
|
|
153
153
|
});
|
|
154
154
|
}, h = y(null);
|
|
155
|
-
return
|
|
156
|
-
() =>
|
|
155
|
+
return I(
|
|
156
|
+
() => k.value?.bnid,
|
|
157
157
|
(e) => {
|
|
158
|
-
e && s.pluginDetailApi(e).then((
|
|
159
|
-
h.value =
|
|
158
|
+
e && s.pluginDetailApi(e).then((C) => {
|
|
159
|
+
h.value = C?.data?.[0];
|
|
160
160
|
});
|
|
161
161
|
},
|
|
162
162
|
{ immediate: !0 }
|
|
163
|
-
),
|
|
163
|
+
), I(
|
|
164
164
|
() => s.modelValue,
|
|
165
165
|
(e) => {
|
|
166
166
|
p.value = e;
|
|
167
167
|
}
|
|
168
|
-
),
|
|
168
|
+
), I(
|
|
169
169
|
() => s.tabItems,
|
|
170
170
|
(e) => {
|
|
171
171
|
p.value = e?.[0]?.bnid;
|
|
172
172
|
},
|
|
173
173
|
{ immediate: !0 }
|
|
174
|
-
),
|
|
174
|
+
), I(
|
|
175
175
|
() => s.description,
|
|
176
176
|
() => {
|
|
177
177
|
q();
|
|
@@ -181,37 +181,37 @@ import './assets/PluginDetail.css';const v = {
|
|
|
181
181
|
q();
|
|
182
182
|
}), u({
|
|
183
183
|
checkShowMoreBtn: q,
|
|
184
|
-
currentTabItem:
|
|
185
|
-
}), (e,
|
|
184
|
+
currentTabItem: k
|
|
185
|
+
}), (e, C) => (t(), n(c, null, [
|
|
186
186
|
a.showIntro ? (t(), n(c, { key: 0 }, [
|
|
187
|
-
|
|
187
|
+
P(b, {
|
|
188
188
|
content: "插件简介",
|
|
189
189
|
class: "mg-b-16"
|
|
190
190
|
}),
|
|
191
|
-
|
|
191
|
+
S("div", {
|
|
192
192
|
class: $(["weight-400 fz-16 text-666", i.value ? "" : "hide-more"]),
|
|
193
193
|
ref_key: "descRef",
|
|
194
194
|
ref: d
|
|
195
195
|
}, [
|
|
196
196
|
g(e.$slots, "intro", {}, () => [
|
|
197
|
-
|
|
197
|
+
A(f(a.intro), 1)
|
|
198
198
|
], !0)
|
|
199
199
|
], 2)
|
|
200
200
|
], 64)) : o("", !0),
|
|
201
|
-
|
|
201
|
+
P(b, {
|
|
202
202
|
content: "工具描述",
|
|
203
203
|
class: "mg-b-16 mg-t-34"
|
|
204
204
|
}),
|
|
205
|
-
|
|
205
|
+
S("div", {
|
|
206
206
|
class: $(["weight-400 fz-16 text-666", i.value ? "" : "hide-more"]),
|
|
207
207
|
ref_key: "descRef",
|
|
208
208
|
ref: d
|
|
209
209
|
}, [
|
|
210
210
|
g(e.$slots, "description", {}, () => [
|
|
211
|
-
|
|
211
|
+
A(f(k.value?.description), 1)
|
|
212
212
|
], !0)
|
|
213
213
|
], 2),
|
|
214
|
-
l.value ? (t(), m(
|
|
214
|
+
l.value ? (t(), m(D(F), {
|
|
215
215
|
key: 1,
|
|
216
216
|
type: "text",
|
|
217
217
|
onClick: N
|
|
@@ -226,29 +226,29 @@ import './assets/PluginDetail.css';const v = {
|
|
|
226
226
|
content: "插件工具",
|
|
227
227
|
class: "mg-b-16 mg-t-34"
|
|
228
228
|
})) : o("", !0),
|
|
229
|
-
a.tabItems?.length ? (t(), m(
|
|
229
|
+
a.tabItems?.length ? (t(), m(D(J), {
|
|
230
230
|
key: 3,
|
|
231
231
|
modelValue: p.value,
|
|
232
|
-
"onUpdate:modelValue":
|
|
233
|
-
options: a.tabItems.map((
|
|
234
|
-
label:
|
|
235
|
-
value:
|
|
232
|
+
"onUpdate:modelValue": C[0] || (C[0] = (w) => p.value = w),
|
|
233
|
+
options: a.tabItems.map((w) => ({
|
|
234
|
+
label: w.interfaceName,
|
|
235
|
+
value: w.bnid
|
|
236
236
|
})),
|
|
237
237
|
onChange: E,
|
|
238
238
|
class: "mg-b-16"
|
|
239
239
|
}, null, 8, ["modelValue", "options"])) : o("", !0),
|
|
240
240
|
e.$slots.default || e.$slots.actions ? (t(), n("div", Q, [
|
|
241
|
-
|
|
241
|
+
S("div", X, [
|
|
242
242
|
g(e.$slots, "default", {}, () => [
|
|
243
|
-
|
|
243
|
+
A(f(k.value?.description), 1)
|
|
244
244
|
], !0)
|
|
245
245
|
]),
|
|
246
|
-
|
|
246
|
+
S("div", Y, [
|
|
247
247
|
g(e.$slots, "actions", {}, void 0, !0)
|
|
248
248
|
])
|
|
249
249
|
])) : o("", !0),
|
|
250
250
|
a.showInputParams && a.tabItems?.length ? (t(), n(c, { key: 5 }, [
|
|
251
|
-
|
|
251
|
+
P(b, {
|
|
252
252
|
content: "输入参数",
|
|
253
253
|
class: "mg-b-16"
|
|
254
254
|
}),
|
|
@@ -259,7 +259,7 @@ import './assets/PluginDetail.css';const v = {
|
|
|
259
259
|
}, null, 8, ["data", "hide-columns"])) : o("", !0)
|
|
260
260
|
], 64)) : o("", !0),
|
|
261
261
|
a.showOutputParams && a.tabItems?.length ? (t(), n(c, { key: 6 }, [
|
|
262
|
-
|
|
262
|
+
P(b, {
|
|
263
263
|
content: "输出参数",
|
|
264
264
|
class: "mg-b-16 mg-t-34"
|
|
265
265
|
}),
|
|
@@ -272,7 +272,7 @@ import './assets/PluginDetail.css';const v = {
|
|
|
272
272
|
g(e.$slots, "plugin-detail", {}, void 0, !0)
|
|
273
273
|
], 64));
|
|
274
274
|
}
|
|
275
|
-
}), ee = /* @__PURE__ */ L(Z, [["__scopeId", "data-v-
|
|
275
|
+
}), ee = /* @__PURE__ */ L(Z, [["__scopeId", "data-v-0cfe9209"]]), oe = x(ee), ue = x(O);
|
|
276
276
|
export {
|
|
277
277
|
oe as PluginDetail,
|
|
278
278
|
ue as PluginDetailParamsTable,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.hide-more[data-v-
|
|
1
|
+
.hide-more[data-v-0cfe9209]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.border-f0f0f0[data-v-0cfe9209]{border:1px solid var(--neutral-color-6)}
|
package/lib/PluginDetail.js
CHANGED
|
@@ -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"),
|
|
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("./chunks/layout.B-T_NE6r.js"),g=require("ling-yun-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:i})=>[o.prop==="required"?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(i.required?"required-yes":"required-no")},e.toDisplayString(i.required?"是":"否"),3)):o.prop==="type"?(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(i.type),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(i[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),i=e.ref(null),u=e.ref(r.modelValue),p=e.computed(()=>!r.tabItems?.length||!u.value?null:r.tabItems.find(t=>t.bnid==u.value)||null),V=()=>{s.value=!s.value},w=t=>{l(g.emitsMap.updateModelValue,t),l(g.emitsMap.tabChange,t)},b=()=>{e.nextTick(()=>{const t=i.value;t&&(o.value=t.scrollHeight>24)})},c=e.ref(null);return e.watch(()=>p.value?.bnid,t=>{t&&r.pluginDetailApi(t).then(h=>{c.value=h?.data?.[0]})},{immediate:!0}),e.watch(()=>r.modelValue,t=>{u.value=t}),e.watch(()=>r.tabItems,t=>{u.value=t?.[0]?.bnid},{immediate:!0}),e.watch(()=>r.description,()=>{b()},{immediate:!0}),e.onMounted(()=>{b()}),n({checkShowMoreBtn:b,currentTabItem:p}),(t,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.showIntro?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(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:i},[e.renderSlot(t.$slots,"intro",{},()=>[e.createTextVNode(e.toDisplayString(a.intro),1)],!0)],2)],64)):e.createCommentVNode("",!0),e.createVNode(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:i},[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(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:u.value,"onUpdate:modelValue":h[0]||(h[0]=f=>u.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),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(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(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-0cfe9209"]]),v=C.withInstall(x),A=C.withInstall(B);exports.PluginDetail=v;exports.PluginDetailParamsTable=A;exports.default=v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.hide-more[data-v-
|
|
1
|
+
.hide-more[data-v-0cfe9209]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.border-f0f0f0[data-v-0cfe9209]{border:1px solid var(--neutral-color-6)}
|