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.
- package/es/AppIntro.mjs +2 -2
- package/es/BuildComponents.mjs +4 -4
- package/es/CustomDialog.mjs +1 -1
- package/es/CustomDropdown.mjs +3 -3
- package/es/CustomPagination.mjs +1 -1
- package/es/CustomTab.mjs +7 -7
- package/es/GradientButton.mjs +1 -1
- package/es/PageNotFound.mjs +2 -2
- package/es/PaginationTable.mjs +127 -126
- package/es/PluginDetail.mjs +85 -92
- package/es/UpdatePasswordDialog.mjs +3 -3
- package/es/assets/PaginationTable.css +1 -1
- package/es/assets/PluginDetail.css +1 -1
- package/es/chunks/{layout.BOupEsmd.js → layout.CCuN91wk.js} +2 -2
- package/es/chunks/{layout.BlsXj4-t.js → layout.Cr_l_XR4.js} +9 -9
- package/lib/PaginationTable.js +1 -1
- package/lib/PluginDetail.js +1 -1
- package/lib/assets/PaginationTable.css +1 -1
- package/lib/assets/PluginDetail.css +1 -1
- package/package.json +4 -4
- package/es/TreeSelect.mjs +0 -406
- package/es/TreeShowSelect.mjs +0 -82
- package/es/assets/TreeSelect.css +0 -1
- package/es/assets/TreeShowSelect.css +0 -1
- package/es/chunks/layout.Bhd1JJol.js +0 -99
- package/lib/TreeSelect.js +0 -1
- package/lib/TreeShowSelect.js +0 -1
- package/lib/assets/TreeSelect.css +0 -1
- package/lib/assets/TreeShowSelect.css +0 -1
- package/lib/chunks/layout.pjXXSBch.js +0 -1
package/es/PluginDetail.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { w as
|
|
2
|
-
import { computed as
|
|
3
|
-
import { ElTable as
|
|
4
|
-
import { CustomTitle as
|
|
5
|
-
import { emitsMap as
|
|
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
|
|
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:
|
|
15
|
+
prop: g.name
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
label: "参数类型",
|
|
19
|
-
prop:
|
|
19
|
+
prop: g.type
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
label: "必填",
|
|
23
|
-
prop:
|
|
23
|
+
prop: g.required
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
label: "描述",
|
|
27
|
-
prop:
|
|
27
|
+
prop: g.description
|
|
28
28
|
}
|
|
29
29
|
], W = {
|
|
30
30
|
key: 1,
|
|
31
31
|
class: "type-tag"
|
|
32
|
-
},
|
|
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,
|
|
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 =
|
|
59
|
-
return (r, u) => (t(), c(
|
|
60
|
-
data:
|
|
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:
|
|
66
|
-
(t(!0), n(
|
|
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:
|
|
73
|
+
default: B(({ row: i }) => [
|
|
74
74
|
l.prop === "required" ? (t(), n("span", {
|
|
75
75
|
key: 0,
|
|
76
|
-
class:
|
|
77
|
-
},
|
|
78
|
-
|
|
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: () => [
|
|
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: [
|
|
144
|
-
setup(a, { expose: s, emit:
|
|
145
|
-
const o = a, r =
|
|
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(
|
|
149
|
-
},
|
|
150
|
-
|
|
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
|
-
},
|
|
155
|
-
return
|
|
156
|
-
() =>
|
|
151
|
+
}, f = y(null);
|
|
152
|
+
return w(
|
|
153
|
+
() => v.value?.bnid,
|
|
157
154
|
(e) => {
|
|
158
|
-
e && o.pluginDetailApi(e).then((
|
|
159
|
-
|
|
155
|
+
e && o.pluginDetailApi(e).then((k) => {
|
|
156
|
+
f.value = k?.data?.[0];
|
|
160
157
|
});
|
|
161
158
|
},
|
|
162
159
|
{ immediate: !0 }
|
|
163
|
-
),
|
|
160
|
+
), w(
|
|
164
161
|
() => o.modelValue,
|
|
165
162
|
(e) => {
|
|
166
|
-
|
|
163
|
+
p.value = e;
|
|
167
164
|
}
|
|
168
|
-
),
|
|
165
|
+
), w(
|
|
169
166
|
() => o.tabItems,
|
|
170
167
|
(e) => {
|
|
171
|
-
|
|
168
|
+
p.value = e?.[0]?.bnid;
|
|
172
169
|
},
|
|
173
170
|
{ immediate: !0 }
|
|
174
|
-
),
|
|
175
|
-
() =>
|
|
171
|
+
), w(
|
|
172
|
+
() => v.value?.description,
|
|
176
173
|
() => {
|
|
177
|
-
|
|
174
|
+
T();
|
|
178
175
|
},
|
|
179
176
|
{ immediate: !0 }
|
|
180
|
-
),
|
|
181
|
-
|
|
177
|
+
), z(() => {
|
|
178
|
+
T();
|
|
182
179
|
}), s({
|
|
183
|
-
checkShowMoreBtn:
|
|
184
|
-
currentTabItem:
|
|
185
|
-
}), (e,
|
|
186
|
-
a.showIntro ? (t(), n(
|
|
187
|
-
|
|
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
|
-
|
|
192
|
-
class:
|
|
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
|
-
|
|
197
|
-
|
|
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(
|
|
198
|
+
a.tabItems?.length ? (t(), c(m(j), {
|
|
202
199
|
key: 1,
|
|
203
|
-
modelValue:
|
|
204
|
-
"onUpdate:modelValue":
|
|
205
|
-
options: a.tabItems.map((
|
|
206
|
-
label:
|
|
207
|
-
value:
|
|
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
|
-
|
|
209
|
+
I(m(S), {
|
|
213
210
|
content: "工具描述",
|
|
214
211
|
class: "mg-b-16"
|
|
215
212
|
}),
|
|
216
|
-
|
|
217
|
-
class:
|
|
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
|
-
|
|
222
|
-
|
|
218
|
+
P(e.$slots, "description", {}, () => [
|
|
219
|
+
M(b(v.value?.description), 1)
|
|
223
220
|
], !0)
|
|
224
221
|
], 2),
|
|
225
|
-
l.value ? (t(), c(
|
|
222
|
+
l.value ? (t(), c(m(J), {
|
|
226
223
|
key: 2,
|
|
227
224
|
type: "text",
|
|
228
|
-
onClick:
|
|
225
|
+
onClick: $
|
|
229
226
|
}, {
|
|
230
|
-
default:
|
|
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.
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
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
|
-
|
|
243
|
+
f.value?.paramsOuter ? (t(), c(x, {
|
|
251
244
|
key: 0,
|
|
252
|
-
data:
|
|
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(
|
|
257
|
-
|
|
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
|
-
|
|
254
|
+
f.value?.responseOuter ? (t(), c(x, {
|
|
262
255
|
key: 0,
|
|
263
|
-
data:
|
|
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
|
-
|
|
260
|
+
P(e.$slots, "plugin-detail", {}, void 0, !0)
|
|
268
261
|
], 64));
|
|
269
262
|
}
|
|
270
|
-
}),
|
|
263
|
+
}), X = /* @__PURE__ */ L(Q, [["__scopeId", "data-v-a48c6966"]]), le = N(X), ne = N(x);
|
|
271
264
|
export {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
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,
|
|
3
|
-
import { C as E } from "./chunks/layout.
|
|
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) => (
|
|
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-
|
|
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-
|
|
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,
|
|
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) => (
|
|
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,
|
|
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
|
-
])) :
|
|
174
|
+
])) : v(s.$slots, "header", { key: 1 }, void 0, !0)
|
|
175
175
|
]),
|
|
176
176
|
footer: r(() => [
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
v(s.$slots, "footer", {}, () => [
|
|
178
|
+
g("div", Y, [
|
|
179
179
|
u.dialogMode === a(t).PAGE ? (c(), y("div", Z, [
|
|
180
|
-
|
|
181
|
-
|
|
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
|
-
|
|
221
|
-
|
|
220
|
+
g("div", W, [
|
|
221
|
+
v(s.$slots, "default", {}, void 0, !0)
|
|
222
222
|
])
|
|
223
|
-
])) :
|
|
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"]));
|
package/lib/PaginationTable.js
CHANGED
|
@@ -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"),
|
|
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;
|
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
|
|
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-
|
|
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-
|
|
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.
|
|
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.
|
|
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.
|
|
188
|
+
"color-message-aibox-vue": "0.1.7",
|
|
189
189
|
"color-star-atom-style": "0.0.4",
|
|
190
|
-
"color-star-custom-components": "0.0.
|
|
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
|
},
|