@gct-paas/v-ben 0.1.4-dev.11 → 0.1.4-dev.13
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/dist/index.min.css +2 -1
- package/dist/loader.esm.min.js +693 -0
- package/es/_virtual/_plugin-vue_export-helper.mjs +7 -8
- package/es/components/index.mjs +7 -0
- package/es/components/v-ben-button/index.mjs +7 -8
- package/es/components/v-ben-button/src/BasicButton.vue.mjs +5 -40
- package/es/components/v-ben-button/src/BasicButton.vue_vue_type_script_setup_true_lang.mjs +37 -0
- package/es/components/v-ben-button/src/PopConfirmButton.vue.mjs +5 -46
- package/es/components/v-ben-button/src/PopConfirmButton.vue_vue_type_script_lang.mjs +36 -0
- package/es/components/v-ben-button/src/custom-button.vue.mjs +7 -7
- package/es/components/v-ben-button/src/custom-button.vue_vue_type_script_setup_true_name_custom-button_lang.mjs +22 -0
- package/es/components/v-ben-button/src/props.mjs +27 -27
- package/es/components/v-ben-dropdown/index.mjs +4 -4
- package/es/components/v-ben-dropdown/src/Dropdown.vue.mjs +5 -113
- package/es/components/v-ben-dropdown/src/Dropdown.vue_vue_type_script_setup_true_lang.mjs +87 -0
- package/es/components/v-ben-table/index.mjs +3 -0
- package/es/components/v-ben-table/src/BasicTable.vue.d.ts +6 -6
- package/es/components/v-ben-table/src/BasicTable.vue.mjs +33 -49
- package/es/components/v-ben-table/src/BasicTable.vue_vue_type_script_lang.mjs +41 -0
- package/es/components/v-ben-table/src/components/HeaderCell.vue.mjs +8 -8
- package/es/components/v-ben-table/src/components/HeaderCell.vue_vue_type_script_lang.mjs +15 -0
- package/es/components/v-ben-table/src/components/TableAction.vue.mjs +6 -174
- package/es/components/v-ben-table/src/components/TableAction.vue_vue_type_script_setup_true_lang.mjs +145 -0
- package/es/components/v-ben-table/src/components/TableAction.vue_vue_type_style_index_0_lang.css +37 -0
- package/es/components/v-ben-table/src/components/TableActionAuto.vue.mjs +6 -181
- package/es/components/v-ben-table/src/components/TableActionAuto.vue_vue_type_script_setup_true_lang.mjs +159 -0
- package/es/components/v-ben-table/src/components/TableActionAuto.vue_vue_type_style_index_0_lang.css +37 -0
- package/es/components/v-ben-table/src/props.d.ts +2 -2
- package/es/components/v-ben-table/src/props.mjs +155 -134
- package/es/hooks/useDesign.mjs +8 -7
- package/es/index.mjs +12 -14
- package/es/loader.d.ts +1 -0
- package/es/utils/is.mjs +29 -35
- package/package.json +6 -6
- package/dist/index.esm.min.mjs +0 -796
- package/dist/index.min.cjs +0 -1
- package/dist/index.system.min.js +0 -1
- package/es/components/v-ben-button/src/BasicButton.vue2.mjs +0 -5
- package/es/components/v-ben-button/src/PopConfirmButton.vue2.mjs +0 -5
- package/es/components/v-ben-button/src/custom-button.vue3.mjs +0 -32
- package/es/components/v-ben-dropdown/src/Dropdown.vue2.mjs +0 -5
- package/es/components/v-ben-table/src/BasicTable.vue2.mjs +0 -48
- package/es/components/v-ben-table/src/components/HeaderCell.vue2.mjs +0 -20
- package/es/components/v-ben-table/src/components/TableAction.css +0 -37
- package/es/components/v-ben-table/src/components/TableAction.vue3.mjs +0 -6
- package/es/components/v-ben-table/src/components/TableActionAuto.css +0 -37
- package/es/components/v-ben-table/src/components/TableActionAuto.vue3.mjs +0 -6
- /package/es/components/v-ben-button/src/{custom-button.css → custom-button.vue_vue_type_style_index_0_scoped_305f4090_lang.css} +0 -0
package/dist/index.esm.min.mjs
DELETED
|
@@ -1,796 +0,0 @@
|
|
|
1
|
-
import { defineComponent as D, computed as h, openBlock as l, createElementBlock as p, toDisplayString as $, ref as j, resolveComponent as O, renderSlot as w, withDirectives as ae, createVNode as A, mergeProps as _, createSlots as ue, withCtx as f, normalizeProps as E, guardReactiveProps as R, Fragment as T, createBlock as b, renderList as N, vShow as ie, toRaw as V, normalizeClass as J, unref as i, createCommentVNode as B, withModifiers as z, useAttrs as Q, h as H, createElementVNode as x, createTextVNode as ce } from "vue";
|
|
2
|
-
import { omit as I } from "lodash-es";
|
|
3
|
-
import { MoreOutlined as X } from "@ant-design/icons-vue";
|
|
4
|
-
import { Tooltip as Y, Divider as Z, Button as W, Popconfirm as ee, Menu as M, Dropdown as pe } from "ant-design-vue";
|
|
5
|
-
import { permission as te, t as q } from "@gct-paas/core";
|
|
6
|
-
const fe = Object.prototype.toString;
|
|
7
|
-
function S(e, o) {
|
|
8
|
-
return fe.call(e) === `[object ${o}]`;
|
|
9
|
-
}
|
|
10
|
-
function de(e) {
|
|
11
|
-
return typeof e < "u";
|
|
12
|
-
}
|
|
13
|
-
function ne(e) {
|
|
14
|
-
return !de(e);
|
|
15
|
-
}
|
|
16
|
-
function L(e) {
|
|
17
|
-
return e !== null && S(e, "Object");
|
|
18
|
-
}
|
|
19
|
-
function He(e) {
|
|
20
|
-
return ye(e) || K(e) ? e.length === 0 : e instanceof Map || e instanceof Set ? e.size === 0 : L(e) ? Object.keys(e).length === 0 : !1;
|
|
21
|
-
}
|
|
22
|
-
function We(e) {
|
|
23
|
-
return S(e, "Date");
|
|
24
|
-
}
|
|
25
|
-
function oe(e) {
|
|
26
|
-
return e === null;
|
|
27
|
-
}
|
|
28
|
-
function qe(e) {
|
|
29
|
-
return ne(e) && oe(e);
|
|
30
|
-
}
|
|
31
|
-
function Ge(e) {
|
|
32
|
-
return ne(e) || oe(e);
|
|
33
|
-
}
|
|
34
|
-
function Je(e) {
|
|
35
|
-
return S(e, "Number");
|
|
36
|
-
}
|
|
37
|
-
function Qe(e) {
|
|
38
|
-
return S(e, "Promise") && L(e) && P(e.then) && P(e.then);
|
|
39
|
-
}
|
|
40
|
-
function K(e) {
|
|
41
|
-
return S(e, "String");
|
|
42
|
-
}
|
|
43
|
-
function P(e) {
|
|
44
|
-
return typeof e == "function";
|
|
45
|
-
}
|
|
46
|
-
function me(e) {
|
|
47
|
-
return S(e, "Boolean");
|
|
48
|
-
}
|
|
49
|
-
function Xe(e) {
|
|
50
|
-
return S(e, "RegExp");
|
|
51
|
-
}
|
|
52
|
-
function ye(e) {
|
|
53
|
-
return !!e && Array.isArray(e);
|
|
54
|
-
}
|
|
55
|
-
function Ye(e) {
|
|
56
|
-
return typeof window < "u" && S(e, "Window");
|
|
57
|
-
}
|
|
58
|
-
function Ze(e) {
|
|
59
|
-
return L(e) && !!e.tagName;
|
|
60
|
-
}
|
|
61
|
-
function et(e) {
|
|
62
|
-
return S(e, "Map");
|
|
63
|
-
}
|
|
64
|
-
const ge = typeof window > "u", tt = !ge;
|
|
65
|
-
function nt(e) {
|
|
66
|
-
return /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?/.test(e);
|
|
67
|
-
}
|
|
68
|
-
function ot(e) {
|
|
69
|
-
return e === void 0 || !e && e !== 0 && e !== "0" || !/[^\s]/.test(e + "");
|
|
70
|
-
}
|
|
71
|
-
const be = D({
|
|
72
|
-
name: "TableHeaderCell",
|
|
73
|
-
components: {},
|
|
74
|
-
props: {
|
|
75
|
-
column: {
|
|
76
|
-
type: Object,
|
|
77
|
-
default: () => ({})
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
setup(e) {
|
|
81
|
-
return { getTitle: h(
|
|
82
|
-
() => e.column?.customTitle || e.column?.title
|
|
83
|
-
) };
|
|
84
|
-
}
|
|
85
|
-
}), U = (e, o) => {
|
|
86
|
-
const c = e.__vccOpts || e;
|
|
87
|
-
for (const [y, g] of o)
|
|
88
|
-
c[y] = g;
|
|
89
|
-
return c;
|
|
90
|
-
};
|
|
91
|
-
function he(e, o, c, y, g, u) {
|
|
92
|
-
return l(), p("span", null, $(e.getTitle), 1);
|
|
93
|
-
}
|
|
94
|
-
const Ce = /* @__PURE__ */ U(be, [["render", he]]), Be = {
|
|
95
|
-
clickToRowSelect: { type: Boolean, default: !0 },
|
|
96
|
-
isTreeTable: Boolean,
|
|
97
|
-
tableSetting: {
|
|
98
|
-
type: Object,
|
|
99
|
-
default: {}
|
|
100
|
-
},
|
|
101
|
-
inset: Boolean,
|
|
102
|
-
showTableSetting: Boolean,
|
|
103
|
-
autoCreateKey: { type: Boolean, default: !0 },
|
|
104
|
-
striped: { type: Boolean, default: !0 },
|
|
105
|
-
showSummary: Boolean,
|
|
106
|
-
summaryFunc: {
|
|
107
|
-
type: [Function, Array],
|
|
108
|
-
default: null
|
|
109
|
-
},
|
|
110
|
-
summaryData: {
|
|
111
|
-
type: Array,
|
|
112
|
-
default: null
|
|
113
|
-
},
|
|
114
|
-
indentSize: {
|
|
115
|
-
type: Number,
|
|
116
|
-
default: 24
|
|
117
|
-
},
|
|
118
|
-
canColDrag: { type: Boolean, default: !0 },
|
|
119
|
-
api: {
|
|
120
|
-
type: Function,
|
|
121
|
-
default: null
|
|
122
|
-
},
|
|
123
|
-
beforeFetch: {
|
|
124
|
-
type: Function,
|
|
125
|
-
default: null
|
|
126
|
-
},
|
|
127
|
-
afterFetch: {
|
|
128
|
-
type: Function,
|
|
129
|
-
default: null
|
|
130
|
-
},
|
|
131
|
-
handleSearchInfoFn: {
|
|
132
|
-
type: Function,
|
|
133
|
-
default: null
|
|
134
|
-
},
|
|
135
|
-
// 立即请求接口
|
|
136
|
-
immediate: { type: Boolean, default: !0 },
|
|
137
|
-
emptyDataIsShowTable: { type: Boolean, default: !0 },
|
|
138
|
-
// 额外的请求参数
|
|
139
|
-
searchInfo: {
|
|
140
|
-
type: Object,
|
|
141
|
-
default: null
|
|
142
|
-
},
|
|
143
|
-
// 默认的排序参数
|
|
144
|
-
defSort: {
|
|
145
|
-
type: Object,
|
|
146
|
-
default: null
|
|
147
|
-
},
|
|
148
|
-
// 使用搜索表单
|
|
149
|
-
useSearchForm: Boolean,
|
|
150
|
-
columns: {
|
|
151
|
-
type: Array,
|
|
152
|
-
default: () => []
|
|
153
|
-
},
|
|
154
|
-
showIndexColumn: { type: Boolean, default: !0 },
|
|
155
|
-
indexColumnProps: {
|
|
156
|
-
type: Object,
|
|
157
|
-
default: null
|
|
158
|
-
},
|
|
159
|
-
actionColumn: {
|
|
160
|
-
type: Object,
|
|
161
|
-
default: null
|
|
162
|
-
},
|
|
163
|
-
ellipsis: { type: Boolean, default: !0 },
|
|
164
|
-
isCanResizeParent: { type: Boolean, default: !1 },
|
|
165
|
-
canResize: { type: Boolean, default: !0 },
|
|
166
|
-
clearSelectOnPageChange: Boolean,
|
|
167
|
-
resizeHeightOffset: {
|
|
168
|
-
type: Number,
|
|
169
|
-
default: 0
|
|
170
|
-
},
|
|
171
|
-
rowSelection: {
|
|
172
|
-
type: Object,
|
|
173
|
-
default: null
|
|
174
|
-
},
|
|
175
|
-
title: {
|
|
176
|
-
type: [String, Function],
|
|
177
|
-
default: null
|
|
178
|
-
},
|
|
179
|
-
titleHelpMessage: {
|
|
180
|
-
type: [String, Array]
|
|
181
|
-
},
|
|
182
|
-
maxHeight: Number,
|
|
183
|
-
dataSource: {
|
|
184
|
-
type: Array,
|
|
185
|
-
default: null
|
|
186
|
-
},
|
|
187
|
-
rowKey: {
|
|
188
|
-
type: [String, Function],
|
|
189
|
-
default: ""
|
|
190
|
-
},
|
|
191
|
-
bordered: Boolean,
|
|
192
|
-
pagination: {
|
|
193
|
-
type: [Object, Boolean],
|
|
194
|
-
default: null
|
|
195
|
-
},
|
|
196
|
-
loading: Boolean,
|
|
197
|
-
rowClassName: {
|
|
198
|
-
type: Function
|
|
199
|
-
},
|
|
200
|
-
scroll: {
|
|
201
|
-
type: Object,
|
|
202
|
-
default: null
|
|
203
|
-
},
|
|
204
|
-
beforeEditSubmit: {
|
|
205
|
-
type: Function
|
|
206
|
-
},
|
|
207
|
-
/**
|
|
208
|
-
* 行拖拽
|
|
209
|
-
*/
|
|
210
|
-
rowDraggable: { type: Boolean, default: !1 },
|
|
211
|
-
/**
|
|
212
|
-
* 仅支持同层级拖拽
|
|
213
|
-
*/
|
|
214
|
-
supportSameLevel: { type: Boolean, default: !1 },
|
|
215
|
-
/**
|
|
216
|
-
* 拖拽完成自动请求的api
|
|
217
|
-
*/
|
|
218
|
-
rowDragApi: { type: Function, default: null },
|
|
219
|
-
/**
|
|
220
|
-
* tree表格展开行
|
|
221
|
-
*/
|
|
222
|
-
expandedRowKeys: { type: Array, default: () => [] },
|
|
223
|
-
/**
|
|
224
|
-
* 空数据时全屏显示
|
|
225
|
-
*/
|
|
226
|
-
emptyFull: { type: Boolean, default: !1 }
|
|
227
|
-
}, _e = D({
|
|
228
|
-
name: "BasicTable",
|
|
229
|
-
components: {
|
|
230
|
-
HeaderCell: Ce
|
|
231
|
-
},
|
|
232
|
-
props: Be,
|
|
233
|
-
emits: ["change"],
|
|
234
|
-
setup(e, { attrs: o, emit: c, slots: y, expose: g }) {
|
|
235
|
-
const u = j(null), d = j([]), C = j(null), m = h(() => {
|
|
236
|
-
let t = {
|
|
237
|
-
...o
|
|
238
|
-
};
|
|
239
|
-
return t = I(t, ["class", "onChange"]), t;
|
|
240
|
-
});
|
|
241
|
-
function k(...t) {
|
|
242
|
-
c("change", ...t);
|
|
243
|
-
}
|
|
244
|
-
const a = h(() => {
|
|
245
|
-
const { emptyDataIsShowTable: t, useSearchForm: n, dataSource: s } = e;
|
|
246
|
-
return t || !n ? !0 : !!s.length;
|
|
247
|
-
});
|
|
248
|
-
return {
|
|
249
|
-
formRef: C,
|
|
250
|
-
tableElRef: u,
|
|
251
|
-
getBindValues: m,
|
|
252
|
-
handleTableChange: k,
|
|
253
|
-
expandKeysList: d,
|
|
254
|
-
getEmptyDataIsShowTable: a
|
|
255
|
-
};
|
|
256
|
-
},
|
|
257
|
-
mounted() {
|
|
258
|
-
this.expandKeysList = this.getBindValues.expandedRowKeys;
|
|
259
|
-
}
|
|
260
|
-
}), ke = { ref: "wrapRef" }, ve = {
|
|
261
|
-
key: 0,
|
|
262
|
-
class: "pr26px"
|
|
263
|
-
}, $e = {
|
|
264
|
-
key: 1,
|
|
265
|
-
class: "pr8px"
|
|
266
|
-
};
|
|
267
|
-
function we(e, o, c, y, g, u) {
|
|
268
|
-
const d = O("HeaderCell"), C = O("a-table");
|
|
269
|
-
return l(), p("div", ke, [
|
|
270
|
-
w(e.$slots, "beforeTable"),
|
|
271
|
-
ae(A(C, _({ ref: "tableElRef" }, e.getBindValues, {
|
|
272
|
-
"expanded-row-keys": e.expandKeysList,
|
|
273
|
-
"onUpdate:expandedRowKeys": o[0] || (o[0] = (m) => e.expandKeysList = m),
|
|
274
|
-
onChange: e.handleTableChange
|
|
275
|
-
}), ue({
|
|
276
|
-
headerCell: f(({ column: m }) => [
|
|
277
|
-
e.rowDraggable && m?.dataIndex === e.getBindValues.columns[0].dataIndex ? (l(), p(T, { key: 0 }, [
|
|
278
|
-
e.isTreeTable ? (l(), p("span", ve)) : (l(), p("span", $e)),
|
|
279
|
-
A(d, { column: m }, null, 8, ["column"])
|
|
280
|
-
], 64)) : (l(), b(d, {
|
|
281
|
-
key: 1,
|
|
282
|
-
column: m
|
|
283
|
-
}, null, 8, ["column"]))
|
|
284
|
-
]),
|
|
285
|
-
bodyCell: f((m) => [
|
|
286
|
-
w(e.$slots, "bodyCell", E(R(m || {})))
|
|
287
|
-
]),
|
|
288
|
-
_: 2
|
|
289
|
-
}, [
|
|
290
|
-
N(Object.keys(e.$slots), (m) => ({
|
|
291
|
-
name: m,
|
|
292
|
-
fn: f((k) => [
|
|
293
|
-
w(e.$slots, m, E(R(k || {})))
|
|
294
|
-
])
|
|
295
|
-
}))
|
|
296
|
-
]), 1040, ["expanded-row-keys", "onChange"]), [
|
|
297
|
-
[ie, e.getEmptyDataIsShowTable]
|
|
298
|
-
])
|
|
299
|
-
], 512);
|
|
300
|
-
}
|
|
301
|
-
const rt = /* @__PURE__ */ U(_e, [["render", we]]), G = "vben";
|
|
302
|
-
function re(e) {
|
|
303
|
-
return {
|
|
304
|
-
prefixCls: `${G}-${e}`,
|
|
305
|
-
prefixVar: G
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
const Se = {
|
|
309
|
-
key: 0,
|
|
310
|
-
class: "text-14px"
|
|
311
|
-
}, Ae = {
|
|
312
|
-
key: 0,
|
|
313
|
-
class: "text-14px"
|
|
314
|
-
}, lt = /* @__PURE__ */ D({
|
|
315
|
-
__name: "TableAction",
|
|
316
|
-
props: {
|
|
317
|
-
actions: {
|
|
318
|
-
type: Array,
|
|
319
|
-
default: null
|
|
320
|
-
},
|
|
321
|
-
dropDownActions: {
|
|
322
|
-
type: Array,
|
|
323
|
-
default: null
|
|
324
|
-
},
|
|
325
|
-
divider: {
|
|
326
|
-
type: Boolean,
|
|
327
|
-
default: !0
|
|
328
|
-
},
|
|
329
|
-
outside: Boolean,
|
|
330
|
-
stopButtonPropagation: {
|
|
331
|
-
type: Boolean,
|
|
332
|
-
default: !1
|
|
333
|
-
}
|
|
334
|
-
},
|
|
335
|
-
setup(e) {
|
|
336
|
-
const o = e, { prefixCls: c } = re("basic-table-action"), y = te.has;
|
|
337
|
-
function g(a) {
|
|
338
|
-
const t = a.ifShow;
|
|
339
|
-
let n = !0;
|
|
340
|
-
return me(t) && (n = t), P(t) && (n = t(a)), n;
|
|
341
|
-
}
|
|
342
|
-
const u = h(() => (V(o.actions) || []).filter((a) => y(a.auth) && g(a)).map((a) => {
|
|
343
|
-
const { popConfirm: t } = a;
|
|
344
|
-
return {
|
|
345
|
-
getPopupContainer: () => document.body,
|
|
346
|
-
type: "link",
|
|
347
|
-
size: "small",
|
|
348
|
-
...a,
|
|
349
|
-
...t || {},
|
|
350
|
-
onConfirm: t?.confirm,
|
|
351
|
-
onCancel: t?.cancel,
|
|
352
|
-
enable: !!t
|
|
353
|
-
};
|
|
354
|
-
})), d = h(() => {
|
|
355
|
-
const a = (V(o.dropDownActions) || []).filter(
|
|
356
|
-
(t) => y(t.auth) && g(t)
|
|
357
|
-
);
|
|
358
|
-
return a.map((t, n) => {
|
|
359
|
-
const { label: s, popConfirm: r } = t;
|
|
360
|
-
return {
|
|
361
|
-
...t,
|
|
362
|
-
...r,
|
|
363
|
-
onConfirm: r?.confirm,
|
|
364
|
-
onCancel: r?.cancel,
|
|
365
|
-
text: s,
|
|
366
|
-
divider: n < a.length - 1 ? o.divider : !1
|
|
367
|
-
};
|
|
368
|
-
});
|
|
369
|
-
}), C = h(() => "left");
|
|
370
|
-
function m(a) {
|
|
371
|
-
return {
|
|
372
|
-
getPopupContainer: () => document.body,
|
|
373
|
-
...K(a) ? { title: a } : a
|
|
374
|
-
};
|
|
375
|
-
}
|
|
376
|
-
function k(a) {
|
|
377
|
-
if (!o.stopButtonPropagation) return;
|
|
378
|
-
a.composedPath().find((s) => s.tagName?.toUpperCase() === "BUTTON") && a.stopPropagation();
|
|
379
|
-
}
|
|
380
|
-
return (a, t) => {
|
|
381
|
-
const n = O("a-button");
|
|
382
|
-
return l(), p("div", {
|
|
383
|
-
class: J([i(c), C.value]),
|
|
384
|
-
onClick: k
|
|
385
|
-
}, [
|
|
386
|
-
(l(!0), p(T, null, N(u.value, (s, r) => (l(), p(T, {
|
|
387
|
-
key: `${r}-${s.label}`
|
|
388
|
-
}, [
|
|
389
|
-
s.tooltip ? (l(), b(i(Y), _({
|
|
390
|
-
key: 0,
|
|
391
|
-
placement: "bottom"
|
|
392
|
-
}, { ref_for: !0 }, m(s.tooltip)), {
|
|
393
|
-
default: f(() => [
|
|
394
|
-
A(i(F), _({ ref_for: !0 }, s), {
|
|
395
|
-
default: f(() => [
|
|
396
|
-
s.label ? (l(), p("span", Se, $(s.label), 1)) : B("", !0)
|
|
397
|
-
]),
|
|
398
|
-
_: 2
|
|
399
|
-
}, 1040)
|
|
400
|
-
]),
|
|
401
|
-
_: 2
|
|
402
|
-
}, 1040)) : (l(), b(i(F), _({
|
|
403
|
-
key: 1,
|
|
404
|
-
ref_for: !0
|
|
405
|
-
}, s), {
|
|
406
|
-
default: f(() => [
|
|
407
|
-
s.label ? (l(), p("span", Ae, $(s.label), 1)) : B("", !0)
|
|
408
|
-
]),
|
|
409
|
-
_: 2
|
|
410
|
-
}, 1040)),
|
|
411
|
-
e.divider && r < u.value.length - 1 ? (l(), b(i(Z), {
|
|
412
|
-
key: 2,
|
|
413
|
-
type: "vertical",
|
|
414
|
-
class: "action-divider"
|
|
415
|
-
})) : B("", !0)
|
|
416
|
-
], 64))), 128)),
|
|
417
|
-
e.dropDownActions && d.value.length > 0 ? (l(), b(i(se), {
|
|
418
|
-
key: 0,
|
|
419
|
-
trigger: ["hover"],
|
|
420
|
-
"drop-menu-list": d.value,
|
|
421
|
-
popconfirm: ""
|
|
422
|
-
}, {
|
|
423
|
-
default: f(() => [
|
|
424
|
-
w(a.$slots, "more"),
|
|
425
|
-
a.$slots.more ? B("", !0) : (l(), b(n, {
|
|
426
|
-
key: 0,
|
|
427
|
-
type: "link",
|
|
428
|
-
size: "small"
|
|
429
|
-
}, {
|
|
430
|
-
default: f(() => [
|
|
431
|
-
A(i(X), { class: "icon-more" })
|
|
432
|
-
]),
|
|
433
|
-
_: 1
|
|
434
|
-
}))
|
|
435
|
-
]),
|
|
436
|
-
_: 3
|
|
437
|
-
}, 8, ["drop-menu-list"])) : B("", !0)
|
|
438
|
-
], 2);
|
|
439
|
-
};
|
|
440
|
-
}
|
|
441
|
-
}), De = {
|
|
442
|
-
key: 0,
|
|
443
|
-
class: "text-14px"
|
|
444
|
-
}, Te = {
|
|
445
|
-
key: 0,
|
|
446
|
-
class: "text-14px"
|
|
447
|
-
}, st = /* @__PURE__ */ D({
|
|
448
|
-
__name: "TableActionAuto",
|
|
449
|
-
props: {
|
|
450
|
-
actions: {
|
|
451
|
-
type: Array,
|
|
452
|
-
default: null
|
|
453
|
-
},
|
|
454
|
-
divider: {
|
|
455
|
-
type: Boolean,
|
|
456
|
-
default: !0
|
|
457
|
-
},
|
|
458
|
-
outside: Boolean,
|
|
459
|
-
stopButtonPropagation: {
|
|
460
|
-
type: Boolean,
|
|
461
|
-
default: !1
|
|
462
|
-
},
|
|
463
|
-
maxDispalyCount: {
|
|
464
|
-
type: Number,
|
|
465
|
-
default: 4
|
|
466
|
-
}
|
|
467
|
-
},
|
|
468
|
-
setup(e) {
|
|
469
|
-
const o = e, { prefixCls: c } = re("basic-table-action"), y = te.has;
|
|
470
|
-
function g(t) {
|
|
471
|
-
const n = t.ifShow ?? !0;
|
|
472
|
-
return P(n) ? n(t) : !!n;
|
|
473
|
-
}
|
|
474
|
-
const u = h(() => [...V(o.actions) || []].filter((t) => y(t.auth) && g(t))), d = h(() => {
|
|
475
|
-
let t = [];
|
|
476
|
-
return o.maxDispalyCount >= u.value.length ? t = [...u.value] : t = u.value.slice(0, o.maxDispalyCount), t.map((n) => {
|
|
477
|
-
const { popConfirm: s } = n;
|
|
478
|
-
return {
|
|
479
|
-
getPopupContainer: () => document.body,
|
|
480
|
-
type: "link",
|
|
481
|
-
size: "small",
|
|
482
|
-
...n,
|
|
483
|
-
...s || {},
|
|
484
|
-
onConfirm: s?.confirm,
|
|
485
|
-
onCancel: s?.cancel,
|
|
486
|
-
enable: !!s
|
|
487
|
-
};
|
|
488
|
-
});
|
|
489
|
-
}), C = h(() => {
|
|
490
|
-
let t = [];
|
|
491
|
-
return o.maxDispalyCount >= u.value.length ? [] : (t = u.value.slice(o.maxDispalyCount), t.map((n, s) => {
|
|
492
|
-
const { label: r, popConfirm: v } = n;
|
|
493
|
-
return {
|
|
494
|
-
...n,
|
|
495
|
-
...v,
|
|
496
|
-
onConfirm: v?.confirm,
|
|
497
|
-
onCancel: v?.cancel,
|
|
498
|
-
text: r,
|
|
499
|
-
divider: s < t.length - 1 ? o.divider : !1
|
|
500
|
-
};
|
|
501
|
-
}));
|
|
502
|
-
}), m = h(() => "left");
|
|
503
|
-
function k(t) {
|
|
504
|
-
return {
|
|
505
|
-
getPopupContainer: () => document.body,
|
|
506
|
-
placement: "bottom",
|
|
507
|
-
...K(t) ? { title: t } : t
|
|
508
|
-
};
|
|
509
|
-
}
|
|
510
|
-
function a(t) {
|
|
511
|
-
if (!o.stopButtonPropagation) return;
|
|
512
|
-
t.composedPath().find((r) => r.tagName?.toUpperCase() === "BUTTON") && t.stopPropagation();
|
|
513
|
-
}
|
|
514
|
-
return (t, n) => {
|
|
515
|
-
const s = O("a-button");
|
|
516
|
-
return l(), p("div", {
|
|
517
|
-
class: J([i(c), m.value]),
|
|
518
|
-
onClick: z(a, ["stop"])
|
|
519
|
-
}, [
|
|
520
|
-
(l(!0), p(T, null, N(d.value, (r, v) => (l(), p(T, {
|
|
521
|
-
key: `${v}-${r.label}`
|
|
522
|
-
}, [
|
|
523
|
-
r.tooltip ? (l(), b(i(Y), _({
|
|
524
|
-
key: 0,
|
|
525
|
-
ref_for: !0
|
|
526
|
-
}, k(r.tooltip)), {
|
|
527
|
-
default: f(() => [
|
|
528
|
-
A(i(F), _({ ref_for: !0 }, r), {
|
|
529
|
-
default: f(() => [
|
|
530
|
-
r.label ? (l(), p("span", De, $(r.label), 1)) : B("", !0)
|
|
531
|
-
]),
|
|
532
|
-
_: 2
|
|
533
|
-
}, 1040)
|
|
534
|
-
]),
|
|
535
|
-
_: 2
|
|
536
|
-
}, 1040)) : (l(), b(i(F), _({
|
|
537
|
-
key: 1,
|
|
538
|
-
ref_for: !0
|
|
539
|
-
}, r), {
|
|
540
|
-
default: f(() => [
|
|
541
|
-
r.label ? (l(), p("span", Te, $(r.label), 1)) : B("", !0)
|
|
542
|
-
]),
|
|
543
|
-
_: 2
|
|
544
|
-
}, 1040)),
|
|
545
|
-
e.divider && v < d.value.length - 1 ? (l(), b(i(Z), {
|
|
546
|
-
key: 2,
|
|
547
|
-
type: "vertical",
|
|
548
|
-
class: "action-divider"
|
|
549
|
-
})) : B("", !0)
|
|
550
|
-
], 64))), 128)),
|
|
551
|
-
C.value.length > 0 ? (l(), b(i(se), {
|
|
552
|
-
key: 0,
|
|
553
|
-
trigger: ["hover"],
|
|
554
|
-
"drop-menu-list": C.value,
|
|
555
|
-
popconfirm: ""
|
|
556
|
-
}, {
|
|
557
|
-
default: f(() => [
|
|
558
|
-
w(t.$slots, "more"),
|
|
559
|
-
t.$slots.more ? B("", !0) : (l(), b(s, {
|
|
560
|
-
key: 0,
|
|
561
|
-
type: "link",
|
|
562
|
-
size: "small"
|
|
563
|
-
}, {
|
|
564
|
-
default: f(() => [
|
|
565
|
-
A(i(X), { class: "icon-more" })
|
|
566
|
-
]),
|
|
567
|
-
_: 1
|
|
568
|
-
}))
|
|
569
|
-
]),
|
|
570
|
-
_: 3
|
|
571
|
-
}, 8, ["drop-menu-list"])) : B("", !0)
|
|
572
|
-
], 2);
|
|
573
|
-
};
|
|
574
|
-
}
|
|
575
|
-
}), xe = ["primary", "error", "warning", "success", ""], Pe = {
|
|
576
|
-
color: {
|
|
577
|
-
type: String,
|
|
578
|
-
validator: (e) => xe.includes(e),
|
|
579
|
-
default: ""
|
|
580
|
-
},
|
|
581
|
-
loading: { type: Boolean },
|
|
582
|
-
disabled: { type: Boolean },
|
|
583
|
-
/**
|
|
584
|
-
* Text before icon.
|
|
585
|
-
*/
|
|
586
|
-
preIcon: { type: String },
|
|
587
|
-
/**
|
|
588
|
-
* Text after icon.
|
|
589
|
-
*/
|
|
590
|
-
postIcon: { type: String },
|
|
591
|
-
/**
|
|
592
|
-
* preIcon and postIcon icon size.
|
|
593
|
-
* @default: 14
|
|
594
|
-
*/
|
|
595
|
-
iconSize: { type: Number, default: 14 },
|
|
596
|
-
onClick: {
|
|
597
|
-
type: Function,
|
|
598
|
-
default: null
|
|
599
|
-
}
|
|
600
|
-
}, le = /* @__PURE__ */ D({
|
|
601
|
-
name: "AButton",
|
|
602
|
-
extends: W,
|
|
603
|
-
inheritAttrs: !1,
|
|
604
|
-
__name: "BasicButton",
|
|
605
|
-
props: Pe,
|
|
606
|
-
setup(e) {
|
|
607
|
-
const o = e, c = Q(), y = h(() => {
|
|
608
|
-
const { color: u, disabled: d } = o;
|
|
609
|
-
return [
|
|
610
|
-
{
|
|
611
|
-
[`ant-btn-${u}`]: !!u,
|
|
612
|
-
"is-disabled": d
|
|
613
|
-
}
|
|
614
|
-
];
|
|
615
|
-
}), g = h(() => ({ ...i(c), ...o }));
|
|
616
|
-
return (u, d) => (l(), b(i(W), _(g.value, {
|
|
617
|
-
class: y.value,
|
|
618
|
-
onClick: u.onClick
|
|
619
|
-
}), {
|
|
620
|
-
default: f((C) => [
|
|
621
|
-
w(u.$slots, "default", E(R(C || {})))
|
|
622
|
-
]),
|
|
623
|
-
_: 3
|
|
624
|
-
}, 16, ["class", "onClick"]));
|
|
625
|
-
}
|
|
626
|
-
}), Oe = {
|
|
627
|
-
/**
|
|
628
|
-
* Whether to enable the drop-down menu
|
|
629
|
-
* @default: true
|
|
630
|
-
*/
|
|
631
|
-
enable: {
|
|
632
|
-
type: Boolean,
|
|
633
|
-
default: !0
|
|
634
|
-
}
|
|
635
|
-
}, Ie = D({
|
|
636
|
-
name: "PopButton",
|
|
637
|
-
inheritAttrs: !1,
|
|
638
|
-
props: Oe,
|
|
639
|
-
setup(e, { slots: o }) {
|
|
640
|
-
const c = Q(), y = h(() => Object.assign(
|
|
641
|
-
{
|
|
642
|
-
okText: q("sys.okText"),
|
|
643
|
-
cancelText: q("sys.cancelText"),
|
|
644
|
-
overlayStyle: {}
|
|
645
|
-
},
|
|
646
|
-
{ ...e, ...i(c) }
|
|
647
|
-
));
|
|
648
|
-
return () => {
|
|
649
|
-
const g = I(i(y), "icon"), u = I(g, "title");
|
|
650
|
-
u.disabled && (u.color = "");
|
|
651
|
-
const d = H(le, u, o);
|
|
652
|
-
return e.enable ? H(ee, g, { default: () => d }) : d;
|
|
653
|
-
};
|
|
654
|
-
}
|
|
655
|
-
}), Fe = { class: "custom-btn-container" }, Ne = { class: "btn-left-title" }, je = /* @__PURE__ */ D({
|
|
656
|
-
__name: "custom-button",
|
|
657
|
-
props: {
|
|
658
|
-
title: {}
|
|
659
|
-
},
|
|
660
|
-
emits: ["btn-left-click", "btn-right-click"],
|
|
661
|
-
setup(e) {
|
|
662
|
-
return (o, c) => (l(), p("div", Fe, [
|
|
663
|
-
x("div", {
|
|
664
|
-
class: "btn-left",
|
|
665
|
-
onClick: c[0] || (c[0] = z((y) => o.$emit("btn-left-click"), ["stop"]))
|
|
666
|
-
}, [
|
|
667
|
-
w(o.$slots, "left-icon", {}, void 0, !0),
|
|
668
|
-
x("div", Ne, $(e.title), 1)
|
|
669
|
-
]),
|
|
670
|
-
x("div", {
|
|
671
|
-
class: "btn-right",
|
|
672
|
-
onClick: c[1] || (c[1] = z((y) => o.$emit("btn-right-click"), ["stop"]))
|
|
673
|
-
}, [
|
|
674
|
-
w(o.$slots, "right-icon", {}, void 0, !0)
|
|
675
|
-
])
|
|
676
|
-
]));
|
|
677
|
-
}
|
|
678
|
-
}), at = /* @__PURE__ */ U(je, [["__scopeId", "data-v-305f4090"]]), ut = le, F = Ie, Me = { class: "ml-1" }, Ee = {
|
|
679
|
-
key: 1,
|
|
680
|
-
class: "ml-1"
|
|
681
|
-
}, Re = /* @__PURE__ */ D({
|
|
682
|
-
name: "VDropdown",
|
|
683
|
-
__name: "Dropdown",
|
|
684
|
-
props: {
|
|
685
|
-
popconfirm: Boolean,
|
|
686
|
-
/**
|
|
687
|
-
* the trigger mode which executes the drop-down action
|
|
688
|
-
* @default ['hover']
|
|
689
|
-
* @type string[]
|
|
690
|
-
*/
|
|
691
|
-
trigger: {
|
|
692
|
-
type: Array,
|
|
693
|
-
default: () => ["contextmenu"]
|
|
694
|
-
},
|
|
695
|
-
dropMenuList: {
|
|
696
|
-
type: Array,
|
|
697
|
-
default: () => []
|
|
698
|
-
},
|
|
699
|
-
selectedKeys: {
|
|
700
|
-
type: Array,
|
|
701
|
-
default: () => []
|
|
702
|
-
}
|
|
703
|
-
},
|
|
704
|
-
emits: ["menuEvent"],
|
|
705
|
-
setup(e, { emit: o }) {
|
|
706
|
-
const c = pe, y = M, g = M.Item, u = M.Divider, d = ee, C = e, m = o;
|
|
707
|
-
function k(n) {
|
|
708
|
-
const { event: s } = n, r = C.dropMenuList.find((v) => `${v.event}` == `${s}`);
|
|
709
|
-
m("menuEvent", r), n.onClick?.();
|
|
710
|
-
}
|
|
711
|
-
function a(n) {
|
|
712
|
-
const s = I(n, ["confirm", "cancel", "icon"]);
|
|
713
|
-
return !n.onConfirm && n.confirm && P(n.confirm) && (s.onConfirm = n.confirm), !n.onCancel && n.cancel && P(n.cancel) && (s.onCancel = n.cancel), s;
|
|
714
|
-
}
|
|
715
|
-
const t = (n) => ({ key: n });
|
|
716
|
-
return (n, s) => (l(), b(i(c), _({ trigger: e.trigger }, n.$attrs), {
|
|
717
|
-
overlay: f(() => [
|
|
718
|
-
A(i(y), { "selected-keys": e.selectedKeys }, {
|
|
719
|
-
default: f(() => [
|
|
720
|
-
(l(!0), p(T, null, N(e.dropMenuList, (r) => (l(), p(T, {
|
|
721
|
-
key: `${r.event}`
|
|
722
|
-
}, [
|
|
723
|
-
A(i(g), _({
|
|
724
|
-
class: r.class
|
|
725
|
-
}, { ref_for: !0 }, t(r.event), {
|
|
726
|
-
disabled: r.disabled,
|
|
727
|
-
onClick: (v) => k(r)
|
|
728
|
-
}), {
|
|
729
|
-
default: f(() => [
|
|
730
|
-
e.popconfirm && r.popConfirm ? (l(), b(i(d), _({
|
|
731
|
-
key: 0,
|
|
732
|
-
ref_for: !0
|
|
733
|
-
}, a(r.popConfirm)), {
|
|
734
|
-
default: f(() => [
|
|
735
|
-
x("div", null, [
|
|
736
|
-
x("span", Me, $(r.text), 1)
|
|
737
|
-
])
|
|
738
|
-
]),
|
|
739
|
-
_: 2
|
|
740
|
-
}, 1040)) : (l(), p("span", Ee, $(r.text), 1))
|
|
741
|
-
]),
|
|
742
|
-
_: 2
|
|
743
|
-
}, 1040, ["class", "disabled", "onClick"]),
|
|
744
|
-
r.divider ? (l(), b(i(u), {
|
|
745
|
-
key: `d-${r.event}`
|
|
746
|
-
})) : B("", !0)
|
|
747
|
-
], 64))), 128))
|
|
748
|
-
]),
|
|
749
|
-
_: 1
|
|
750
|
-
}, 8, ["selected-keys"])
|
|
751
|
-
]),
|
|
752
|
-
default: f(() => [
|
|
753
|
-
x("span", null, [
|
|
754
|
-
w(n.$slots, "default")
|
|
755
|
-
]),
|
|
756
|
-
ce(" " + $(e.dropMenuList) + " ", 1)
|
|
757
|
-
]),
|
|
758
|
-
_: 3
|
|
759
|
-
}, 16, ["trigger"]));
|
|
760
|
-
}
|
|
761
|
-
}), se = Re;
|
|
762
|
-
function it() {
|
|
763
|
-
}
|
|
764
|
-
export {
|
|
765
|
-
rt as BasicTable,
|
|
766
|
-
ut as Button,
|
|
767
|
-
at as CustomButton,
|
|
768
|
-
se as Dropdown,
|
|
769
|
-
F as PopConfirmButton,
|
|
770
|
-
lt as TableAction,
|
|
771
|
-
st as TableActionAuto,
|
|
772
|
-
S as is,
|
|
773
|
-
ye as isArray,
|
|
774
|
-
me as isBoolean,
|
|
775
|
-
tt as isClient,
|
|
776
|
-
We as isDate,
|
|
777
|
-
de as isDef,
|
|
778
|
-
Ze as isElement,
|
|
779
|
-
He as isEmpty,
|
|
780
|
-
ot as isEmptyStr,
|
|
781
|
-
P as isFunction,
|
|
782
|
-
et as isMap,
|
|
783
|
-
oe as isNull,
|
|
784
|
-
qe as isNullAndUnDef,
|
|
785
|
-
Ge as isNullOrUnDef,
|
|
786
|
-
Je as isNumber,
|
|
787
|
-
L as isObject,
|
|
788
|
-
Qe as isPromise,
|
|
789
|
-
Xe as isRegExp,
|
|
790
|
-
ge as isServer,
|
|
791
|
-
K as isString,
|
|
792
|
-
ne as isUnDef,
|
|
793
|
-
nt as isUrl,
|
|
794
|
-
Ye as isWindow,
|
|
795
|
-
it as run
|
|
796
|
-
};
|