aibox-custom-component-packages 0.0.33 → 0.0.34
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/CustomToggle.mjs +1 -1
- package/es/PageContainer.mjs +1 -1
- package/es/assets/CustomToggle.css +1 -1
- package/es/assets/PageContainer.css +1 -1
- package/es/chunks/CustomToggle.DKRF3u_m.js +190 -0
- package/es/chunks/PageContainer.Bf0DWQNo.js +462 -0
- package/es/index.mjs +2 -2
- package/lib/CustomToggle.js +1 -1
- package/lib/PageContainer.js +1 -1
- package/lib/assets/CustomToggle.css +1 -1
- package/lib/assets/PageContainer.css +1 -1
- package/lib/chunks/CustomToggle.HbP41BJh.js +1 -0
- package/lib/chunks/PageContainer.CE8Pz6hD.js +1 -0
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/es/CustomToggle.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./chunks/CustomToggle.
|
|
1
|
+
import { t as e } from "./chunks/CustomToggle.DKRF3u_m.js";
|
|
2
2
|
export { e as CustomToggle, e as default };
|
package/es/PageContainer.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as e, r as t, t as n } from "./chunks/field-types.xGpJxVGP.js";
|
|
2
|
-
import { t as r } from "./chunks/PageContainer.
|
|
2
|
+
import { t as r } from "./chunks/PageContainer.Bf0DWQNo.js";
|
|
3
3
|
export { n as COLUMN_TYPES, e as DIRECTION, t as MODES, r as PageContainer, r as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.visible-options[data-v-
|
|
1
|
+
.visible-options[data-v-bb39a829]::-webkit-scrollbar{height:0}.toggle-item[data-v-bb39a829]{color:var(--text-color-3);background:var(--background-color-3);border-bottom:1px solid var(--border-color);height:48px;line-height:48px}.toggle-item.active[data-v-bb39a829]{color:var(--primary-color-1);background:var(--background-color-2);border-bottom:none;border-left:1px solid var(--border-color);border-right:1px solid var(--border-color)}.toggle-item.active .order-number[data-v-bb39a829]{background:var(--primary-color-1);color:var(--background-color-2)}.toggle-item.first-active[data-v-bb39a829]{border-left:none}.toggle-item.last-active[data-v-bb39a829]{border-right:none}.toggle-item.toggle-action[data-v-bb39a829]{color:var(--text-color-3);border-left:1px solid var(--border-color);width:48px}.order-number[data-v-bb39a829]{background:var(--text-color-4);color:var(--text-color-2);border-radius:50%;line-height:20px}.divider[data-v-bb39a829]{color:var(--border-color);position:absolute;right:0}.toggle-style-2[data-v-bb39a829]{align-items:center;height:32px;display:inline-flex;width:auto!important}.toggle-style-2 .visible-options[data-v-bb39a829]{flex:unset;align-items:center;display:inline-flex;overflow:visible}.toggle-style-2 .toggle-item[data-v-bb39a829]{color:#606266;white-space:nowrap;background:0 0;border:none;border-radius:4px;height:auto;padding:6px 16px;font-size:14px;line-height:normal;transition:all .3s;width:auto!important}.toggle-style-2 .toggle-item[data-v-bb39a829]:hover{color:var(--el-color-primary);background-color:#f0f2f5}.toggle-style-2 .toggle-item.active[data-v-bb39a829]{color:#262626;background:#f5f7fa;border:none;font-weight:500}.toggle-style-2 .divider[data-v-bb39a829]{display:none}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.search-section[data-v-
|
|
1
|
+
.search-section[data-v-c48474f1]{border-bottom:1px solid var(--border-color)}.action-buttons[data-v-c48474f1]{flex-wrap:wrap;gap:8px}.bg-fff[data-v-c48474f1]{background-color:var(--background-color-2);border:1px solid var(--border-color)}.card-list[data-v-c48474f1]{grid-template-columns:repeat(auto-fill,minmax(306px,1fr));gap:16px;display:grid}[data-v-c48474f1] .el-table__expand-column .el-icon{display:none}[data-v-c48474f1] .el-table__cell.el-table__expanded-cell{position:relative}[data-v-c48474f1] .el-table__cell.el-table__expanded-cell .sticky-left{z-index:10;position:sticky;top:0;left:0}.loading-indicator .is-loading[data-v-c48474f1]{animation:2s linear infinite rotating-c48474f1}@keyframes rotating-c48474f1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}[data-v-c48474f1] .el-popper{max-width:300px}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { t as e } from "./withinstall.CMngc-br.js";
|
|
2
|
+
import { t } from "./_plugin-vue_export-helper.B3ysoDQm.js";
|
|
3
|
+
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, nextTick as u, normalizeClass as d, normalizeStyle as f, onMounted as p, openBlock as m, ref as h, renderList as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
|
|
4
|
+
import { ElDropdown as b, ElDropdownItem as x, ElDropdownMenu as S, ElIcon as C } from "element-plus";
|
|
5
|
+
import { IconZuoCopy as w } from "color-message-aibox-vue";
|
|
6
|
+
import { useRoute as T } from "vue-router";
|
|
7
|
+
import { emitsMap as E } from "color-star-custom-methods";
|
|
8
|
+
import '../assets/CustomToggle.css';//#region components/CustomToggle/config.js
|
|
9
|
+
var D = (e) => `${e}-custom-toggle`, ee = [
|
|
10
|
+
"id",
|
|
11
|
+
"data-option-value",
|
|
12
|
+
"onClick"
|
|
13
|
+
], O = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "order-number fz-12 text-center mg-r-10 pd-l-8 pd-r-8"
|
|
16
|
+
}, k = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "divider"
|
|
19
|
+
}, A = { class: "toggle-item toggle-action flex items-center justify-center weight-500" }, j = { class: "dropdown-label" }, M = /*@__PURE__*/ Object.assign({ name: "CustomToggle" }, {
|
|
20
|
+
__name: "layout",
|
|
21
|
+
props: {
|
|
22
|
+
options: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default: () => []
|
|
25
|
+
},
|
|
26
|
+
modelValue: {
|
|
27
|
+
type: [
|
|
28
|
+
String,
|
|
29
|
+
Number,
|
|
30
|
+
Object
|
|
31
|
+
],
|
|
32
|
+
default: null
|
|
33
|
+
},
|
|
34
|
+
maxVisible: {
|
|
35
|
+
type: Number,
|
|
36
|
+
default: void 0
|
|
37
|
+
},
|
|
38
|
+
fieldMapping: {
|
|
39
|
+
type: Object,
|
|
40
|
+
default: () => ({
|
|
41
|
+
value: "value",
|
|
42
|
+
label: "label"
|
|
43
|
+
})
|
|
44
|
+
},
|
|
45
|
+
showOrderNumber: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: !1
|
|
48
|
+
},
|
|
49
|
+
styleType: {
|
|
50
|
+
type: [Number, String],
|
|
51
|
+
default: 1
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
emits: [E.updateModelValue, E.change],
|
|
55
|
+
setup(e, { emit: t }) {
|
|
56
|
+
let M = e, N = t, P = h(null), F = T(), I = r(() => D(F.name)), L = () => {
|
|
57
|
+
try {
|
|
58
|
+
let e = sessionStorage.getItem(I.value);
|
|
59
|
+
if (e && M.options.length > 0 && M.options.some((t, n) => String(K(t, n)) === String(e))) return e;
|
|
60
|
+
} catch {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
return null;
|
|
64
|
+
}, R = (e) => {
|
|
65
|
+
sessionStorage.setItem(I.value, e);
|
|
66
|
+
}, z = [], B = r(() => M.maxVisible === void 0 ? M.options.length : M.maxVisible), V = r(() => W.value.length > 0);
|
|
67
|
+
r(() => W.value.length);
|
|
68
|
+
let H = r(() => {
|
|
69
|
+
if (!M.modelValue || M.options.length <= B.value) {
|
|
70
|
+
let e = M.options.slice(0, B.value);
|
|
71
|
+
return z = e, e;
|
|
72
|
+
}
|
|
73
|
+
let e = M.options.findIndex((e, t) => K(e, t) === M.modelValue);
|
|
74
|
+
if (e === -1) {
|
|
75
|
+
let e = M.options.slice(0, B.value);
|
|
76
|
+
return z = e, e;
|
|
77
|
+
}
|
|
78
|
+
if (z.map((e, t) => K(e, t)).includes(M.modelValue) && z.length > 0) return z;
|
|
79
|
+
let t = Math.max(0, e - B.value + 1), n = Math.min(M.options.length, t + B.value), r = M.options.slice(t, n);
|
|
80
|
+
return z = r, r;
|
|
81
|
+
}), U = r(() => `${100 / B.value}%`), W = r(() => {
|
|
82
|
+
let e = new Set(H.value.map((e, t) => K(e, t)));
|
|
83
|
+
return M.options.filter((t, n) => {
|
|
84
|
+
let r = K(t, n);
|
|
85
|
+
return !e.has(r);
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
r(() => M.options.slice(0, B.value));
|
|
89
|
+
let G = () => {
|
|
90
|
+
if (!M.options?.length) return;
|
|
91
|
+
let e = M.modelValue;
|
|
92
|
+
if (e != null && e !== "" && M.options.some((t, n) => String(K(t, n)) === String(e))) {
|
|
93
|
+
R(String(e));
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
let t = L();
|
|
97
|
+
if (t !== null) {
|
|
98
|
+
let e = M.options.findIndex((e, n) => String(K(e, n)) === String(t));
|
|
99
|
+
if (e >= 0) {
|
|
100
|
+
$(K(M.options[e], e));
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
let n = M.options[0], r = K(n, 0);
|
|
105
|
+
$(r);
|
|
106
|
+
}, K = (e, t) => {
|
|
107
|
+
if (typeof e == "object" && e) {
|
|
108
|
+
let n = M.fieldMapping.value;
|
|
109
|
+
return e[n] === void 0 ? t : e[n];
|
|
110
|
+
}
|
|
111
|
+
return e;
|
|
112
|
+
}, q = (e) => {
|
|
113
|
+
if (typeof e == "object" && e) {
|
|
114
|
+
let t = M.fieldMapping.label, n = M.fieldMapping.value;
|
|
115
|
+
return e[t] || e[n] || e;
|
|
116
|
+
}
|
|
117
|
+
return e;
|
|
118
|
+
}, J = (e, t) => {
|
|
119
|
+
let n = K(e, t);
|
|
120
|
+
return M.options.findIndex((e, t) => K(e, t) === n) + 1;
|
|
121
|
+
}, Y = (e, t) => K(e, t) === M.modelValue, X = (e, t) => {
|
|
122
|
+
if (t >= H.value.length - 1 || Y(e, t)) return !1;
|
|
123
|
+
let n = H.value.findIndex((e, t) => Y(e, t));
|
|
124
|
+
return n !== -1 && t !== n - 1;
|
|
125
|
+
}, Z = (e, t) => {
|
|
126
|
+
let n = K(e, t);
|
|
127
|
+
$(n);
|
|
128
|
+
}, Q = (e) => {
|
|
129
|
+
$(e), setTimeout(() => {
|
|
130
|
+
te(e);
|
|
131
|
+
}, 50);
|
|
132
|
+
}, te = (e) => {
|
|
133
|
+
let t = `toggle-option-${e}`, n = document.getElementById(t);
|
|
134
|
+
n && n.scrollIntoView({
|
|
135
|
+
behavior: "smooth",
|
|
136
|
+
block: "nearest",
|
|
137
|
+
inline: "center"
|
|
138
|
+
});
|
|
139
|
+
}, $ = (e) => {
|
|
140
|
+
R(e), N(E.updateModelValue, e), u(() => {
|
|
141
|
+
N(E.change, e);
|
|
142
|
+
});
|
|
143
|
+
};
|
|
144
|
+
return p(() => {
|
|
145
|
+
G();
|
|
146
|
+
}), (t, r) => (m(), o("div", { class: d(["toggle-container flex w-full relative", `toggle-style-${e.styleType}`]) }, [s("div", {
|
|
147
|
+
ref_key: "optionsContainer",
|
|
148
|
+
ref: P,
|
|
149
|
+
class: "visible-options flex-1 overflow-x-auto overflow-y-hidden relative flex"
|
|
150
|
+
}, [(m(!0), o(n, null, g(H.value, (e, t) => (m(), o("div", {
|
|
151
|
+
key: K(e, t),
|
|
152
|
+
id: `toggle-option-${K(e, t)}`,
|
|
153
|
+
"data-option-value": K(e, t),
|
|
154
|
+
class: d(["toggle-item pointer text-center flex items-center justify-center ellipsis-1 relative pointer", {
|
|
155
|
+
active: Y(e, t),
|
|
156
|
+
"first-active": Y(e, t) && t === 0,
|
|
157
|
+
"last-active": Y(e, t) && t === H.value.length - 1
|
|
158
|
+
}]),
|
|
159
|
+
style: f({ width: U.value }),
|
|
160
|
+
onClick: (n) => Z(e, t)
|
|
161
|
+
}, [
|
|
162
|
+
M.showOrderNumber ? (m(), o("div", O, _(J(e, t)), 1)) : a("", !0),
|
|
163
|
+
c(" " + _(q(e)) + " ", 1),
|
|
164
|
+
X(e, t) ? (m(), o("span", k, "|")) : a("", !0)
|
|
165
|
+
], 14, ee))), 128))], 512), V.value ? (m(), i(v(b), {
|
|
166
|
+
key: 0,
|
|
167
|
+
trigger: "click",
|
|
168
|
+
onCommand: Q
|
|
169
|
+
}, {
|
|
170
|
+
dropdown: y(() => [l(v(S), null, {
|
|
171
|
+
default: y(() => [(m(!0), o(n, null, g(W.value, (e, t) => (m(), i(v(x), {
|
|
172
|
+
key: K(e, t),
|
|
173
|
+
command: K(e, t),
|
|
174
|
+
class: d({ "is-active": Y(e, t) })
|
|
175
|
+
}, {
|
|
176
|
+
default: y(() => [s("span", j, _(q(e)), 1)]),
|
|
177
|
+
_: 2
|
|
178
|
+
}, 1032, ["command", "class"]))), 128))]),
|
|
179
|
+
_: 1
|
|
180
|
+
})]),
|
|
181
|
+
default: y(() => [s("div", A, [l(v(C), null, {
|
|
182
|
+
default: y(() => [l(v(w))]),
|
|
183
|
+
_: 1
|
|
184
|
+
})])]),
|
|
185
|
+
_: 1
|
|
186
|
+
})) : a("", !0)], 2));
|
|
187
|
+
}
|
|
188
|
+
}), N = e(/* @__PURE__ */ t(M, [["__scopeId", "data-v-bb39a829"]]));
|
|
189
|
+
//#endregion
|
|
190
|
+
export { N as t };
|
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
import { t as e } from "./withinstall.CMngc-br.js";
|
|
2
|
+
import { t } from "./_plugin-vue_export-helper.B3ysoDQm.js";
|
|
3
|
+
import { t as n } from "./layout.CUSAJyQL.js";
|
|
4
|
+
import { n as r, r as i, t as a } from "./field-types.xGpJxVGP.js";
|
|
5
|
+
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createSlots as f, createTextVNode as p, createVNode as m, guardReactiveProps as ee, mergeProps as h, normalizeClass as g, normalizeProps as te, normalizeStyle as ne, onMounted as re, openBlock as _, ref as v, renderList as y, renderSlot as b, resolveDynamicComponent as ie, toDisplayString as x, toHandlers as ae, unref as S, useSlots as oe, watch as C, withCtx as w, withModifiers as T } from "vue";
|
|
6
|
+
import { ElAutoResizer as se, ElButton as ce, ElDropdown as le, ElDropdownItem as ue, ElDropdownMenu as de, ElIcon as E, ElPagination as fe, ElScrollbar as pe, ElTable as me, ElTableColumn as D } from "element-plus";
|
|
7
|
+
import { IconMore as he, IconYou as ge, IconZuo as _e, IconZuoCopy as ve, Loading as ye } from "color-message-aibox-vue";
|
|
8
|
+
import { IconEmpty as be, SearchBar as xe } from "color-star-custom-components";
|
|
9
|
+
import { useRouter as Se } from "vue-router";
|
|
10
|
+
import { emitsMap as O, operationConfigMap as k, pageParams as A, paginationConfig as j } from "color-star-custom-methods";
|
|
11
|
+
import '../assets/PageContainer.css';//#region components/PageContainer/layout.vue
|
|
12
|
+
var Ce = { class: "page-container flex flex-col overflow-hidden h-full" }, we = { class: "text-1f2329 pd-l-4" }, Te = { class: "action-buttons flex items-center" }, Ee = { class: "flex items-center w-full" }, De = { class: "flex-1" }, Oe = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "flex items-center justify-center w-full"
|
|
15
|
+
}, ke = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "card-list"
|
|
18
|
+
}, Ae = {
|
|
19
|
+
key: 2,
|
|
20
|
+
class: "loading-indicator flex items-center justify-center pd-t-20 pd-b-20"
|
|
21
|
+
}, je = {
|
|
22
|
+
key: 3,
|
|
23
|
+
class: "pagination-section pd-t-16 flex justify-center"
|
|
24
|
+
}, M = /*@__PURE__*/ Object.assign({ name: "PageContainer" }, {
|
|
25
|
+
__name: "layout",
|
|
26
|
+
props: {
|
|
27
|
+
breadcrumb: {
|
|
28
|
+
type: Object,
|
|
29
|
+
default: () => ({
|
|
30
|
+
show: !1,
|
|
31
|
+
text: ""
|
|
32
|
+
})
|
|
33
|
+
},
|
|
34
|
+
title: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: ""
|
|
37
|
+
},
|
|
38
|
+
searchFields: {
|
|
39
|
+
type: Array,
|
|
40
|
+
default: () => []
|
|
41
|
+
},
|
|
42
|
+
modelValue: {
|
|
43
|
+
type: Object,
|
|
44
|
+
default: () => ({})
|
|
45
|
+
},
|
|
46
|
+
columns: {
|
|
47
|
+
type: Array,
|
|
48
|
+
default: () => []
|
|
49
|
+
},
|
|
50
|
+
tableData: {
|
|
51
|
+
type: Array,
|
|
52
|
+
default: () => []
|
|
53
|
+
},
|
|
54
|
+
tableProps: {
|
|
55
|
+
type: Object,
|
|
56
|
+
default: () => ({
|
|
57
|
+
stripe: !0,
|
|
58
|
+
border: !1
|
|
59
|
+
})
|
|
60
|
+
},
|
|
61
|
+
treeProps: {
|
|
62
|
+
type: Object,
|
|
63
|
+
default: () => ({})
|
|
64
|
+
},
|
|
65
|
+
tableEvents: {
|
|
66
|
+
type: Object,
|
|
67
|
+
default: () => ({})
|
|
68
|
+
},
|
|
69
|
+
showPagination: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: !0
|
|
72
|
+
},
|
|
73
|
+
pagination: {
|
|
74
|
+
type: Object,
|
|
75
|
+
default: () => ({
|
|
76
|
+
page: A.pageNum,
|
|
77
|
+
size: A.pageSize,
|
|
78
|
+
total: 0,
|
|
79
|
+
pageSizes: j.pageSizes,
|
|
80
|
+
layout: j.layout
|
|
81
|
+
})
|
|
82
|
+
},
|
|
83
|
+
customSlots: {
|
|
84
|
+
type: Array,
|
|
85
|
+
default: () => []
|
|
86
|
+
},
|
|
87
|
+
api: {
|
|
88
|
+
type: Function,
|
|
89
|
+
default: null
|
|
90
|
+
},
|
|
91
|
+
autoLoad: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: !0
|
|
94
|
+
},
|
|
95
|
+
apiParams: {
|
|
96
|
+
type: Object,
|
|
97
|
+
default: () => ({})
|
|
98
|
+
},
|
|
99
|
+
isSeparate: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
default: !1
|
|
102
|
+
},
|
|
103
|
+
minWidth: {
|
|
104
|
+
type: Number,
|
|
105
|
+
default: 290
|
|
106
|
+
},
|
|
107
|
+
mode: {
|
|
108
|
+
type: String,
|
|
109
|
+
default: i.TABLE,
|
|
110
|
+
validator: (e) => Object.values(i).includes(e)
|
|
111
|
+
},
|
|
112
|
+
showSelection: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
default: !1
|
|
115
|
+
},
|
|
116
|
+
selection: {
|
|
117
|
+
type: Array,
|
|
118
|
+
default: () => []
|
|
119
|
+
},
|
|
120
|
+
hasExpand: {
|
|
121
|
+
type: Boolean,
|
|
122
|
+
default: !1
|
|
123
|
+
},
|
|
124
|
+
requestParamsCallback: {
|
|
125
|
+
type: Function,
|
|
126
|
+
default: null
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
emits: [
|
|
130
|
+
O.search,
|
|
131
|
+
O.reset,
|
|
132
|
+
O.actionClick,
|
|
133
|
+
O.paginationChange,
|
|
134
|
+
O.sizeChange,
|
|
135
|
+
O.dataLoaded,
|
|
136
|
+
O.dataError,
|
|
137
|
+
O.updateModelValue,
|
|
138
|
+
"selection-change",
|
|
139
|
+
"expand-change"
|
|
140
|
+
],
|
|
141
|
+
setup(e, { expose: t, emit: M }) {
|
|
142
|
+
let N = Se(), P = e, F = M, Me = v(null), I = v(null), Ne = v(null), Pe = oe(), L = v(!1), R = v([]), z = v({
|
|
143
|
+
page: A.pageNum,
|
|
144
|
+
size: A.pageSize,
|
|
145
|
+
total: 0,
|
|
146
|
+
pageSizes: j.pageSizes,
|
|
147
|
+
layout: j.layout
|
|
148
|
+
}), B = 0, V = v({ ...P.modelValue }), H = v(!1), U = v(!0), W = v([...P.selection]), G = v([...P.tableProps?.expandRowKeys || []]), K = s(() => P.api ? R.value : P.tableData), q = s(() => P.api ? z.value : P.pagination), J = s(() => P.api ? L.value || H.value : P.tableProps.loading || H.value || !1), Y = s(() => P.mode === i.CARD_INFINITE), X = s(() => P.columns?.map((e) => {
|
|
149
|
+
if (e.type === a.ACTION && (Array.isArray(e.actions) || typeof e.actions == "function")) return {
|
|
150
|
+
...e,
|
|
151
|
+
align: "center",
|
|
152
|
+
fixed: "right"
|
|
153
|
+
};
|
|
154
|
+
let { width: t, ...n } = e;
|
|
155
|
+
return {
|
|
156
|
+
...n,
|
|
157
|
+
minWidth: t
|
|
158
|
+
};
|
|
159
|
+
})), Fe = (e) => {
|
|
160
|
+
e === r.BOTTOM && (!Y.value || !U.value || J.value || $({}, !0));
|
|
161
|
+
}, Ie = (e, t) => e.id || e.bnid || e.key || `item-${t}`, Le = () => {
|
|
162
|
+
N.back();
|
|
163
|
+
}, Re = (e) => {
|
|
164
|
+
let t = e[P.tableProps?.rowKey];
|
|
165
|
+
G.value.includes(t) ? G.value = G.value.filter((e) => e !== t) : G.value.push(t);
|
|
166
|
+
}, ze = (e, t) => t.formatter ? t.formatter(e[t.prop], e, t) : e[t.prop], Be = (e) => Pe[e] !== void 0, Z = (e, t) => typeof e.actions == "function" ? e.actions(t) || [] : e.actions || [], Ve = (e) => e.length < 3 ? e : e.slice(0, 1), Q = (e) => e.length < 3 ? [] : e.slice(1), $ = (e = {}, t = !1) => {
|
|
167
|
+
if (!P.api) return;
|
|
168
|
+
if (t) {
|
|
169
|
+
if (!U.value || H.value) return;
|
|
170
|
+
H.value = !0;
|
|
171
|
+
} else L.value = !0, Y.value && (U.value = !0, H.value = !1);
|
|
172
|
+
let n = {};
|
|
173
|
+
typeof P.requestParamsCallback == "function" && (n = P.requestParamsCallback(V.value, P.apiParams));
|
|
174
|
+
let r = {
|
|
175
|
+
...e,
|
|
176
|
+
...P.apiParams,
|
|
177
|
+
...V.value,
|
|
178
|
+
...n
|
|
179
|
+
};
|
|
180
|
+
P.showPagination && (r.page = t ? q.value.page + 1 : q.value.page, r.size = q.value.size), console.log("requestParams", r?.publishStatus);
|
|
181
|
+
let i = ++B;
|
|
182
|
+
P.api(r).then((e) => {
|
|
183
|
+
if (i !== B) return;
|
|
184
|
+
let n = e?.data?.memberSo?.data || e?.data?.data || e?.data || [];
|
|
185
|
+
if (console.log("newData", n), t) {
|
|
186
|
+
if (!n || n.length === 0) {
|
|
187
|
+
U.value = !1;
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
R.value = [...R.value, ...n], z.value.page = r.page, z.value.total = e?.data?.memberSo?.total || e?.data?.total || R.value.length, n.length < q.value.size && (U.value = !1);
|
|
191
|
+
} else R.value = n, z.value.total = e?.data?.memberSo?.total || e?.data?.total || 0;
|
|
192
|
+
F(O.dataLoaded, {
|
|
193
|
+
data: R.value,
|
|
194
|
+
pagination: z.value,
|
|
195
|
+
params: r,
|
|
196
|
+
response: e?.data,
|
|
197
|
+
isLoadMore: t
|
|
198
|
+
});
|
|
199
|
+
}).catch((e) => {
|
|
200
|
+
i === B && (t ? U.value = !1 : (R.value = [], z.value.total = 0), F(O.dataError, e));
|
|
201
|
+
}).finally(() => {
|
|
202
|
+
i === B && (t ? H.value = !1 : L.value = !1);
|
|
203
|
+
});
|
|
204
|
+
}, He = () => {
|
|
205
|
+
P.mode === i.CARD_INFINITE && (R.value = []);
|
|
206
|
+
}, Ue = () => {
|
|
207
|
+
P.api ? (He(), z.value.page = A.pageNum, $()) : F(O.search, V.value);
|
|
208
|
+
}, We = () => {
|
|
209
|
+
let e = {};
|
|
210
|
+
Object.keys(V.value).forEach((t) => {
|
|
211
|
+
e[t] = void 0;
|
|
212
|
+
}), V.value = e, P.api ? (He(), z.value.page = A.pageNum, $()) : F(O.reset);
|
|
213
|
+
}, Ge = (e, t, n) => {
|
|
214
|
+
F(O.actionClick, {
|
|
215
|
+
action: e,
|
|
216
|
+
row: t,
|
|
217
|
+
index: n
|
|
218
|
+
});
|
|
219
|
+
}, Ke = (e) => {
|
|
220
|
+
W.value = e, F("selection-change", e);
|
|
221
|
+
}, qe = (e, t) => {
|
|
222
|
+
switch (e) {
|
|
223
|
+
case k.search:
|
|
224
|
+
Ue();
|
|
225
|
+
break;
|
|
226
|
+
case k.reset: We();
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
return C(() => P.modelValue, (e) => {
|
|
230
|
+
V.value = { ...e };
|
|
231
|
+
}, {
|
|
232
|
+
deep: !0,
|
|
233
|
+
immediate: !0
|
|
234
|
+
}), C(() => P.selection, (e) => {
|
|
235
|
+
W.value = [...e];
|
|
236
|
+
}, {
|
|
237
|
+
deep: !0,
|
|
238
|
+
immediate: !0
|
|
239
|
+
}), C(() => P.tableProps?.expandRowKeys, (e) => {
|
|
240
|
+
e && (G.value = [...e]);
|
|
241
|
+
}, {
|
|
242
|
+
deep: !0,
|
|
243
|
+
immediate: !0
|
|
244
|
+
}), C(() => G.value, (e) => {
|
|
245
|
+
F("expand-change", e);
|
|
246
|
+
}, { deep: !0 }), C(() => V.value, (e) => {
|
|
247
|
+
F(O.updateModelValue, { ...e });
|
|
248
|
+
}, { deep: !0 }), re(() => {
|
|
249
|
+
P.autoLoad && P.api && $();
|
|
250
|
+
}), t({
|
|
251
|
+
loadData: $,
|
|
252
|
+
handleSearch: Ue,
|
|
253
|
+
handleReset: We,
|
|
254
|
+
clearSelection: () => I.value?.clearSelection?.(),
|
|
255
|
+
toggleAllSelection: () => I.value?.toggleAllSelection?.(),
|
|
256
|
+
getSelectionRows: () => W.value
|
|
257
|
+
}), (t, r) => (_(), u("div", Ce, [
|
|
258
|
+
e.breadcrumb.show ? (_(), u("div", {
|
|
259
|
+
key: 0,
|
|
260
|
+
class: "flex items-center fz-14 pd-b-20 pointer",
|
|
261
|
+
onClick: Le
|
|
262
|
+
}, [m(S(E), { size: 16 }, {
|
|
263
|
+
default: w(() => [(_(), c(ie(e.breadcrumb.icon || S(_e))))]),
|
|
264
|
+
_: 1
|
|
265
|
+
}), d("span", we, x(e.breadcrumb.text), 1)])) : l("", !0),
|
|
266
|
+
e.searchFields?.length ? (_(), u("div", {
|
|
267
|
+
key: 1,
|
|
268
|
+
class: g({
|
|
269
|
+
"search-section pd-b-16 mg-b-16": !e.isSeparate,
|
|
270
|
+
"bg-fff radius-4 pd-l-16 pd-r-16 pd-t-16 pd-b-16": e.isSeparate
|
|
271
|
+
})
|
|
272
|
+
}, [m(n, { title: "查询" }), m(S(xe), {
|
|
273
|
+
ref_key: "searchFormRef",
|
|
274
|
+
ref: Me,
|
|
275
|
+
items: e.searchFields,
|
|
276
|
+
"filter-mode": !1,
|
|
277
|
+
minWidth: e.minWidth,
|
|
278
|
+
hideExpandButton: !1,
|
|
279
|
+
fixedWidth: !0,
|
|
280
|
+
maxHeight: 32,
|
|
281
|
+
modelValue: V.value,
|
|
282
|
+
"onUpdate:modelValue": r[0] ||= (e) => V.value = e,
|
|
283
|
+
onOperation: qe
|
|
284
|
+
}, null, 8, [
|
|
285
|
+
"items",
|
|
286
|
+
"minWidth",
|
|
287
|
+
"modelValue"
|
|
288
|
+
])], 2)) : l("", !0),
|
|
289
|
+
d("div", { class: g(["data-section flex-1 overflow-hidden flex flex-col", { "bg-fff radius-4 pd-l-16 pd-r-16 pd-t-16 pd-b-16 mg-t-16": e.isSeparate }]) }, [
|
|
290
|
+
e.title ? b(t.$slots, "title", {}, () => [m(n, { title: e.title }, {
|
|
291
|
+
default: w(() => [b(t.$slots, "title-actions", {}, void 0, !0)]),
|
|
292
|
+
_: 3
|
|
293
|
+
}, 8, ["title"])], !0, 0) : l("", !0),
|
|
294
|
+
e.mode === S(i).TABLE ? (_(), c(S(se), {
|
|
295
|
+
key: 1,
|
|
296
|
+
class: "flex-1 overflow-hidden"
|
|
297
|
+
}, {
|
|
298
|
+
default: w(({ width: n }) => [m(S(me), h({
|
|
299
|
+
ref_key: "tableRef",
|
|
300
|
+
ref: I,
|
|
301
|
+
data: K.value,
|
|
302
|
+
columns: X.value,
|
|
303
|
+
"tree-props": e.treeProps,
|
|
304
|
+
"show-overflow-tooltip": !0,
|
|
305
|
+
"row-key": e.treeProps.value || e.tableProps?.rowKey
|
|
306
|
+
}, {
|
|
307
|
+
loading: J.value,
|
|
308
|
+
expandRowKeys: G.value,
|
|
309
|
+
...e.tableProps
|
|
310
|
+
}, ae(e.tableEvents), {
|
|
311
|
+
class: "w-full h-full admin-dashboard-table",
|
|
312
|
+
border: "",
|
|
313
|
+
onSelectionChange: Ke
|
|
314
|
+
}), f({
|
|
315
|
+
default: w(() => [
|
|
316
|
+
e.showSelection ? (_(), c(S(D), {
|
|
317
|
+
key: 0,
|
|
318
|
+
type: "selection",
|
|
319
|
+
width: "55",
|
|
320
|
+
fixed: "left"
|
|
321
|
+
})) : l("", !0),
|
|
322
|
+
e.hasExpand ? (_(), c(S(D), {
|
|
323
|
+
key: 1,
|
|
324
|
+
width: "1",
|
|
325
|
+
type: "expand",
|
|
326
|
+
fixed: "left"
|
|
327
|
+
}, {
|
|
328
|
+
default: w((e) => [d("div", {
|
|
329
|
+
class: "sticky-left",
|
|
330
|
+
style: ne({ width: n + "px" })
|
|
331
|
+
}, [b(t.$slots, "expand", { row: e.row }, void 0, !0)], 4)]),
|
|
332
|
+
_: 2
|
|
333
|
+
}, 1024)) : l("", !0),
|
|
334
|
+
(_(!0), u(o, null, y(X.value, (n, i) => (_(), c(S(D), h({ key: n.prop }, { ref_for: !0 }, n, { "show-overflow-tooltip": n.type !== S(a).ACTION && n?.showOverflowTooltip }), f({ _: 2 }, [n.type === S(a).ACTION ? {
|
|
335
|
+
name: "default",
|
|
336
|
+
fn: w((e) => [d("div", Te, [(_(!0), u(o, null, y(Ve(Z(n, e.row)), (t) => (_(), c(S(ce), {
|
|
337
|
+
key: t.key || t.label,
|
|
338
|
+
type: t.type || "primary",
|
|
339
|
+
size: t.size || "small",
|
|
340
|
+
disabled: t.disabled,
|
|
341
|
+
loading: t.loading,
|
|
342
|
+
text: t.text,
|
|
343
|
+
link: t.link,
|
|
344
|
+
icon: t.icon,
|
|
345
|
+
onClick: T((n) => Ge(t, e.row, e.$index), ["stop"]),
|
|
346
|
+
style: { "margin-left": "0" }
|
|
347
|
+
}, {
|
|
348
|
+
default: w(() => [p(x(t.label), 1)]),
|
|
349
|
+
_: 2
|
|
350
|
+
}, 1032, [
|
|
351
|
+
"type",
|
|
352
|
+
"size",
|
|
353
|
+
"disabled",
|
|
354
|
+
"loading",
|
|
355
|
+
"text",
|
|
356
|
+
"link",
|
|
357
|
+
"icon",
|
|
358
|
+
"onClick"
|
|
359
|
+
]))), 128)), Q(Z(n, e.row)).length > 0 ? (_(), c(S(le), {
|
|
360
|
+
key: 0,
|
|
361
|
+
onCommand: (t) => Ge(t, e.row, e.$index),
|
|
362
|
+
onClick: r[1] ||= T(() => {}, ["stop"]),
|
|
363
|
+
trigger: "click"
|
|
364
|
+
}, {
|
|
365
|
+
dropdown: w(() => [m(S(de), null, {
|
|
366
|
+
default: w(() => [(_(!0), u(o, null, y(Q(Z(n, e.row)), (e) => (_(), c(S(ue), {
|
|
367
|
+
key: e.key || e.label,
|
|
368
|
+
command: e,
|
|
369
|
+
disabled: e.disabled
|
|
370
|
+
}, {
|
|
371
|
+
default: w(() => [p(x(e.label), 1)]),
|
|
372
|
+
_: 2
|
|
373
|
+
}, 1032, ["command", "disabled"]))), 128))]),
|
|
374
|
+
_: 2
|
|
375
|
+
}, 1024)]),
|
|
376
|
+
default: w(() => [m(S(E), null, {
|
|
377
|
+
default: w(() => [m(S(he))]),
|
|
378
|
+
_: 1
|
|
379
|
+
})]),
|
|
380
|
+
_: 2
|
|
381
|
+
}, 1032, ["onCommand"])) : l("", !0)])]),
|
|
382
|
+
key: "0"
|
|
383
|
+
} : Be(n.prop) ? {
|
|
384
|
+
name: "default",
|
|
385
|
+
fn: w((r) => [d("div", Ee, [i === 0 && e.hasExpand ? (_(), c(S(E), {
|
|
386
|
+
key: 0,
|
|
387
|
+
class: "mg-r-10",
|
|
388
|
+
onClick: T((e) => Re(r.row), ["stop"])
|
|
389
|
+
}, {
|
|
390
|
+
default: w(() => [G.value.includes(r.row?.[e.tableProps?.rowKey]) ? (_(), c(S(ve), { key: 0 })) : (_(), c(S(ge), { key: 1 }))]),
|
|
391
|
+
_: 2
|
|
392
|
+
}, 1032, ["onClick"])) : l("", !0), d("div", De, [b(t.$slots, n.prop, {
|
|
393
|
+
row: r.row,
|
|
394
|
+
index: r.$index,
|
|
395
|
+
column: n
|
|
396
|
+
}, void 0, !0)])])]),
|
|
397
|
+
key: "1"
|
|
398
|
+
} : {
|
|
399
|
+
name: "default",
|
|
400
|
+
fn: w((e) => [d("span", null, x(ze(e.row, n)), 1)]),
|
|
401
|
+
key: "2"
|
|
402
|
+
}]), 1040, ["show-overflow-tooltip"]))), 128))
|
|
403
|
+
]),
|
|
404
|
+
_: 2
|
|
405
|
+
}, [y(e.customSlots, (e) => ({
|
|
406
|
+
name: e,
|
|
407
|
+
fn: w((n) => [b(t.$slots, e, te(ee(n)), void 0, !0)])
|
|
408
|
+
}))]), 1040, [
|
|
409
|
+
"data",
|
|
410
|
+
"columns",
|
|
411
|
+
"tree-props",
|
|
412
|
+
"row-key"
|
|
413
|
+
])]),
|
|
414
|
+
_: 3
|
|
415
|
+
})) : e.mode === S(i).CARD_INFINITE ? (_(), c(S(pe), {
|
|
416
|
+
key: 2,
|
|
417
|
+
ref_key: "scrollbarRef",
|
|
418
|
+
ref: Ne,
|
|
419
|
+
class: "card-container flex-1",
|
|
420
|
+
onEndReached: Fe
|
|
421
|
+
}, {
|
|
422
|
+
default: w(() => [K.value.length === 0 ? (_(), u("div", Oe, [m(S(be))])) : (_(), u("div", ke, [(_(!0), u(o, null, y(K.value, (e, n) => (_(), u("div", {
|
|
423
|
+
key: Ie(e, n),
|
|
424
|
+
class: "card-item"
|
|
425
|
+
}, [b(t.$slots, "card", {
|
|
426
|
+
item: e,
|
|
427
|
+
index: n,
|
|
428
|
+
data: K.value,
|
|
429
|
+
loading: J.value
|
|
430
|
+
}, void 0, !0)]))), 128))])), Y.value && H.value ? (_(), u("div", Ae, [m(S(E), {
|
|
431
|
+
class: "is-loading",
|
|
432
|
+
color: "var(--primary-color-1)"
|
|
433
|
+
}, {
|
|
434
|
+
default: w(() => [m(S(ye))]),
|
|
435
|
+
_: 1
|
|
436
|
+
}), r[4] ||= d("span", { class: "fz-14 text-3271fe pd-l-8" }, "加载中...", -1)])) : l("", !0)]),
|
|
437
|
+
_: 3
|
|
438
|
+
}, 512)) : l("", !0),
|
|
439
|
+
e.showPagination && !Y.value && q.value?.total ? (_(), u("div", je, [m(S(fe), {
|
|
440
|
+
"current-page": q.value.page,
|
|
441
|
+
"onUpdate:currentPage": r[2] ||= (e) => q.value.page = e,
|
|
442
|
+
"page-size": q.value.size,
|
|
443
|
+
"onUpdate:pageSize": r[3] ||= (e) => q.value.size = e,
|
|
444
|
+
"page-sizes": q.value.pageSizes,
|
|
445
|
+
total: q.value.total,
|
|
446
|
+
layout: q.value.layout,
|
|
447
|
+
onSizeChange: $,
|
|
448
|
+
onCurrentChange: $
|
|
449
|
+
}, null, 8, [
|
|
450
|
+
"current-page",
|
|
451
|
+
"page-size",
|
|
452
|
+
"page-sizes",
|
|
453
|
+
"total",
|
|
454
|
+
"layout"
|
|
455
|
+
])])) : l("", !0)
|
|
456
|
+
], 2),
|
|
457
|
+
b(t.$slots, "default", {}, void 0, !0)
|
|
458
|
+
]));
|
|
459
|
+
}
|
|
460
|
+
}), N = e(/* @__PURE__ */ t(M, [["__scopeId", "data-v-c48474f1"]]));
|
|
461
|
+
//#endregion
|
|
462
|
+
export { N as t };
|
package/es/index.mjs
CHANGED
|
@@ -20,7 +20,7 @@ import { t as He } from "./chunks/MdEditor.DXniUyrY.js";
|
|
|
20
20
|
import { t as Ue } from "./chunks/CreateMcpForm.CmDJvBZn.js";
|
|
21
21
|
import { _ as Q, a as We, b as Ge, c as Ke, d as qe, f as Je, g as Ye, h as Xe, i as Ze, l as Qe, m as $e, n as et, o as tt, p as nt, r as rt, s as it, t as at, u as ot, v as st, x as ct, y as lt } from "./chunks/CustomSidebar.CcOD8-wi.js";
|
|
22
22
|
import { CustomTitle as ut } from "./CustomTitle.mjs";
|
|
23
|
-
import { t as dt } from "./chunks/CustomToggle.
|
|
23
|
+
import { t as dt } from "./chunks/CustomToggle.DKRF3u_m.js";
|
|
24
24
|
import { n as ft, t as pt } from "./chunks/DocSyncSelect.BXAEaFps.js";
|
|
25
25
|
import { a as mt, c as ht, d as gt, f as _t, i as vt, l as yt, n as bt, o as xt, r as St, s as Ct, t as wt, u as Tt } from "./chunks/FileDisplay.D308Pw4L.js";
|
|
26
26
|
import { t as Et } from "./chunks/LoginRedirectScreen.DWykKkE4.js";
|
|
@@ -31,7 +31,7 @@ import { AiboxTable as It } from "./Table.mjs";
|
|
|
31
31
|
import { a as Lt, c as Rt, i as zt, n as Bt, o as Vt, r as Ht, s as Ut, t as Wt } from "./chunks/ParameterTable.DIzML7kY.js";
|
|
32
32
|
import { n as Gt, t as Kt } from "./chunks/McpParamsSet.Dpsku0Bq.js";
|
|
33
33
|
import { n as qt, r as Jt, t as Yt } from "./chunks/field-types.xGpJxVGP.js";
|
|
34
|
-
import { t as Xt } from "./chunks/PageContainer.
|
|
34
|
+
import { t as Xt } from "./chunks/PageContainer.Bf0DWQNo.js";
|
|
35
35
|
import { t as Zt } from "./chunks/PublishRecord.MUK6tcgd.js";
|
|
36
36
|
import { a as Qt, c as $t, i as en, n as tn, o as nn, r as rn, s as an, t as on } from "./chunks/SourcePublish.CyBDYK5p.js";
|
|
37
37
|
import { dayjs as sn } from "element-plus";
|
package/lib/CustomToggle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./chunks/CustomToggle.
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./chunks/CustomToggle.HbP41BJh.js");exports.CustomToggle=e.t,exports.default=e.t;
|
package/lib/PageContainer.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./chunks/field-types.Dexxn1we.js"),t=require("./chunks/PageContainer.
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./chunks/field-types.Dexxn1we.js"),t=require("./chunks/PageContainer.CE8Pz6hD.js");exports.COLUMN_TYPES=e.t,exports.DIRECTION=e.n,exports.MODES=e.r,exports.PageContainer=t.t,exports.default=t.t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.visible-options[data-v-
|
|
1
|
+
.visible-options[data-v-bb39a829]::-webkit-scrollbar{height:0}.toggle-item[data-v-bb39a829]{color:var(--text-color-3);background:var(--background-color-3);border-bottom:1px solid var(--border-color);height:48px;line-height:48px}.toggle-item.active[data-v-bb39a829]{color:var(--primary-color-1);background:var(--background-color-2);border-bottom:none;border-left:1px solid var(--border-color);border-right:1px solid var(--border-color)}.toggle-item.active .order-number[data-v-bb39a829]{background:var(--primary-color-1);color:var(--background-color-2)}.toggle-item.first-active[data-v-bb39a829]{border-left:none}.toggle-item.last-active[data-v-bb39a829]{border-right:none}.toggle-item.toggle-action[data-v-bb39a829]{color:var(--text-color-3);border-left:1px solid var(--border-color);width:48px}.order-number[data-v-bb39a829]{background:var(--text-color-4);color:var(--text-color-2);border-radius:50%;line-height:20px}.divider[data-v-bb39a829]{color:var(--border-color);position:absolute;right:0}.toggle-style-2[data-v-bb39a829]{align-items:center;height:32px;display:inline-flex;width:auto!important}.toggle-style-2 .visible-options[data-v-bb39a829]{flex:unset;align-items:center;display:inline-flex;overflow:visible}.toggle-style-2 .toggle-item[data-v-bb39a829]{color:#606266;white-space:nowrap;background:0 0;border:none;border-radius:4px;height:auto;padding:6px 16px;font-size:14px;line-height:normal;transition:all .3s;width:auto!important}.toggle-style-2 .toggle-item[data-v-bb39a829]:hover{color:var(--el-color-primary);background-color:#f0f2f5}.toggle-style-2 .toggle-item.active[data-v-bb39a829]{color:#262626;background:#f5f7fa;border:none;font-weight:500}.toggle-style-2 .divider[data-v-bb39a829]{display:none}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.search-section[data-v-
|
|
1
|
+
.search-section[data-v-c48474f1]{border-bottom:1px solid var(--border-color)}.action-buttons[data-v-c48474f1]{flex-wrap:wrap;gap:8px}.bg-fff[data-v-c48474f1]{background-color:var(--background-color-2);border:1px solid var(--border-color)}.card-list[data-v-c48474f1]{grid-template-columns:repeat(auto-fill,minmax(306px,1fr));gap:16px;display:grid}[data-v-c48474f1] .el-table__expand-column .el-icon{display:none}[data-v-c48474f1] .el-table__cell.el-table__expanded-cell{position:relative}[data-v-c48474f1] .el-table__cell.el-table__expanded-cell .sticky-left{z-index:10;position:sticky;top:0;left:0}.loading-indicator .is-loading[data-v-c48474f1]{animation:2s linear infinite rotating-c48474f1}@keyframes rotating-c48474f1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}[data-v-c48474f1] .el-popper{max-width:300px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('../assets/CustomToggle.css');const e=require("./withinstall.DQkVkGcu.js"),t=require("./_plugin-vue_export-helper.BTmtiIyf.js");let n=require("vue"),r=require("element-plus"),i=require("color-message-aibox-vue"),a=require("vue-router"),o=require("color-star-custom-methods");var s=e=>`${e}-custom-toggle`,c=[`id`,`data-option-value`,`onClick`],l={key:0,class:`order-number fz-12 text-center mg-r-10 pd-l-8 pd-r-8`},u={key:1,class:`divider`},d={class:`toggle-item toggle-action flex items-center justify-center weight-500`},f={class:`dropdown-label`},p=Object.assign({name:`CustomToggle`},{__name:`layout`,props:{options:{type:Array,default:()=>[]},modelValue:{type:[String,Number,Object],default:null},maxVisible:{type:Number,default:void 0},fieldMapping:{type:Object,default:()=>({value:`value`,label:`label`})},showOrderNumber:{type:Boolean,default:!1},styleType:{type:[Number,String],default:1}},emits:[o.emitsMap.updateModelValue,o.emitsMap.change],setup(e,{emit:t}){let p=e,m=t,h=(0,n.ref)(null),g=(0,a.useRoute)(),_=(0,n.computed)(()=>s(g.name)),v=()=>{try{let e=sessionStorage.getItem(_.value);if(e&&p.options.length>0&&p.options.some((t,n)=>String(D(t,n))===String(e)))return e}catch{return null}return null},y=e=>{sessionStorage.setItem(_.value,e)},b=[],x=(0,n.computed)(()=>p.maxVisible===void 0?p.options.length:p.maxVisible),S=(0,n.computed)(()=>T.value.length>0);(0,n.computed)(()=>T.value.length);let C=(0,n.computed)(()=>{if(!p.modelValue||p.options.length<=x.value){let e=p.options.slice(0,x.value);return b=e,e}let e=p.options.findIndex((e,t)=>D(e,t)===p.modelValue);if(e===-1){let e=p.options.slice(0,x.value);return b=e,e}if(b.map((e,t)=>D(e,t)).includes(p.modelValue)&&b.length>0)return b;let t=Math.max(0,e-x.value+1),n=Math.min(p.options.length,t+x.value),r=p.options.slice(t,n);return b=r,r}),w=(0,n.computed)(()=>`${100/x.value}%`),T=(0,n.computed)(()=>{let e=new Set(C.value.map((e,t)=>D(e,t)));return p.options.filter((t,n)=>{let r=D(t,n);return!e.has(r)})});(0,n.computed)(()=>p.options.slice(0,x.value));let E=()=>{if(!p.options?.length)return;let e=p.modelValue;if(e!=null&&e!==``&&p.options.some((t,n)=>String(D(t,n))===String(e))){y(String(e));return}let t=v();if(t!==null){let e=p.options.findIndex((e,n)=>String(D(e,n))===String(t));if(e>=0){F(D(p.options[e],e));return}}let n=p.options[0],r=D(n,0);F(r)},D=(e,t)=>{if(typeof e==`object`&&e){let n=p.fieldMapping.value;return e[n]===void 0?t:e[n]}return e},O=e=>{if(typeof e==`object`&&e){let t=p.fieldMapping.label,n=p.fieldMapping.value;return e[t]||e[n]||e}return e},k=(e,t)=>{let n=D(e,t);return p.options.findIndex((e,t)=>D(e,t)===n)+1},A=(e,t)=>D(e,t)===p.modelValue,j=(e,t)=>{if(t>=C.value.length-1||A(e,t))return!1;let n=C.value.findIndex((e,t)=>A(e,t));return n!==-1&&t!==n-1},M=(e,t)=>{let n=D(e,t);F(n)},N=e=>{F(e),setTimeout(()=>{P(e)},50)},P=e=>{let t=`toggle-option-${e}`,n=document.getElementById(t);n&&n.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})},F=e=>{y(e),m(o.emitsMap.updateModelValue,e),(0,n.nextTick)(()=>{m(o.emitsMap.change,e)})};return(0,n.onMounted)(()=>{E()}),(t,a)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{class:(0,n.normalizeClass)([`toggle-container flex w-full relative`,`toggle-style-${e.styleType}`])},[(0,n.createElementVNode)(`div`,{ref_key:`optionsContainer`,ref:h,class:`visible-options flex-1 overflow-x-auto overflow-y-hidden relative flex`},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(C.value,(e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:D(e,t),id:`toggle-option-${D(e,t)}`,"data-option-value":D(e,t),class:(0,n.normalizeClass)([`toggle-item pointer text-center flex items-center justify-center ellipsis-1 relative pointer`,{active:A(e,t),"first-active":A(e,t)&&t===0,"last-active":A(e,t)&&t===C.value.length-1}]),style:(0,n.normalizeStyle)({width:w.value}),onClick:n=>M(e,t)},[p.showOrderNumber?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,l,(0,n.toDisplayString)(k(e,t)),1)):(0,n.createCommentVNode)(``,!0),(0,n.createTextVNode)(` `+(0,n.toDisplayString)(O(e))+` `,1),j(e,t)?((0,n.openBlock)(),(0,n.createElementBlock)(`span`,u,`|`)):(0,n.createCommentVNode)(``,!0)],14,c))),128))],512),S.value?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(r.ElDropdown),{key:0,trigger:`click`,onCommand:N},{dropdown:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(r.ElDropdownMenu),null,{default:(0,n.withCtx)(()=>[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(T.value,(e,t)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(r.ElDropdownItem),{key:D(e,t),command:D(e,t),class:(0,n.normalizeClass)({"is-active":A(e,t)})},{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`span`,f,(0,n.toDisplayString)(O(e)),1)]),_:2},1032,[`command`,`class`]))),128))]),_:1})]),default:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`div`,d,[(0,n.createVNode)((0,n.unref)(r.ElIcon),null,{default:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(i.IconZuoCopy))]),_:1})])]),_:1})):(0,n.createCommentVNode)(``,!0)],2))}}),m=t.t(p,[[`__scopeId`,`data-v-bb39a829`]]),h=e.t(m);Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return h}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('../assets/PageContainer.css');const e=require("./withinstall.DQkVkGcu.js"),t=require("./_plugin-vue_export-helper.BTmtiIyf.js"),n=require("./layout.CNYc7QUj.js"),r=require("./field-types.Dexxn1we.js");let i=require("vue"),a=require("element-plus"),o=require("color-message-aibox-vue"),s=require("color-star-custom-components"),c=require("vue-router"),l=require("color-star-custom-methods");var ee={class:`page-container flex flex-col overflow-hidden h-full`},u={class:`text-1f2329 pd-l-4`},d={class:`action-buttons flex items-center`},f={class:`flex items-center w-full`},p={class:`flex-1`},m={key:0,class:`flex items-center justify-center w-full`},h={key:1,class:`card-list`},g={key:2,class:`loading-indicator flex items-center justify-center pd-t-20 pd-b-20`},_={key:3,class:`pagination-section pd-t-16 flex justify-center`},v=Object.assign({name:`PageContainer`},{__name:`layout`,props:{breadcrumb:{type:Object,default:()=>({show:!1,text:``})},title:{type:String,default:``},searchFields:{type:Array,default:()=>[]},modelValue:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},tableProps:{type:Object,default:()=>({stripe:!0,border:!1})},treeProps:{type:Object,default:()=>({})},tableEvents:{type:Object,default:()=>({})},showPagination:{type:Boolean,default:!0},pagination:{type:Object,default:()=>({page:l.pageParams.pageNum,size:l.pageParams.pageSize,total:0,pageSizes:l.paginationConfig.pageSizes,layout:l.paginationConfig.layout})},customSlots:{type:Array,default:()=>[]},api:{type:Function,default:null},autoLoad:{type:Boolean,default:!0},apiParams:{type:Object,default:()=>({})},isSeparate:{type:Boolean,default:!1},minWidth:{type:Number,default:290},mode:{type:String,default:r.r.TABLE,validator:e=>Object.values(r.r).includes(e)},showSelection:{type:Boolean,default:!1},selection:{type:Array,default:()=>[]},hasExpand:{type:Boolean,default:!1},requestParamsCallback:{type:Function,default:null}},emits:[l.emitsMap.search,l.emitsMap.reset,l.emitsMap.actionClick,l.emitsMap.paginationChange,l.emitsMap.sizeChange,l.emitsMap.dataLoaded,l.emitsMap.dataError,l.emitsMap.updateModelValue,`selection-change`,`expand-change`],setup(e,{expose:t,emit:v}){let y=(0,c.useRouter)(),b=e,x=v,S=(0,i.ref)(null),C=(0,i.ref)(null),w=(0,i.ref)(null),T=(0,i.useSlots)(),E=(0,i.ref)(!1),D=(0,i.ref)([]),O=(0,i.ref)({page:l.pageParams.pageNum,size:l.pageParams.pageSize,total:0,pageSizes:l.paginationConfig.pageSizes,layout:l.paginationConfig.layout}),k=0,A=(0,i.ref)({...b.modelValue}),j=(0,i.ref)(!1),M=(0,i.ref)(!0),N=(0,i.ref)([...b.selection]),P=(0,i.ref)([...b.tableProps?.expandRowKeys||[]]),F=(0,i.computed)(()=>b.api?D.value:b.tableData),I=(0,i.computed)(()=>b.api?O.value:b.pagination),L=(0,i.computed)(()=>b.api?E.value||j.value:b.tableProps.loading||j.value||!1),R=(0,i.computed)(()=>b.mode===r.r.CARD_INFINITE),z=(0,i.computed)(()=>b.columns?.map(e=>{if(e.type===r.t.ACTION&&(Array.isArray(e.actions)||typeof e.actions==`function`))return{...e,align:`center`,fixed:`right`};let{width:t,...n}=e;return{...n,minWidth:t}})),B=e=>{e===r.n.BOTTOM&&(!R.value||!M.value||L.value||Y({},!0))},V=(e,t)=>e.id||e.bnid||e.key||`item-${t}`,H=()=>{y.back()},U=e=>{let t=e[b.tableProps?.rowKey];P.value.includes(t)?P.value=P.value.filter(e=>e!==t):P.value.push(t)},W=(e,t)=>t.formatter?t.formatter(e[t.prop],e,t):e[t.prop],G=e=>T[e]!==void 0,K=(e,t)=>typeof e.actions==`function`?e.actions(t)||[]:e.actions||[],q=e=>e.length<3?e:e.slice(0,1),J=e=>e.length<3?[]:e.slice(1),Y=(e={},t=!1)=>{if(!b.api)return;if(t){if(!M.value||j.value)return;j.value=!0}else E.value=!0,R.value&&(M.value=!0,j.value=!1);let n={};typeof b.requestParamsCallback==`function`&&(n=b.requestParamsCallback(A.value,b.apiParams));let r={...e,...b.apiParams,...A.value,...n};b.showPagination&&(r.page=t?I.value.page+1:I.value.page,r.size=I.value.size),console.log(`requestParams`,r?.publishStatus);let i=++k;b.api(r).then(e=>{if(i!==k)return;let n=e?.data?.memberSo?.data||e?.data?.data||e?.data||[];if(console.log(`newData`,n),t){if(!n||n.length===0){M.value=!1;return}D.value=[...D.value,...n],O.value.page=r.page,O.value.total=e?.data?.memberSo?.total||e?.data?.total||D.value.length,n.length<I.value.size&&(M.value=!1)}else D.value=n,O.value.total=e?.data?.memberSo?.total||e?.data?.total||0;x(l.emitsMap.dataLoaded,{data:D.value,pagination:O.value,params:r,response:e?.data,isLoadMore:t})}).catch(e=>{i===k&&(t?M.value=!1:(D.value=[],O.value.total=0),x(l.emitsMap.dataError,e))}).finally(()=>{i===k&&(t?j.value=!1:E.value=!1)})},X=()=>{b.mode===r.r.CARD_INFINITE&&(D.value=[])},Z=()=>{b.api?(X(),O.value.page=l.pageParams.pageNum,Y()):x(l.emitsMap.search,A.value)},Q=()=>{let e={};Object.keys(A.value).forEach(t=>{e[t]=void 0}),A.value=e,b.api?(X(),O.value.page=l.pageParams.pageNum,Y()):x(l.emitsMap.reset)},$=(e,t,n)=>{x(l.emitsMap.actionClick,{action:e,row:t,index:n})},te=e=>{N.value=e,x(`selection-change`,e)},ne=(e,t)=>{switch(e){case l.operationConfigMap.search:Z();break;case l.operationConfigMap.reset:Q()}};return(0,i.watch)(()=>b.modelValue,e=>{A.value={...e}},{deep:!0,immediate:!0}),(0,i.watch)(()=>b.selection,e=>{N.value=[...e]},{deep:!0,immediate:!0}),(0,i.watch)(()=>b.tableProps?.expandRowKeys,e=>{e&&(P.value=[...e])},{deep:!0,immediate:!0}),(0,i.watch)(()=>P.value,e=>{x(`expand-change`,e)},{deep:!0}),(0,i.watch)(()=>A.value,e=>{x(l.emitsMap.updateModelValue,{...e})},{deep:!0}),(0,i.onMounted)(()=>{b.autoLoad&&b.api&&Y()}),t({loadData:Y,handleSearch:Z,handleReset:Q,clearSelection:()=>C.value?.clearSelection?.(),toggleAllSelection:()=>C.value?.toggleAllSelection?.(),getSelectionRows:()=>N.value}),(t,c)=>((0,i.openBlock)(),(0,i.createElementBlock)(`div`,ee,[e.breadcrumb.show?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{key:0,class:`flex items-center fz-14 pd-b-20 pointer`,onClick:H},[(0,i.createVNode)((0,i.unref)(a.ElIcon),{size:16},{default:(0,i.withCtx)(()=>[((0,i.openBlock)(),(0,i.createBlock)((0,i.resolveDynamicComponent)(e.breadcrumb.icon||(0,i.unref)(o.IconZuo))))]),_:1}),(0,i.createElementVNode)(`span`,u,(0,i.toDisplayString)(e.breadcrumb.text),1)])):(0,i.createCommentVNode)(``,!0),e.searchFields?.length?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{key:1,class:(0,i.normalizeClass)({"search-section pd-b-16 mg-b-16":!e.isSeparate,"bg-fff radius-4 pd-l-16 pd-r-16 pd-t-16 pd-b-16":e.isSeparate})},[(0,i.createVNode)(n.t,{title:`查询`}),(0,i.createVNode)((0,i.unref)(s.SearchBar),{ref_key:`searchFormRef`,ref:S,items:e.searchFields,"filter-mode":!1,minWidth:e.minWidth,hideExpandButton:!1,fixedWidth:!0,maxHeight:32,modelValue:A.value,"onUpdate:modelValue":c[0]||=e=>A.value=e,onOperation:ne},null,8,[`items`,`minWidth`,`modelValue`])],2)):(0,i.createCommentVNode)(``,!0),(0,i.createElementVNode)(`div`,{class:(0,i.normalizeClass)([`data-section flex-1 overflow-hidden flex flex-col`,{"bg-fff radius-4 pd-l-16 pd-r-16 pd-t-16 pd-b-16 mg-t-16":e.isSeparate}])},[e.title?(0,i.renderSlot)(t.$slots,`title`,{},()=>[(0,i.createVNode)(n.t,{title:e.title},{default:(0,i.withCtx)(()=>[(0,i.renderSlot)(t.$slots,`title-actions`,{},void 0,!0)]),_:3},8,[`title`])],!0,0):(0,i.createCommentVNode)(``,!0),e.mode===(0,i.unref)(r.r).TABLE?((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(a.ElAutoResizer),{key:1,class:`flex-1 overflow-hidden`},{default:(0,i.withCtx)(({width:n})=>[(0,i.createVNode)((0,i.unref)(a.ElTable),(0,i.mergeProps)({ref_key:`tableRef`,ref:C,data:F.value,columns:z.value,"tree-props":e.treeProps,"show-overflow-tooltip":!0,"row-key":e.treeProps.value||e.tableProps?.rowKey},{loading:L.value,expandRowKeys:P.value,...e.tableProps},(0,i.toHandlers)(e.tableEvents),{class:`w-full h-full admin-dashboard-table`,border:``,onSelectionChange:te}),(0,i.createSlots)({default:(0,i.withCtx)(()=>[e.showSelection?((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(a.ElTableColumn),{key:0,type:`selection`,width:`55`,fixed:`left`})):(0,i.createCommentVNode)(``,!0),e.hasExpand?((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(a.ElTableColumn),{key:1,width:`1`,type:`expand`,fixed:`left`},{default:(0,i.withCtx)(e=>[(0,i.createElementVNode)(`div`,{class:`sticky-left`,style:(0,i.normalizeStyle)({width:n+`px`})},[(0,i.renderSlot)(t.$slots,`expand`,{row:e.row},void 0,!0)],4)]),_:2},1024)):(0,i.createCommentVNode)(``,!0),((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(z.value,(n,s)=>((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(a.ElTableColumn),(0,i.mergeProps)({key:n.prop},{ref_for:!0},n,{"show-overflow-tooltip":n.type!==(0,i.unref)(r.t).ACTION&&n?.showOverflowTooltip}),(0,i.createSlots)({_:2},[n.type===(0,i.unref)(r.t).ACTION?{name:`default`,fn:(0,i.withCtx)(e=>[(0,i.createElementVNode)(`div`,d,[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(q(K(n,e.row)),t=>((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(a.ElButton),{key:t.key||t.label,type:t.type||`primary`,size:t.size||`small`,disabled:t.disabled,loading:t.loading,text:t.text,link:t.link,icon:t.icon,onClick:(0,i.withModifiers)(n=>$(t,e.row,e.$index),[`stop`]),style:{"margin-left":`0`}},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(t.label),1)]),_:2},1032,[`type`,`size`,`disabled`,`loading`,`text`,`link`,`icon`,`onClick`]))),128)),J(K(n,e.row)).length>0?((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(a.ElDropdown),{key:0,onCommand:t=>$(t,e.row,e.$index),onClick:c[1]||=(0,i.withModifiers)(()=>{},[`stop`]),trigger:`click`},{dropdown:(0,i.withCtx)(()=>[(0,i.createVNode)((0,i.unref)(a.ElDropdownMenu),null,{default:(0,i.withCtx)(()=>[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(J(K(n,e.row)),e=>((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(a.ElDropdownItem),{key:e.key||e.label,command:e,disabled:e.disabled},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(e.label),1)]),_:2},1032,[`command`,`disabled`]))),128))]),_:2},1024)]),default:(0,i.withCtx)(()=>[(0,i.createVNode)((0,i.unref)(a.ElIcon),null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)((0,i.unref)(o.IconMore))]),_:1})]),_:2},1032,[`onCommand`])):(0,i.createCommentVNode)(``,!0)])]),key:`0`}:G(n.prop)?{name:`default`,fn:(0,i.withCtx)(r=>[(0,i.createElementVNode)(`div`,f,[s===0&&e.hasExpand?((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(a.ElIcon),{key:0,class:`mg-r-10`,onClick:(0,i.withModifiers)(e=>U(r.row),[`stop`])},{default:(0,i.withCtx)(()=>[P.value.includes(r.row?.[e.tableProps?.rowKey])?((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(o.IconZuoCopy),{key:0})):((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(o.IconYou),{key:1}))]),_:2},1032,[`onClick`])):(0,i.createCommentVNode)(``,!0),(0,i.createElementVNode)(`div`,p,[(0,i.renderSlot)(t.$slots,n.prop,{row:r.row,index:r.$index,column:n},void 0,!0)])])]),key:`1`}:{name:`default`,fn:(0,i.withCtx)(e=>[(0,i.createElementVNode)(`span`,null,(0,i.toDisplayString)(W(e.row,n)),1)]),key:`2`}]),1040,[`show-overflow-tooltip`]))),128))]),_:2},[(0,i.renderList)(e.customSlots,e=>({name:e,fn:(0,i.withCtx)(n=>[(0,i.renderSlot)(t.$slots,e,(0,i.normalizeProps)((0,i.guardReactiveProps)(n)),void 0,!0)])}))]),1040,[`data`,`columns`,`tree-props`,`row-key`])]),_:3})):e.mode===(0,i.unref)(r.r).CARD_INFINITE?((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(a.ElScrollbar),{key:2,ref_key:`scrollbarRef`,ref:w,class:`card-container flex-1`,onEndReached:B},{default:(0,i.withCtx)(()=>[F.value.length===0?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,m,[(0,i.createVNode)((0,i.unref)(s.IconEmpty))])):((0,i.openBlock)(),(0,i.createElementBlock)(`div`,h,[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(F.value,(e,n)=>((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{key:V(e,n),class:`card-item`},[(0,i.renderSlot)(t.$slots,`card`,{item:e,index:n,data:F.value,loading:L.value},void 0,!0)]))),128))])),R.value&&j.value?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,g,[(0,i.createVNode)((0,i.unref)(a.ElIcon),{class:`is-loading`,color:`var(--primary-color-1)`},{default:(0,i.withCtx)(()=>[(0,i.createVNode)((0,i.unref)(o.Loading))]),_:1}),c[4]||=(0,i.createElementVNode)(`span`,{class:`fz-14 text-3271fe pd-l-8`},`加载中...`,-1)])):(0,i.createCommentVNode)(``,!0)]),_:3},512)):(0,i.createCommentVNode)(``,!0),e.showPagination&&!R.value&&I.value?.total?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,_,[(0,i.createVNode)((0,i.unref)(a.ElPagination),{"current-page":I.value.page,"onUpdate:currentPage":c[2]||=e=>I.value.page=e,"page-size":I.value.size,"onUpdate:pageSize":c[3]||=e=>I.value.size=e,"page-sizes":I.value.pageSizes,total:I.value.total,layout:I.value.layout,onSizeChange:Y,onCurrentChange:Y},null,8,[`current-page`,`page-size`,`page-sizes`,`total`,`layout`])])):(0,i.createCommentVNode)(``,!0)],2),(0,i.renderSlot)(t.$slots,`default`,{},void 0,!0)]))}}),y=t.t(v,[[`__scopeId`,`data-v-c48474f1`]]),b=e.t(y);Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return b}});
|
package/lib/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./chunks/rolldown-runtime.DF3sbh8G.js"),t=require("./chunks/i18n.7A9PIQja.js"),n=require("./chunks/AddOrEditSupplierDialog.tSju0y-W.js"),r=require("./chunks/usePreview.C3f_R7Np.js"),i=require("./chunks/FilePreview.T-kQ_iiJ.js"),a=require("./chunks/DialogContainer.BJuz0FJr.js"),o=require("./chunks/FileUploader.yvoUFzla.js"),s=require("./chunks/ApplicationTypeTag.ctv_-FsI.js"),c=require("./chunks/RadioGroup.CLHduGxc.js"),l=require("./chunks/AuthSection.aaNWUYhk.js"),u=require("./chunks/AutoShowTooltip.DIrXDh7U.js"),d=require("./chunks/config.CpfvYdZo.js"),f=require("./chunks/AvailableRangePreview.CiOxEA4F.js"),p=require("./chunks/AvailableRangeSetting.Bb32NVYo.js"),m=require("./chunks/CodeView.Ct9TXiwX.js"),h=require("./CodeView.js"),g=require("./chunks/config.DL3HszjO.js"),_=require("./chunks/CommonTagsList.CKstJRCG.js"),v=require("./chunks/MdEditor.BSUp8pUb.js"),y=require("./chunks/CreateMcpForm.BWs-4Onu.js"),b=require("./chunks/CustomSidebar.Cygx-8nO.js"),x=require("./CustomTitle.js"),S=require("./chunks/CustomToggle.
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./chunks/rolldown-runtime.DF3sbh8G.js"),t=require("./chunks/i18n.7A9PIQja.js"),n=require("./chunks/AddOrEditSupplierDialog.tSju0y-W.js"),r=require("./chunks/usePreview.C3f_R7Np.js"),i=require("./chunks/FilePreview.T-kQ_iiJ.js"),a=require("./chunks/DialogContainer.BJuz0FJr.js"),o=require("./chunks/FileUploader.yvoUFzla.js"),s=require("./chunks/ApplicationTypeTag.ctv_-FsI.js"),c=require("./chunks/RadioGroup.CLHduGxc.js"),l=require("./chunks/AuthSection.aaNWUYhk.js"),u=require("./chunks/AutoShowTooltip.DIrXDh7U.js"),d=require("./chunks/config.CpfvYdZo.js"),f=require("./chunks/AvailableRangePreview.CiOxEA4F.js"),p=require("./chunks/AvailableRangeSetting.Bb32NVYo.js"),m=require("./chunks/CodeView.Ct9TXiwX.js"),h=require("./CodeView.js"),g=require("./chunks/config.DL3HszjO.js"),_=require("./chunks/CommonTagsList.CKstJRCG.js"),v=require("./chunks/MdEditor.BSUp8pUb.js"),y=require("./chunks/CreateMcpForm.BWs-4Onu.js"),b=require("./chunks/CustomSidebar.Cygx-8nO.js"),x=require("./CustomTitle.js"),S=require("./chunks/CustomToggle.HbP41BJh.js"),C=require("./chunks/DocSyncSelect.ZlOVqBG1.js"),w=require("./chunks/FileDisplay.B3CFfeuo.js"),T=require("./chunks/LoginRedirectScreen.DE21-wqJ.js"),E=require("./chunks/Logo.BvlHIPja.js"),D=require("./chunks/McpFormDialog.CuYkPlUY.js"),O=require("./chunks/AiboxTable.B-VuIQSp.js"),k=require("./Table.js"),A=require("./chunks/ParameterTable.CLnOL3k_.js"),j=require("./chunks/McpParamsSet.BZ3lptGl.js"),M=require("./chunks/field-types.Dexxn1we.js"),N=require("./chunks/PageContainer.CE8Pz6hD.js"),P=require("./chunks/PublishRecord.DXoKtUn0.js"),F=require("./chunks/SourcePublish.QB3O6fdx.js");let I=require("element-plus");var L=e.n({API_CHANNEL_TYPES:()=>g.t,ARRAYTYPES:()=>A.i,AUDIO_SUFFIX_LIST:()=>r.r,AUTHORIZED_CHANNEL_TYPES:()=>g.n,AddOrEditSupplierDialog:()=>n.t,AiboxTable:()=>k.AiboxTable,AiboxTabs:()=>n.r,ApiTooltip:()=>F.a,ApplicationTypeTag:()=>s.t,AuthSection:()=>l.t,AutoShowTooltip:()=>u.t,AvailableRangePreview:()=>f.t,AvailableRangeSetting:()=>p.t,BackBar:()=>O.r,CHANNEL_ICON_CONFIG:()=>g.r,COLUMN_TYPES:()=>M.t,CodeView:()=>h.CodeView,CommonTagsList:()=>_.t,CreateMcpForm:()=>y.t,CustomSidebar:()=>b.t,CustomTitle:()=>x.CustomTitle,CustomToggle:()=>S.t,DEFAULT_SHOW_COUNT:()=>d.t,DIRECTION:()=>M.n,DeleteResourceDialog:()=>n.n,DialogContainer:()=>a.t,DocSyncSelect:()=>C.t,EXCEL_SUFFIX_LIST:()=>r.i,FeishuTooltip:()=>F.o,FileDisplay:()=>w.t,FilePreview:()=>i.t,FileTypeIcon:()=>C.n,FileUploader:()=>o.t,HTML_SUFFIX_LIST:()=>r.a,IMAGE_SUFFIX_LIST:()=>r.o,INACTIVE_ENUM:()=>g.i,INACTIVE_LIST:()=>g.a,JSON_SUFFIX_LIST:()=>r.s,LIBRARY_PAGE:()=>g.o,LOGO_CONFIG:()=>E.n,LoginRedirectScreen:()=>T.t,Logo:()=>E.t,MD_SUFFIX_LIST:()=>r.c,MEMBER_DEPARTMENT_TYPES:()=>d.n,MENU_COLOR_STRATEGY:()=>b.s,MENU_LOADING_STATES:()=>b.n,MENU_TYPE:()=>b.c,METHODSOPTIONS:()=>A.a,MODES:()=>M.r,McpFormDialog:()=>D.t,McpParamsSet:()=>j.t,MdEditor:()=>v.t,NOBODYMETHOD:()=>A.o,NODE_CLICK_TYPES:()=>b.r,OFFICIAL_LABEL:()=>g.s,OPEN_STATUS_VALUE:()=>g.c,PDF_SUFFIX_LIST:()=>r.l,PPT_SUFFIX_LIST:()=>r.u,PUBLISH_STATUS:()=>d.r,PUBLISH_STATUS_COLORS:()=>g.l,PUBLISH_STATUS_ICONS:()=>g.u,PUBLISH_STATUS_TEXT:()=>g.d,PUBLISH_STATUS_TYPE:()=>g.f,PUBLISH_TYPE_ICON_MAPPING:()=>g.p,PageContainer:()=>N.t,ParameterTable:()=>A.t,PermissionSetting:()=>F.s,PublishIcon:()=>F.c,PublishRecord:()=>P.t,PublishSettings:()=>F.i,RANGE_TYPES:()=>d.i,RELEASE_CHANNEL_CONFIG:()=>g.m,RELEASE_CHANNEL_TYPE:()=>g.h,RadioGroup:()=>c.t,SPECIAL_ROUTES:()=>b.i,STORE_CHANNEL_TYPES:()=>g.g,STORE_DETAIL_TYPE:()=>g._,SourcePublish:()=>F.t,StatusTag:()=>_.n,TEXT_SUFFIX_LIST:()=>r.d,TREE_PROPS:()=>b.a,TYPESMAP:()=>A.s,TYPESOPTIONS:()=>A.c,TableBtns:()=>O.n,TagList:()=>f.n,TextLeft:()=>j.n,USER_INFO_CARD_TYPES:()=>b.o,UploadTypesEnum:()=>o.a,VIDEO_SUFFIX_LIST:()=>r.f,WORD_SUFFIX_LIST:()=>r.p,ZIP_SUFFIX_LIST:()=>r.m,availableRangeTreeProps:()=>d.a,collapseNodeKeys:()=>b.l,convertChildrenToDebugValue:()=>A.n,createMcpDeleteHandler:()=>D.n,downloadBlobFile:()=>r.n,expandNodeKeys:()=>b.u,extractAndLowerCaseArrayType:()=>o.n,findExpandPath:()=>b.d,findExpandPathById:()=>b.f,findMenuByPath:()=>b.p,getAcceptType:()=>o.r,getChannelsByType:()=>g.v,getFilePreviewIcon:()=>r.h,getFirstLeafMenu:()=>b.m,getMenuIconColorById:()=>b.h,getParentNodeIdsById:()=>b.g,getWarnTips:()=>o.i,isArrayType:()=>A.r,isAudioFile:()=>r.g,isExcelFile:()=>r._,isHtmlFile:()=>r.v,isImageLink:()=>r.y,isJsonFile:()=>r.b,isMdFile:()=>r.x,isParentMenuActive:()=>b._,isParentRouteActive:()=>b.v,isPathInMenu:()=>b.y,isPdfFile:()=>r.S,isPptFile:()=>r.C,isText:()=>r.w,isVideoFile:()=>r.T,isWordFile:()=>r.E,isZipFile:()=>r.D,modelTypeOptions:()=>n.i,platformMap:()=>D.r,processMenuTreeWithLeaf:()=>b.b,rangeOptions:()=>d.o,serviceTypeMap:()=>g.y,toolCallingMap:()=>n.a,toolCallingOptions:()=>n.o,transformMenuData:()=>b.x,uploadUrl:()=>r.O,useApplicationTypeTag:()=>s.n,useDialog:()=>a.n,useServiceConfig:()=>F.r,useStoreDetailType:()=>F.n}),R=e=>{if(!Array.isArray(e))return{text:``,fileList:[]};let t=``,n=[];return e.forEach(e=>{let r=(e.type||``).toLowerCase();r===`text`&&e.text?t+=(t?`
|
|
2
2
|
`:``)+e.text:r===`image`&&e.image&&n.push({url:e.image.url||``,name:e.image.name||``,suffix:e.image.suffix||`png`,bnid:e.image.bnid||``,type:`image`})}),{text:t.trim(),fileList:n}},z=e=>!Array.isArray(e)||e.length===0?[]:e.map(e=>({intermediateMessage:{type:e.type||``,content:e.content||``,contentType:e.contentType||`TEXT`,nodeBnid:e.nodeBnid||``,end:e.end||!1,executionTime:e.executionTime||null},hasAskSelected:!1})),B=(e,t)=>{let n=[],r=t+Math.random().toString(36).substring(2,11);if(e.question){let{text:i,fileList:a}=R(e.question);(i||a.length>0)&&n.push({id:`question-${r}`,isRobot:!1,text:i||``,fileList:a,createTime:new Date(t).toISOString(),timestamp:new Date(t).toISOString()})}if(e.answer){let i=e.answer,a=i.content||``,o=i.reasoning_content||i.reasoningContent||``,s=i.intermediate_message||i.intermediateMessage||[],c=i.total_execution_time||i.totalExecutionTime||0,l=z(s);(a||o||l.length>0)&&n.push({id:`answer-${r}`,isRobot:!0,text:a.trim()||``,createTime:new Date(t+1e3).toISOString(),timestamp:new Date(t+1e3).toISOString(),totalExecutionTime:c,thoughtChainOutputText:o.trim()||``,fileList:[],middleNewList:l,triggerList:[],traceId:null,sessionId:null})}return n},V=e=>{let t=[];if(!e)return[];if(e.data&&Array.isArray(e.data))t=e.data;else if(Array.isArray(e))t=e;else return console.warn(`transformChatMessages: 无法识别的数据格式`,e),[];if(t.length===0)return[];let n=[],r=Date.now();return t.forEach((e,i)=>{let a=B(e,r-(t.length-i)*2e3);n.push(...a)}),n},H=e=>e==null?``:typeof e==`number`?e.toLocaleString():String(e),U=(e,t=1e3)=>{let n=Number(e);return isNaN(n)?String(e??``):Math.abs(n)>=t?(n/1e3).toFixed(1).replace(/\.0$/,``)+`K`:n.toLocaleString()};I.dayjs.en.weekStart=1;var W={install:e=>{for(let t in L)L[t].install&&e.use(L[t])}};exports.API_CHANNEL_TYPES=g.t,exports.ARRAYTYPES=A.i,exports.AUDIO_SUFFIX_LIST=r.r,exports.AUTHORIZED_CHANNEL_TYPES=g.n,exports.AddOrEditSupplierDialog=n.t,exports.AiboxTable=k.AiboxTable,exports.AiboxTabs=n.r,exports.ApiTooltip=F.a,exports.ApplicationTypeTag=s.t,exports.AuthSection=l.t,exports.AutoShowTooltip=u.t,exports.AvailableRangePreview=f.t,exports.AvailableRangeSetting=p.t,exports.BackBar=O.r,exports.CHANNEL_ICON_CONFIG=g.r,exports.COLUMN_TYPES=M.t,exports.CodeView=h.CodeView,exports.CommonTagsList=_.t,exports.CreateMcpForm=y.t,exports.CustomSidebar=b.t,exports.CustomTitle=x.CustomTitle,exports.CustomToggle=S.t,exports.DEFAULT_SHOW_COUNT=d.t,exports.DIRECTION=M.n,exports.DeleteResourceDialog=n.n,exports.DialogContainer=a.t,exports.DocSyncSelect=C.t,exports.EXCEL_SUFFIX_LIST=r.i,exports.FeishuTooltip=F.o,exports.FileDisplay=w.t,exports.FilePreview=i.t,exports.FileTypeIcon=C.n,exports.FileUploader=o.t,exports.HTML_SUFFIX_LIST=r.a,exports.IMAGE_SUFFIX_LIST=r.o,exports.INACTIVE_ENUM=g.i,exports.INACTIVE_LIST=g.a,exports.JSON_SUFFIX_LIST=r.s,exports.LIBRARY_PAGE=g.o,exports.LOGO_CONFIG=E.n,exports.LoginRedirectScreen=T.t,exports.Logo=E.t,exports.MD_SUFFIX_LIST=r.c,exports.MEMBER_DEPARTMENT_TYPES=d.n,exports.MENU_COLOR_STRATEGY=b.s,exports.MENU_LOADING_STATES=b.n,exports.MENU_TYPE=b.c,exports.METHODSOPTIONS=A.a,exports.MODES=M.r,exports.McpFormDialog=D.t,exports.McpParamsSet=j.t,exports.MdEditor=v.t,exports.NOBODYMETHOD=A.o,exports.NODE_CLICK_TYPES=b.r,exports.OFFICIAL_LABEL=g.s,exports.OPEN_STATUS_VALUE=g.c,exports.PDF_SUFFIX_LIST=r.l,exports.PPT_SUFFIX_LIST=r.u,exports.PUBLISH_STATUS=d.r,exports.PUBLISH_STATUS_COLORS=g.l,exports.PUBLISH_STATUS_ICONS=g.u,exports.PUBLISH_STATUS_TEXT=g.d,exports.PUBLISH_STATUS_TYPE=g.f,exports.PUBLISH_TYPE_ICON_MAPPING=g.p,exports.PageContainer=N.t,exports.ParameterTable=A.t,exports.PermissionSetting=F.s,exports.PublishIcon=F.c,exports.PublishRecord=P.t,exports.PublishSettings=F.i,exports.RANGE_TYPES=d.i,exports.RELEASE_CHANNEL_CONFIG=g.m,exports.RELEASE_CHANNEL_TYPE=g.h,exports.RadioGroup=c.t,exports.SPECIAL_ROUTES=b.i,exports.STORE_CHANNEL_TYPES=g.g,exports.STORE_DETAIL_TYPE=g._,exports.SourcePublish=F.t,exports.StatusTag=_.n,exports.TEXT_SUFFIX_LIST=r.d,exports.TREE_PROPS=b.a,exports.TYPESMAP=A.s,exports.TYPESOPTIONS=A.c,exports.TableBtns=O.n,exports.TagList=f.n,exports.TextLeft=j.n,exports.USER_INFO_CARD_TYPES=b.o,exports.UploadTypesEnum=o.a,exports.VIDEO_SUFFIX_LIST=r.f,exports.WORD_SUFFIX_LIST=r.p,exports.ZIP_SUFFIX_LIST=r.m,exports.availableRangeTreeProps=d.a,exports.cancelLanguageChangeListener=t.t,exports.collapseNodeKeys=b.l,exports.convertChildrenToDebugValue=A.n,exports.createI18nInstance=t.n,exports.createMcpDeleteHandler=D.n,exports.createTranslationHelper=t.r,exports.customPromptMessageBox=D.i,exports.debounce=w.n,exports.default=W,exports.downloadBlobFile=r.n,exports.expandNodeKeys=b.u,exports.extractAndLowerCaseArrayType=o.n,exports.findExpandPath=b.d,exports.findExpandPathById=b.f,exports.findMenuByPath=b.p,exports.formatNumber=H,exports.formatShort=U,exports.formatSize=w.r,exports.getAcceptType=o.r,exports.getBackendLanguage=t.i,exports.getBrowserLanguage=t.a,exports.getChannelsByType=g.v,exports.getCurrentLocale=t.o,exports.getFeishuInternationalizedFields=t.s,exports.getFilePreviewIcon=r.h,exports.getFirstLeafMenu=b.m,exports.getMdEditorInternationalized=t.c,exports.getMenuIconColorById=b.h,exports.getParentNodeIdsById=b.g,exports.getSessionStorage=w.i,exports.getWarnTips=o.i,exports.getterTText=t.l,exports.isArrayType=A.r,exports.isAudioFile=r.g,exports.isExcelFile=r._,exports.isFullHtml=w.a,exports.isHtmlFile=r.v,exports.isImageLink=r.y,exports.isJsonFile=r.b,exports.isMdFile=r.x,exports.isParentMenuActive=b._,exports.isParentRouteActive=b.v,exports.isPathInMenu=b.y,exports.isPdfFile=r.S,exports.isPptFile=r.C,exports.isText=r.w,exports.isVideoFile=r.T,exports.isWordFile=r.E,exports.isZipFile=r.D,exports.languageMap=t.u,exports.localeMap=t.d,exports.markdownToHtml=w.o,exports.modelTypeOptions=n.i,exports.platformMap=D.r,exports.processMenuTreeWithLeaf=b.b,exports.rangeOptions=d.o,exports.removeSessionStorage=w.s,exports.removeSessionStorageById=w.c,exports.serviceTypeMap=g.y,exports.setIframeRef=w.l,exports.setSessionStorage=w.u,exports.setupLanguageChangeListener=t.f,exports.t=t.p,exports.throttle=w.d,exports.timestampToSeconds=w.f,exports.toolCallingMap=n.a,exports.toolCallingOptions=n.o,exports.transformChatMessages=V,exports.transformMenuData=b.x,exports.uploadUrl=r.O,exports.useApplicationTypeTag=s.n,exports.useCopy=m.n,exports.useCustomMessageBox=D.a,exports.useDialog=a.n,exports.useDownloadPrew=r.t,exports.useI18n=t.m,exports.useServiceConfig=F.r,exports.useStoreDetailType=F.n;
|