@web-utils/component 3.0.6 → 3.1.0
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/address-input/index.mjs +20 -57
- package/affix/index.mjs +26 -47
- package/aside-menu/index.mjs +18 -43
- package/avatar/index.mjs +27 -49
- package/awesome-button/index.mjs +35 -43
- package/capsule-tab/index.mjs +16 -34
- package/card/index.mjs +21 -76
- package/carousel/index.mjs +14 -49
- package/chat/index.mjs +104 -414
- package/chunk-file-uploader/index.mjs +21 -38
- package/chunks/FormTemp.aa57efb4.mjs +125 -0
- package/code-mirror-editor/index.mjs +69 -79
- package/color-picker/index.mjs +29 -60
- package/comment/index.mjs +17 -48
- package/confirm-button/index.mjs +11 -19
- package/confirmable/index.mjs +12 -20
- package/context-menu/index.mjs +42 -144
- package/count-up/index.mjs +18 -25
- package/custom-scrollbar/index.mjs +13 -22
- package/data-box/index.mjs +15 -66
- package/data-card/index.mjs +16 -65
- package/data-cardtext/index.mjs +16 -52
- package/data-display/index.mjs +18 -62
- package/data-icons/index.mjs +16 -68
- package/data-imgtext/index.mjs +18 -79
- package/data-operatext/index.mjs +18 -75
- package/data-panel/index.mjs +16 -63
- package/data-pay/index.mjs +20 -122
- package/data-price/index.mjs +18 -60
- package/data-progress/index.mjs +16 -67
- package/data-rotate/index.mjs +16 -66
- package/data-table-picker/index.mjs +25 -88
- package/data-tabs/index.mjs +16 -64
- package/dialog-form/index.mjs +48 -94
- package/dynamic-table/index.mjs +43 -127
- package/e-charts/index.mjs +21 -34
- package/easy-popup/index.mjs +35 -61
- package/editable-progress/index.mjs +22 -77
- package/editable-tree/index.mjs +235 -546
- package/egd-collapse/index.mjs +13 -26
- package/egd-collapse-item/index.mjs +27 -87
- package/element-dialog/index.mjs +69 -133
- package/empty-view/index.mjs +13 -33
- package/error-view/index.mjs +14 -34
- package/flex-column/index.mjs +15 -23
- package/flex-item/index.mjs +18 -26
- package/flex-row/index.mjs +23 -31
- package/flex-scroller/index.mjs +16 -27
- package/flow/index.mjs +70 -110
- package/flow-designer/index.mjs +1215 -4804
- package/flow-node/index.mjs +15 -51
- package/flow-viewer/index.mjs +64 -89
- package/form-block/index.mjs +43 -62
- package/form-button/index.mjs +10 -18
- package/form-cascader/index.mjs +49 -100
- package/form-checkbox-group/index.mjs +43 -110
- package/form-date-picker/index.mjs +51 -97
- package/form-holder/index.mjs +25 -42
- package/form-input/index.mjs +40 -90
- package/form-input-email/index.mjs +35 -79
- package/form-input-id-card/index.mjs +40 -87
- package/form-input-number/index.mjs +42 -102
- package/form-input-phone-number/index.mjs +34 -75
- package/form-input-tag/index.mjs +31 -73
- package/form-input-time/index.mjs +42 -87
- package/form-item/index.mjs +70 -89
- package/form-item-config-provider/index.mjs +12 -20
- package/form-item-group/index.mjs +46 -65
- package/form-radio-group/index.mjs +50 -108
- package/form-select/index.mjs +44 -95
- package/form-switch/index.mjs +38 -85
- package/form-textarea/index.mjs +31 -75
- package/form-view/index.mjs +112 -260
- package/fy-array/index.mjs +35 -121
- package/fy-article/index.mjs +12 -43
- package/fy-cascader/index.mjs +26 -67
- package/fy-checkbox/index.mjs +27 -77
- package/fy-code/index.mjs +19 -33
- package/fy-curd/index.mjs +810 -2017
- package/fy-date/index.mjs +18 -59
- package/fy-draggable/index.mjs +81 -140
- package/fy-dynamic/index.mjs +85 -204
- package/fy-empty/index.mjs +14 -35
- package/fy-form/index.mjs +254 -571
- package/fy-form-design/index.mjs +1489 -6084
- package/fy-form-design/style.css +1 -1
- package/fy-input/index.mjs +34 -104
- package/fy-input-color/index.mjs +22 -67
- package/fy-input-icon/index.mjs +37 -122
- package/fy-input-map/index.mjs +57 -149
- package/fy-input-number/index.mjs +18 -53
- package/fy-input-table/index.mjs +36 -102
- package/fy-input-tree/index.mjs +51 -138
- package/fy-progress/index.mjs +12 -31
- package/fy-radio/index.mjs +20 -51
- package/fy-rate/index.mjs +18 -51
- package/fy-select/index.mjs +49 -134
- package/fy-slider/index.mjs +19 -52
- package/fy-switch/index.mjs +18 -48
- package/fy-tabs/index.mjs +19 -51
- package/fy-time/index.mjs +22 -62
- package/fy-title/index.mjs +14 -25
- package/fy-tree/index.mjs +74 -216
- package/fy-u-editor/index.mjs +50 -64
- package/fy-upload/index.mjs +167 -338
- package/guide-steps/index.mjs +33 -53
- package/highlight-j-s/index.mjs +13 -27
- package/icon-card/index.mjs +12 -36
- package/icon-temp/index.mjs +12 -34
- package/iframe-window/index.mjs +13 -40
- package/image-cropper/index.mjs +46 -171
- package/image-preview/index.mjs +54 -168
- package/image-viewer/index.mjs +24 -50
- package/index.css +1 -0
- package/index.mjs +3973 -501
- package/input-number/index.mjs +84 -173
- package/input-number-range/index.mjs +20 -70
- package/j-s-x-component/index.mjs +3 -3
- package/keep-view-alive/index.mjs +47 -55
- package/keyboard/index.mjs +100 -113
- package/license/index.mjs +34 -51
- package/loading-view/index.mjs +14 -34
- package/login/index.mjs +33 -161
- package/monaco-editor/index.mjs +13 -21
- package/name-avatar/index.mjs +13 -32
- package/nav-bar/index.mjs +12 -31
- package/not-implement/index.mjs +14 -25
- package/notice/index.mjs +32 -80
- package/package.json +1 -1
- package/page/index.mjs +11 -23
- package/page-header/index.mjs +16 -37
- package/page-index/index.mjs +42 -93
- package/page-index-top/index.mjs +42 -84
- package/page-skeleton/index.mjs +24 -39
- package/page-skeleton-new/index.mjs +21 -68
- package/pageable-table/index.mjs +105 -227
- package/pageable-view/index.mjs +30 -83
- package/photo-swipe/index.mjs +62 -87
- package/present-view/index.mjs +114 -267
- package/queue/index.mjs +14 -29
- package/record-video/index.mjs +29 -66
- package/resize-observer/index.mjs +18 -30
- package/search/index.mjs +47 -81
- package/search-popover/index.mjs +57 -329
- package/sign/index.mjs +43 -60
- package/sign-panel/index.mjs +40 -151
- package/skeleton/index.mjs +18 -44
- package/split-pane/index.mjs +45 -129
- package/stateful/index.mjs +18 -26
- package/static-pageable-table/index.mjs +18 -44
- package/swiper/index.mjs +53 -94
- package/tab/index.mjs +13 -39
- package/tab-item/index.mjs +23 -37
- package/table-column/index.mjs +27 -35
- package/table-view/index.mjs +89 -209
- package/tag-render/index.mjs +34 -69
- package/text-ellipsis/index.mjs +22 -47
- package/tinymce-editor/index.mjs +174 -285
- package/toolbar/index.mjs +21 -42
- package/toolbar-button/index.mjs +25 -54
- package/verify/index.mjs +16 -29
- package/vue-cron/index.mjs +272 -1089
- package/vue-qr-code/index.mjs +19 -27
- package/vue-quill-editor/index.mjs +15 -27
- package/vue-tags-input/index.mjs +104 -224
- package/vue-tree-select/index.mjs +595 -742
- package/vue-video-player/index.mjs +42 -57
- package/watermark/index.mjs +27 -35
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +50 -112
- package/chunks/FormTemp.7f91629d.mjs +0 -165
- /package/chunks/{vueComponentNormalizer.446f5dc4.mjs → _plugin-vue2_normalizer.446f5dc4.mjs} +0 -0
package/table-view/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var a = (r, e, t) => new Promise((s, l) => {
|
|
2
|
+
var o = (i) => {
|
|
3
3
|
try {
|
|
4
4
|
c(t.next(i));
|
|
5
5
|
} catch (h) {
|
|
@@ -11,159 +11,14 @@ var o = (e, r, t) => new Promise((s, l) => {
|
|
|
11
11
|
} catch (h) {
|
|
12
12
|
l(h);
|
|
13
13
|
}
|
|
14
|
-
}, c = (i) => i.done ? s(i.value) : Promise.resolve(i.value).then(
|
|
15
|
-
c((t = t.apply(
|
|
14
|
+
}, c = (i) => i.done ? s(i.value) : Promise.resolve(i.value).then(o, b);
|
|
15
|
+
c((t = t.apply(r, e)).next());
|
|
16
16
|
});
|
|
17
17
|
import { merge as n } from "@web-utils/integrations/lodash";
|
|
18
|
-
import { isString as d, isArray as
|
|
19
|
-
import { k as
|
|
20
|
-
import { n as
|
|
21
|
-
|
|
22
|
-
var e = this, r = e.$createElement, t = e._self._c || r;
|
|
23
|
-
return t("div", {
|
|
24
|
-
staticClass: "table-view"
|
|
25
|
-
}, [t("Toolbar", e._g(e._b({
|
|
26
|
-
on: {
|
|
27
|
-
search: e.toggleSearch,
|
|
28
|
-
del: e.del,
|
|
29
|
-
create: e.create,
|
|
30
|
-
reload: e.reloadTable,
|
|
31
|
-
imp: function(s) {
|
|
32
|
-
e.importDialogVisible = !0;
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
scopedSlots: e._u([{
|
|
36
|
-
key: "default",
|
|
37
|
-
fn: function() {
|
|
38
|
-
return [e._t("toolbar-button")];
|
|
39
|
-
},
|
|
40
|
-
proxy: !0
|
|
41
|
-
}, e._l(e.buttonSlots, function(s) {
|
|
42
|
-
return {
|
|
43
|
-
key: s,
|
|
44
|
-
fn: function() {
|
|
45
|
-
return [e._t(s)];
|
|
46
|
-
},
|
|
47
|
-
proxy: !0
|
|
48
|
-
};
|
|
49
|
-
})], null, !0)
|
|
50
|
-
}, "Toolbar", e.toolbarProps, !1), e.toolbarListeners)), t("div", {
|
|
51
|
-
staticClass: "table-view-content-wrapper"
|
|
52
|
-
}, [t("div", {
|
|
53
|
-
staticClass: "table-view-content"
|
|
54
|
-
}, [e.treeProps.show ? t("div", {
|
|
55
|
-
ref: "treeScroller",
|
|
56
|
-
staticClass: "table-view-sidebar",
|
|
57
|
-
on: {
|
|
58
|
-
scroll: e.onTreeScroll
|
|
59
|
-
}
|
|
60
|
-
}, [t("div", {
|
|
61
|
-
staticStyle: {
|
|
62
|
-
"font-size": "16px"
|
|
63
|
-
}
|
|
64
|
-
}, [e._v("视图导航")]), t("EditableTree", e._g(e._b({
|
|
65
|
-
ref: "tree",
|
|
66
|
-
attrs: {
|
|
67
|
-
readonly: ""
|
|
68
|
-
},
|
|
69
|
-
scopedSlots: e._u([{
|
|
70
|
-
key: "default",
|
|
71
|
-
fn: function(s) {
|
|
72
|
-
var l = s.node, a = s.data;
|
|
73
|
-
return [e._t("tree-node", function() {
|
|
74
|
-
return [t("span", [t("i", {
|
|
75
|
-
staticClass: "node-icon",
|
|
76
|
-
class: l.childNodes.length > 0 ? l.expanded ? "el-icon-folder-opened" : "el-icon-folder" : "el-icon-tickets"
|
|
77
|
-
}), e._t("tree-label", function() {
|
|
78
|
-
return [e._v(e._s(l.label))];
|
|
79
|
-
}, {
|
|
80
|
-
node: l,
|
|
81
|
-
data: a
|
|
82
|
-
})], 2)];
|
|
83
|
-
}, {
|
|
84
|
-
node: l,
|
|
85
|
-
data: a
|
|
86
|
-
})];
|
|
87
|
-
}
|
|
88
|
-
}], null, !0)
|
|
89
|
-
}, "EditableTree", e.treeProps, !1), e.treeListeners))], 1) : e._e(), t("div", {
|
|
90
|
-
staticClass: "table-view-table"
|
|
91
|
-
}, [t("PageableTable", e._g(e._b({
|
|
92
|
-
ref: "table",
|
|
93
|
-
class: [{
|
|
94
|
-
"border-top": e.borderTop,
|
|
95
|
-
"border-bottom": e.borderBottom,
|
|
96
|
-
"border-left": e.borderLeft || e.treeAttrs && e.treeAttrs.show,
|
|
97
|
-
"border-right": e.borderRight
|
|
98
|
-
}],
|
|
99
|
-
attrs: {
|
|
100
|
-
border: e.border
|
|
101
|
-
},
|
|
102
|
-
on: {
|
|
103
|
-
"row-dblclick": e.rowDbClick,
|
|
104
|
-
"selection-change": e.onSelectionChange
|
|
105
|
-
}
|
|
106
|
-
}, "PageableTable", e.tableProps, !1), e.tableListeners), [e._t("columns")], 2)], 1)]), e.toolbarProps.searchable ? t("div", {
|
|
107
|
-
staticClass: "slide-panel",
|
|
108
|
-
style: {
|
|
109
|
-
right: `${e.right}px`,
|
|
110
|
-
width: `${e.searchPanelProps.width}px`
|
|
111
|
-
}
|
|
112
|
-
}, [e._m(0), t("div", {
|
|
113
|
-
staticClass: "slide-panel-content"
|
|
114
|
-
}, [t("ElForm", {
|
|
115
|
-
ref: "form",
|
|
116
|
-
attrs: {
|
|
117
|
-
"label-position": "right",
|
|
118
|
-
model: e.searchModel || e.searchPanelProps.model,
|
|
119
|
-
size: "mini",
|
|
120
|
-
"label-width": e.labelWidth
|
|
121
|
-
},
|
|
122
|
-
nativeOn: {
|
|
123
|
-
"!submit": function(s) {
|
|
124
|
-
return s.preventDefault(), e.onSearchClick.apply(null, arguments);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}, [t("FormItemConfigProvider", {
|
|
128
|
-
attrs: {
|
|
129
|
-
block: "",
|
|
130
|
-
"wrap-col": !1
|
|
131
|
-
}
|
|
132
|
-
}, [t("ElRow", {
|
|
133
|
-
attrs: {
|
|
134
|
-
gutter: 0
|
|
135
|
-
}
|
|
136
|
-
}, [e._t("search-form", function() {
|
|
137
|
-
return [t("p", [e._v("请添加搜索条件!")])];
|
|
138
|
-
})], 2)], 1), t("ElFormItem", {
|
|
139
|
-
attrs: {
|
|
140
|
-
"label-width": "0"
|
|
141
|
-
}
|
|
142
|
-
}, [t("div", {
|
|
143
|
-
staticClass: "slide-panel-actions"
|
|
144
|
-
}, [t("ElButton", {
|
|
145
|
-
attrs: {
|
|
146
|
-
type: "primary",
|
|
147
|
-
"native-type": "submit",
|
|
148
|
-
size: "mini"
|
|
149
|
-
}
|
|
150
|
-
}, [e._v(" 开始搜索 ")]), t("ElButton", {
|
|
151
|
-
attrs: {
|
|
152
|
-
size: "mini"
|
|
153
|
-
},
|
|
154
|
-
on: {
|
|
155
|
-
click: e.onClearClick
|
|
156
|
-
}
|
|
157
|
-
}, [e._v(" 清除条件 ")])], 1)])], 1)], 1)]) : e._e()]), e._t("default")], 2);
|
|
158
|
-
}, S = [function() {
|
|
159
|
-
var e = this, r = e.$createElement, t = e._self._c || r;
|
|
160
|
-
return t("div", {
|
|
161
|
-
staticClass: "slide-panel-line"
|
|
162
|
-
}, [t("div", {
|
|
163
|
-
staticClass: "slide-panel-line-indicator"
|
|
164
|
-
})]);
|
|
165
|
-
}];
|
|
166
|
-
const $ = [
|
|
18
|
+
import { isString as d, isArray as u, trace as f, warning as m, toStringArray as _, isFunction as g, hasOwn as p } from "@web-utils/core";
|
|
19
|
+
import { k as w } from "../chunks/index.57f871af.mjs";
|
|
20
|
+
import { n as v } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
|
|
21
|
+
const y = [
|
|
167
22
|
"back",
|
|
168
23
|
"create",
|
|
169
24
|
"save",
|
|
@@ -183,16 +38,16 @@ const $ = [
|
|
|
183
38
|
"disabled",
|
|
184
39
|
"reload",
|
|
185
40
|
"slot"
|
|
186
|
-
],
|
|
41
|
+
], P = {
|
|
187
42
|
name: "TableView",
|
|
188
43
|
bus: {
|
|
189
|
-
reloadTableView(
|
|
44
|
+
reloadTableView(r, e) {
|
|
190
45
|
if (this._viewIds)
|
|
191
|
-
if (d(
|
|
192
|
-
let t =
|
|
193
|
-
d(t) && (t = t.split(",")), this._viewIds.some((s) => t.includes(s)) && (
|
|
46
|
+
if (d(r) || u(r)) {
|
|
47
|
+
let t = r;
|
|
48
|
+
d(t) && (t = t.split(",")), this._viewIds.some((s) => t.includes(s)) && (e ? this.$refs.tree && (f.call(this.$parent || {}, "reloadTree"), this.refreshTree()) : (f.call(this.$parent || {}, "reloadTable"), this.reloadTable()));
|
|
194
49
|
} else
|
|
195
|
-
|
|
50
|
+
m.call(this.$parent || {}, "`viewId`的类型必须是字符串或数组");
|
|
196
51
|
}
|
|
197
52
|
},
|
|
198
53
|
props: {
|
|
@@ -251,29 +106,29 @@ const $ = [
|
|
|
251
106
|
}
|
|
252
107
|
},
|
|
253
108
|
data() {
|
|
254
|
-
var
|
|
109
|
+
var r;
|
|
255
110
|
return {
|
|
256
111
|
importDialogVisible: !1,
|
|
257
|
-
right: -(((
|
|
112
|
+
right: -(((r = this.searchPanelAttrs) == null ? void 0 : r.width) || 350),
|
|
258
113
|
selectedRows: []
|
|
259
114
|
};
|
|
260
115
|
},
|
|
261
116
|
computed: {
|
|
262
117
|
buttonSlots() {
|
|
263
|
-
return
|
|
118
|
+
return y.filter((r) => this.$scopedSlots[r]);
|
|
264
119
|
},
|
|
265
120
|
toolbarProps() {
|
|
266
121
|
var s, l;
|
|
267
|
-
const
|
|
268
|
-
let t = (
|
|
269
|
-
return t = t || [], t.includes("reload") || (t = [...t, "reload"]),
|
|
122
|
+
const r = {}, e = n(this.toolbarAttrs, r);
|
|
123
|
+
let t = (e == null ? void 0 : e.buttons) || this.$parent.buttons;
|
|
124
|
+
return t = t || [], t.includes("reload") || (t = [...t, "reload"]), e.buttons = t, e.buttons = _(e.buttons), e.searchable = !!((l = (s = this.$scopedSlots)["search-form"]) != null && l.call(s)), e;
|
|
270
125
|
},
|
|
271
126
|
treeProps() {
|
|
272
|
-
const
|
|
127
|
+
const r = {
|
|
273
128
|
treeProps: {
|
|
274
129
|
children: "children",
|
|
275
130
|
label: "label",
|
|
276
|
-
isLeaf: (
|
|
131
|
+
isLeaf: (e) => p(e, "hasChildren") ? !e.hasChildren : p(e, "hasChild") ? !e.hasChild : !0
|
|
277
132
|
},
|
|
278
133
|
show: !1,
|
|
279
134
|
lazy: !0,
|
|
@@ -282,30 +137,30 @@ const $ = [
|
|
|
282
137
|
"expand-first-node": !1,
|
|
283
138
|
"default-expand-all": !1
|
|
284
139
|
};
|
|
285
|
-
return n(this.treeAttrs,
|
|
140
|
+
return n(this.treeAttrs, r);
|
|
286
141
|
},
|
|
287
142
|
tableProps() {
|
|
288
|
-
const
|
|
143
|
+
const r = this.tableAttrs.api || this.$parent.getPage, e = {
|
|
289
144
|
model: this.searchModel || {},
|
|
290
145
|
height: "auto",
|
|
291
146
|
"highlight-current-row": !0,
|
|
292
|
-
api:
|
|
147
|
+
api: r
|
|
293
148
|
};
|
|
294
|
-
return n(this.tableAttrs,
|
|
149
|
+
return n(this.tableAttrs, e);
|
|
295
150
|
},
|
|
296
151
|
searchPanelProps() {
|
|
297
|
-
const
|
|
152
|
+
const r = {
|
|
298
153
|
width: 350,
|
|
299
154
|
model: this.searchModel || {}
|
|
300
155
|
};
|
|
301
|
-
return n(this.searchPanelAttrs,
|
|
156
|
+
return n(this.searchPanelAttrs, r);
|
|
302
157
|
}
|
|
303
158
|
},
|
|
304
159
|
created() {
|
|
305
160
|
this._viewIds = [], this.viewId && this._viewIds.push(this.viewId), this._viewIds.includes(this.$parent.$options.name) || this._viewIds.push(this.$parent.$options.name);
|
|
306
161
|
},
|
|
307
162
|
activated() {
|
|
308
|
-
return
|
|
163
|
+
return a(this, null, function* () {
|
|
309
164
|
this.$refs.treeScroller && (this.treeScrollTop && (this.$refs.treeScroller.scrollTop = this.treeScrollTop), this.treeScrollLeft && (this.$refs.treeScroller.scrollLeft = this.treeScrollLeft));
|
|
310
165
|
});
|
|
311
166
|
},
|
|
@@ -317,34 +172,34 @@ const $ = [
|
|
|
317
172
|
this.right = this.right === 0 ? -this.searchPanelProps.width : 0;
|
|
318
173
|
},
|
|
319
174
|
onSearchClick() {
|
|
320
|
-
return
|
|
175
|
+
return a(this, null, function* () {
|
|
321
176
|
this.$refs.table.setModel(this.searchModel || this.searchPanelProps.model), yield this.refreshTable();
|
|
322
177
|
});
|
|
323
178
|
},
|
|
324
179
|
onClearClick() {
|
|
325
|
-
return
|
|
180
|
+
return a(this, null, function* () {
|
|
326
181
|
this.$emit("reset"), this.$refs.form.resetFields(), this.$refs.table.setModel(this.searchModel || this.searchPanelProps.model), yield this.refreshTable();
|
|
327
182
|
});
|
|
328
183
|
},
|
|
329
|
-
openFrom(
|
|
330
|
-
this.$router.push(
|
|
184
|
+
openFrom(r) {
|
|
185
|
+
this.$router.push(w(this.formPath, r));
|
|
331
186
|
},
|
|
332
|
-
rowDbClick(
|
|
333
|
-
var
|
|
334
|
-
!((
|
|
187
|
+
rowDbClick(r) {
|
|
188
|
+
var e;
|
|
189
|
+
!((e = this.tableListeners) != null && e["row-dblclick"]) && this.formPath && this.openFrom(r);
|
|
335
190
|
},
|
|
336
|
-
onSelectionChange(
|
|
337
|
-
this.selectedRows =
|
|
191
|
+
onSelectionChange(r) {
|
|
192
|
+
this.selectedRows = r;
|
|
338
193
|
},
|
|
339
194
|
create() {
|
|
340
|
-
var
|
|
341
|
-
!((
|
|
195
|
+
var r;
|
|
196
|
+
!((r = this.toolbarListeners) != null && r.create) && this.formPath && this.openFrom();
|
|
342
197
|
},
|
|
343
198
|
del() {
|
|
344
|
-
return
|
|
345
|
-
var
|
|
346
|
-
const
|
|
347
|
-
if (!((
|
|
199
|
+
return a(this, null, function* () {
|
|
200
|
+
var e;
|
|
201
|
+
const r = this.deleteApi || this.$parent.del;
|
|
202
|
+
if (!((e = this.toolbarListeners) != null && e.del) && g(r)) {
|
|
348
203
|
if (!this.selectedRows.length) {
|
|
349
204
|
this.$message.warning("请选择要删除的记录!");
|
|
350
205
|
return;
|
|
@@ -357,11 +212,11 @@ const $ = [
|
|
|
357
212
|
modal: !0,
|
|
358
213
|
dangerouslyUseHTMLString: !0,
|
|
359
214
|
closeOnClickModal: !1,
|
|
360
|
-
beforeClose: (t, s, l) =>
|
|
215
|
+
beforeClose: (t, s, l) => a(this, null, function* () {
|
|
361
216
|
if (t === "confirm")
|
|
362
217
|
try {
|
|
363
|
-
s.confirmButtonLoading = !0, s.confirmButtonText = "删除...", yield
|
|
364
|
-
} catch (
|
|
218
|
+
s.confirmButtonLoading = !0, s.confirmButtonText = "删除...", yield r.call(this, this.selectedRows.map((o) => o.id).join(",")), this.$message.success("删除成功"), yield this.reloadTable(), yield this.refreshTree();
|
|
219
|
+
} catch (o) {
|
|
365
220
|
}
|
|
366
221
|
l();
|
|
367
222
|
})
|
|
@@ -371,13 +226,13 @@ const $ = [
|
|
|
371
226
|
});
|
|
372
227
|
},
|
|
373
228
|
reloadTable() {
|
|
374
|
-
var
|
|
375
|
-
(
|
|
229
|
+
var r;
|
|
230
|
+
(r = this.$refs.table) == null || r.reload();
|
|
376
231
|
},
|
|
377
232
|
refreshTable() {
|
|
378
|
-
return
|
|
379
|
-
var
|
|
380
|
-
yield (
|
|
233
|
+
return a(this, null, function* () {
|
|
234
|
+
var r;
|
|
235
|
+
yield (r = this.$refs.table) == null ? void 0 : r.getPage();
|
|
381
236
|
});
|
|
382
237
|
},
|
|
383
238
|
refreshTree() {
|
|
@@ -387,24 +242,49 @@ const $ = [
|
|
|
387
242
|
return this.searchPanelProps.model;
|
|
388
243
|
}
|
|
389
244
|
}
|
|
390
|
-
}
|
|
391
|
-
var
|
|
392
|
-
|
|
245
|
+
};
|
|
246
|
+
var S = function() {
|
|
247
|
+
var e = this, t = e._self._c;
|
|
248
|
+
return t("div", { staticClass: "table-view" }, [t("Toolbar", e._g(e._b({ on: { search: e.toggleSearch, del: e.del, create: e.create, reload: e.reloadTable, imp: function(s) {
|
|
249
|
+
e.importDialogVisible = !0;
|
|
250
|
+
} }, scopedSlots: e._u([{ key: "default", fn: function() {
|
|
251
|
+
return [e._t("toolbar-button")];
|
|
252
|
+
}, proxy: !0 }, e._l(e.buttonSlots, function(s) {
|
|
253
|
+
return { key: s, fn: function() {
|
|
254
|
+
return [e._t(s)];
|
|
255
|
+
}, proxy: !0 };
|
|
256
|
+
})], null, !0) }, "Toolbar", e.toolbarProps, !1), e.toolbarListeners)), t("div", { staticClass: "table-view-content-wrapper" }, [t("div", { staticClass: "table-view-content" }, [e.treeProps.show ? t("div", { ref: "treeScroller", staticClass: "table-view-sidebar", on: { scroll: e.onTreeScroll } }, [t("div", { staticStyle: { "font-size": "16px" } }, [e._v("视图导航")]), t("EditableTree", e._g(e._b({ ref: "tree", attrs: { readonly: "" }, scopedSlots: e._u([{ key: "default", fn: function({ node: s, data: l }) {
|
|
257
|
+
return [e._t("tree-node", function() {
|
|
258
|
+
return [t("span", [t("i", { staticClass: "node-icon", class: s.childNodes.length > 0 ? s.expanded ? "el-icon-folder-opened" : "el-icon-folder" : "el-icon-tickets" }), e._t("tree-label", function() {
|
|
259
|
+
return [e._v(e._s(s.label))];
|
|
260
|
+
}, { node: s, data: l })], 2)];
|
|
261
|
+
}, { node: s, data: l })];
|
|
262
|
+
} }], null, !0) }, "EditableTree", e.treeProps, !1), e.treeListeners))], 1) : e._e(), t("div", { staticClass: "table-view-table" }, [t("PageableTable", e._g(e._b({ ref: "table", class: [
|
|
263
|
+
{
|
|
264
|
+
"border-top": e.borderTop,
|
|
265
|
+
"border-bottom": e.borderBottom,
|
|
266
|
+
"border-left": e.borderLeft || e.treeAttrs && e.treeAttrs.show,
|
|
267
|
+
"border-right": e.borderRight
|
|
268
|
+
}
|
|
269
|
+
], attrs: { border: e.border }, on: { "row-dblclick": e.rowDbClick, "selection-change": e.onSelectionChange } }, "PageableTable", e.tableProps, !1), e.tableListeners), [e._t("columns")], 2)], 1)]), e.toolbarProps.searchable ? t("div", { staticClass: "slide-panel", style: { right: `${e.right}px`, width: `${e.searchPanelProps.width}px` } }, [e._m(0), t("div", { staticClass: "slide-panel-content" }, [t("ElForm", { ref: "form", attrs: { "label-position": "right", model: e.searchModel || e.searchPanelProps.model, size: "mini", "label-width": e.labelWidth }, nativeOn: { "!submit": function(s) {
|
|
270
|
+
return s.preventDefault(), e.onSearchClick.apply(null, arguments);
|
|
271
|
+
} } }, [t("FormItemConfigProvider", { attrs: { block: "", "wrap-col": !1 } }, [t("ElRow", { attrs: { gutter: 0 } }, [e._t("search-form", function() {
|
|
272
|
+
return [t("p", [e._v("请添加搜索条件!")])];
|
|
273
|
+
})], 2)], 1), t("ElFormItem", { attrs: { "label-width": "0" } }, [t("div", { staticClass: "slide-panel-actions" }, [t("ElButton", { attrs: { type: "primary", "native-type": "submit", size: "mini" } }, [e._v(" 开始搜索 ")]), t("ElButton", { attrs: { size: "mini" }, on: { click: e.onClearClick } }, [e._v(" 清除条件 ")])], 1)])], 1)], 1)]) : e._e()]), e._t("default")], 2);
|
|
274
|
+
}, T = [function() {
|
|
275
|
+
var r = this, e = r._self._c;
|
|
276
|
+
return e("div", { staticClass: "slide-panel-line" }, [e("div", { staticClass: "slide-panel-line-indicator" })]);
|
|
277
|
+
}], $ = /* @__PURE__ */ v(
|
|
393
278
|
P,
|
|
394
279
|
S,
|
|
280
|
+
T,
|
|
395
281
|
!1,
|
|
396
|
-
|
|
282
|
+
null,
|
|
397
283
|
null,
|
|
398
284
|
null,
|
|
399
285
|
null
|
|
400
286
|
);
|
|
401
|
-
|
|
402
|
-
for (let r in u)
|
|
403
|
-
this[r] = u[r];
|
|
404
|
-
}
|
|
405
|
-
const M = /* @__PURE__ */ function() {
|
|
406
|
-
return C.exports;
|
|
407
|
-
}();
|
|
287
|
+
const B = $.exports;
|
|
408
288
|
export {
|
|
409
|
-
|
|
289
|
+
B as default
|
|
410
290
|
};
|
package/tag-render/index.mjs
CHANGED
|
@@ -1,55 +1,17 @@
|
|
|
1
|
-
var
|
|
1
|
+
var u = Object.defineProperty;
|
|
2
2
|
var r = Object.getOwnPropertySymbols;
|
|
3
|
-
var
|
|
4
|
-
var l = (
|
|
5
|
-
for (var n in
|
|
6
|
-
|
|
3
|
+
var c = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var l = (t, e, n) => e in t ? u(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, i = (t, e) => {
|
|
5
|
+
for (var n in e || (e = {}))
|
|
6
|
+
c.call(e, n) && l(t, n, e[n]);
|
|
7
7
|
if (r)
|
|
8
|
-
for (var n of r(
|
|
9
|
-
|
|
10
|
-
return
|
|
8
|
+
for (var n of r(e))
|
|
9
|
+
_.call(e, n) && l(t, n, e[n]);
|
|
10
|
+
return t;
|
|
11
11
|
};
|
|
12
|
-
import { hasOwn as
|
|
13
|
-
import { n as
|
|
14
|
-
|
|
15
|
-
var e = this, t = e.$createElement, n = e._self._c || t;
|
|
16
|
-
return n("div", {
|
|
17
|
-
staticClass: "tag-render"
|
|
18
|
-
}, [e.tags && e.tags.length && e.tags[0] ? e._l(e.internalTags, function(s, a) {
|
|
19
|
-
return n("ElTag", {
|
|
20
|
-
key: a,
|
|
21
|
-
attrs: {
|
|
22
|
-
closable: e.enable,
|
|
23
|
-
size: "medium",
|
|
24
|
-
"disable-transitions": ""
|
|
25
|
-
},
|
|
26
|
-
on: {
|
|
27
|
-
close: function(b) {
|
|
28
|
-
return e.$emit("close", e.tags[a], a);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}, [e._v(" " + e._s(e.getTagName(s)) + " ")]);
|
|
32
|
-
}) : e.enable ? e._e() : [n("span", {
|
|
33
|
-
staticStyle: {
|
|
34
|
-
"margin-left": "4px",
|
|
35
|
-
color: "#b5b5b5",
|
|
36
|
-
"line-height": "16px"
|
|
37
|
-
}
|
|
38
|
-
}, [e._v("无")])], e.enable ? n("ElButton", {
|
|
39
|
-
staticClass: "add-tag",
|
|
40
|
-
attrs: {
|
|
41
|
-
size: "mini"
|
|
42
|
-
},
|
|
43
|
-
on: {
|
|
44
|
-
click: function(s) {
|
|
45
|
-
return e.$emit("add");
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}, [e._v("+ 添加")]) : e._e(), e.count ? n("span", {
|
|
49
|
-
staticClass: "tags-count"
|
|
50
|
-
}, [e._v(e._s(e.tags.length && e.tags[0] ? e.tags.length : ""))]) : e._e()], 2);
|
|
51
|
-
}, d = [];
|
|
52
|
-
const p = {
|
|
12
|
+
import { hasOwn as o } from "@web-utils/core";
|
|
13
|
+
import { n as m } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
|
|
14
|
+
const g = {
|
|
53
15
|
name: "TagRender",
|
|
54
16
|
inject: {
|
|
55
17
|
elFormItem: {
|
|
@@ -76,41 +38,44 @@ const p = {
|
|
|
76
38
|
},
|
|
77
39
|
computed: {
|
|
78
40
|
internalTags() {
|
|
79
|
-
return this.transfer ? this.tags.map((
|
|
80
|
-
const
|
|
81
|
-
return this.transfer(
|
|
41
|
+
return this.transfer ? this.tags.map((t) => {
|
|
42
|
+
const e = i({}, t);
|
|
43
|
+
return this.transfer(e);
|
|
82
44
|
}) : this.tags;
|
|
83
45
|
}
|
|
84
46
|
},
|
|
85
47
|
watch: {
|
|
86
|
-
tags(
|
|
87
|
-
var
|
|
88
|
-
this.elFormItem &&
|
|
48
|
+
tags(t) {
|
|
49
|
+
var e, n;
|
|
50
|
+
this.elFormItem && t && t.length > 0 && ((n = (e = this.elFormItem).clearValidate) == null || n.call(e));
|
|
89
51
|
}
|
|
90
52
|
},
|
|
91
53
|
methods: {
|
|
92
|
-
getTagName(
|
|
93
|
-
return
|
|
54
|
+
getTagName(t) {
|
|
55
|
+
return o(t, "name") ? t.name : o(t, "label") ? t.label : t;
|
|
94
56
|
}
|
|
95
57
|
}
|
|
96
|
-
}
|
|
97
|
-
var
|
|
98
|
-
|
|
58
|
+
};
|
|
59
|
+
var f = function() {
|
|
60
|
+
var e = this, n = e._self._c;
|
|
61
|
+
return n("div", { staticClass: "tag-render" }, [e.tags && e.tags.length && e.tags[0] ? e._l(e.internalTags, function(s, a) {
|
|
62
|
+
return n("ElTag", { key: a, attrs: { closable: e.enable, size: "medium", "disable-transitions": "" }, on: { close: function(h) {
|
|
63
|
+
return e.$emit("close", e.tags[a], a);
|
|
64
|
+
} } }, [e._v(" " + e._s(e.getTagName(s)) + " ")]);
|
|
65
|
+
}) : e.enable ? e._e() : [n("span", { staticStyle: { "margin-left": "4px", color: "#b5b5b5", "line-height": "16px" } }, [e._v("无")])], e.enable ? n("ElButton", { staticClass: "add-tag", attrs: { size: "mini" }, on: { click: function(s) {
|
|
66
|
+
return e.$emit("add");
|
|
67
|
+
} } }, [e._v("+ 添加")]) : e._e(), e.count ? n("span", { staticClass: "tags-count" }, [e._v(e._s(e.tags.length && e.tags[0] ? e.tags.length : ""))]) : e._e()], 2);
|
|
68
|
+
}, d = [], p = /* @__PURE__ */ m(
|
|
69
|
+
g,
|
|
99
70
|
f,
|
|
100
71
|
d,
|
|
101
72
|
!1,
|
|
102
|
-
|
|
73
|
+
null,
|
|
103
74
|
null,
|
|
104
75
|
null,
|
|
105
76
|
null
|
|
106
77
|
);
|
|
107
|
-
|
|
108
|
-
for (let t in u)
|
|
109
|
-
this[t] = u[t];
|
|
110
|
-
}
|
|
111
|
-
const $ = /* @__PURE__ */ function() {
|
|
112
|
-
return h.exports;
|
|
113
|
-
}();
|
|
78
|
+
const T = p.exports;
|
|
114
79
|
export {
|
|
115
|
-
|
|
80
|
+
T as default
|
|
116
81
|
};
|
package/text-ellipsis/index.mjs
CHANGED
|
@@ -1,28 +1,6 @@
|
|
|
1
|
-
import { s as
|
|
2
|
-
import { n as
|
|
3
|
-
|
|
4
|
-
var t = this, e = t.$createElement, i = t._self._c || e;
|
|
5
|
-
return i("div", {
|
|
6
|
-
staticClass: "avue-text-ellipsis",
|
|
7
|
-
style: {
|
|
8
|
-
width: t.setPx(t.width, "100%")
|
|
9
|
-
}
|
|
10
|
-
}, [t._t("before"), i("ElTooltip", {
|
|
11
|
-
attrs: {
|
|
12
|
-
content: t.text,
|
|
13
|
-
disabled: !(t.useTooltip && t.isHide),
|
|
14
|
-
placement: t.placement
|
|
15
|
-
}
|
|
16
|
-
}, [i("span", [i("span", {
|
|
17
|
-
key: t.keyIndex,
|
|
18
|
-
ref: "text",
|
|
19
|
-
staticClass: "avue-text-ellipsis__text"
|
|
20
|
-
}, [t._v(t._s(t.text))])])]), i("span", {
|
|
21
|
-
ref: "more",
|
|
22
|
-
staticClass: "avue-text-ellipsis__more"
|
|
23
|
-
}, [t._t("more")], 2), t._t("after")], 2);
|
|
24
|
-
}, a = [];
|
|
25
|
-
const f = {
|
|
1
|
+
import { s as n } from "../chunks/util.ae730cde.mjs";
|
|
2
|
+
import { n as o } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
|
|
3
|
+
const h = {
|
|
26
4
|
name: "TextEllipsis",
|
|
27
5
|
props: {
|
|
28
6
|
text: String,
|
|
@@ -60,46 +38,43 @@ const f = {
|
|
|
60
38
|
this.init();
|
|
61
39
|
},
|
|
62
40
|
methods: {
|
|
63
|
-
setPx:
|
|
41
|
+
setPx: n,
|
|
64
42
|
init() {
|
|
65
43
|
this.oversize = !1, this.keyIndex += 1;
|
|
66
|
-
const
|
|
67
|
-
|
|
44
|
+
const i = this.$refs.more;
|
|
45
|
+
i.style.display = "none", this.isLimitHeight && this.limitShow();
|
|
68
46
|
},
|
|
69
47
|
limitShow() {
|
|
70
48
|
this.$nextTick(() => {
|
|
71
|
-
const
|
|
72
|
-
let
|
|
73
|
-
if (
|
|
74
|
-
if (
|
|
75
|
-
|
|
49
|
+
const i = this.$refs.text, t = this.$el, e = this.$refs.more;
|
|
50
|
+
let l = 1e3;
|
|
51
|
+
if (i)
|
|
52
|
+
if (t.offsetHeight > this.height) {
|
|
53
|
+
e.style.display = "inline-block";
|
|
76
54
|
let s = this.text;
|
|
77
|
-
for (;
|
|
78
|
-
|
|
55
|
+
for (; t.offsetHeight > this.height && l > 0; )
|
|
56
|
+
t.offsetHeight > this.height * 3 ? i.innerText = s = s.substring(0, Math.floor(s.length / 2)) : i.innerText = s = s.substring(0, s.length - 1), l--;
|
|
79
57
|
this.$emit("hide"), this.isHide = !0;
|
|
80
58
|
} else
|
|
81
59
|
this.$emit("show"), this.isHide = !1;
|
|
82
60
|
});
|
|
83
61
|
}
|
|
84
62
|
}
|
|
85
|
-
}
|
|
86
|
-
var
|
|
87
|
-
|
|
63
|
+
};
|
|
64
|
+
var r = function() {
|
|
65
|
+
var t = this, e = t._self._c;
|
|
66
|
+
return e("div", { staticClass: "avue-text-ellipsis", style: { width: t.setPx(t.width, "100%") } }, [t._t("before"), e("ElTooltip", { attrs: { content: t.text, disabled: !(t.useTooltip && t.isHide), placement: t.placement } }, [e("span", [e("span", { key: t.keyIndex, ref: "text", staticClass: "avue-text-ellipsis__text" }, [t._v(t._s(t.text))])])]), e("span", { ref: "more", staticClass: "avue-text-ellipsis__more" }, [t._t("more")], 2), t._t("after")], 2);
|
|
67
|
+
}, a = [], f = /* @__PURE__ */ o(
|
|
88
68
|
h,
|
|
69
|
+
r,
|
|
89
70
|
a,
|
|
90
71
|
!1,
|
|
91
|
-
|
|
72
|
+
null,
|
|
92
73
|
null,
|
|
93
74
|
null,
|
|
94
75
|
null
|
|
95
76
|
);
|
|
96
|
-
|
|
97
|
-
for (let e in l)
|
|
98
|
-
this[e] = l[e];
|
|
99
|
-
}
|
|
100
|
-
const u = /* @__PURE__ */ function() {
|
|
101
|
-
return _.exports;
|
|
102
|
-
}();
|
|
77
|
+
const p = f.exports;
|
|
103
78
|
export {
|
|
104
|
-
|
|
79
|
+
p as default
|
|
105
80
|
};
|