@web-utils/component 1.2.4 → 1.2.6
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/README.md +27 -27
- package/dist/chunks/163eed3b.js +16 -1
- package/dist/chunks/2bd4e340.js +184 -0
- package/dist/chunks/6499de3a.js +30 -1
- package/dist/chunks/7af3ceb1.js +75 -0
- package/dist/chunks/86bcadec.js +24 -0
- package/dist/chunks/8bbde9bf.js +81 -1
- package/dist/chunks/90bd3d52.js +26 -1
- package/dist/chunks/92404ceb.js +126 -0
- package/dist/chunks/a73fe8ee.js +11 -0
- package/dist/chunks/df803484.js +60 -0
- package/dist/components/address-input/index.js +113 -1
- package/dist/components/aside-menu/index.js +58 -1
- package/dist/components/awesome-button/index.js +82 -1
- package/dist/components/capsule-tab/index.js +52 -1
- package/dist/components/chunk-file-uploader/index.js +119 -1
- package/dist/components/chunk-file-uploader-button/index.js +60 -1
- package/dist/components/chunk-file-uploader-drop/index.js +65 -1
- package/dist/components/chunk-file-uploader-file/index.js +311 -1
- package/dist/components/chunk-file-uploader-files/index.js +49 -1
- package/dist/components/chunk-file-uploader-list/index.js +50 -1
- package/dist/components/chunk-file-uploader-un-support/index.js +51 -1
- package/dist/components/code-mirror-editor/index.js +310 -6
- package/dist/components/color-picker/index.js +110 -1
- package/dist/components/confirm-button/index.js +57 -1
- package/dist/components/confirmable/index.js +28 -1
- package/dist/components/context-menu/index.js +236 -1
- package/dist/components/custom-scrollbar/index.js +150 -1
- package/dist/components/data-table-picker/index.js +137 -1
- package/dist/components/dynamic-table/index.js +195 -1
- package/dist/components/e-charts/index.js +229 -1
- package/dist/components/editable-progress/index.js +141 -1
- package/dist/components/editable-tree/index.js +789 -1
- package/dist/components/egd-collapse/index.js +79 -1
- package/dist/components/egd-collapse-item/index.js +132 -1
- package/dist/components/el-color-picker-dropdown/index.js +170 -1
- package/dist/components/element-dialog/index.js +242 -1
- package/dist/components/empty-view/index.js +69 -1
- package/dist/components/error-view/index.js +61 -1
- package/dist/components/flex-column/index.js +50 -1
- package/dist/components/flex-item/index.js +66 -1
- package/dist/components/flex-row/index.js +50 -1
- package/dist/components/flex-scroller/index.js +47 -1
- package/dist/components/form-button/index.js +80 -1
- package/dist/components/form-cascader/index.js +151 -1
- package/dist/components/form-checkbox-group/index.js +192 -1
- package/dist/components/form-date-picker/index.js +182 -1
- package/dist/components/form-holder/index.js +90 -1
- package/dist/components/form-input/index.js +106 -1
- package/dist/components/form-input-email/index.js +97 -1
- package/dist/components/form-input-id-card/index.js +104 -1
- package/dist/components/form-input-number/index.js +123 -1
- package/dist/components/form-input-phone-number/index.js +98 -1
- package/dist/components/form-input-time/index.js +124 -1
- package/dist/components/form-item/index.js +120 -1
- package/dist/components/form-item-config-provider/index.js +63 -1
- package/dist/components/form-item-group/index.js +169 -1
- package/dist/components/form-radio-group/index.js +170 -1
- package/dist/components/form-select/index.js +154 -1
- package/dist/components/form-switch/index.js +97 -1
- package/dist/components/form-textarea/index.js +102 -1
- package/dist/components/form-view/index.js +343 -1
- package/dist/components/guide-steps/index.js +94 -1
- package/dist/components/icon-card/index.js +62 -1
- package/dist/components/iframe-window/index.js +99 -1
- package/dist/components/input-number/index.js +274 -1
- package/dist/components/input-number-range/index.js +110 -1
- package/dist/components/j-s-x-component/index.js +16 -1
- package/dist/components/keep-view-alive/index.js +119 -1
- package/dist/components/loading-view/index.js +61 -1
- package/dist/components/nav-bar/index.js +52 -1
- package/dist/components/not-implement/index.js +35 -1
- package/dist/components/page/index.js +40 -1
- package/dist/components/page-header/index.js +56 -1
- package/dist/components/page-index/index.js +151 -1
- package/dist/components/page-index-top/index.js +119 -1
- package/dist/components/page-skeleton/index.js +56 -1
- package/dist/components/page-skeleton-new/index.js +98 -1
- package/dist/components/pageable-table/index.js +429 -1
- package/dist/components/pageable-view/index.js +328 -2
- package/dist/components/photo-swipe/index.js +187 -1
- package/dist/components/resize-observer/index.js +62 -1
- package/dist/components/search-popover/index.js +391 -2
- package/dist/components/sign-panel/index.js +242 -1
- package/dist/components/split-pane/index.js +209 -1
- package/dist/components/stateful/index.js +84 -1
- package/dist/components/static-pageable-table/index.js +92 -1
- package/dist/components/swiper/index.js +158 -1
- package/dist/components/tab/index.js +145 -1
- package/dist/components/tab-item/index.js +73 -1
- package/dist/components/table-column/index.js +89 -1
- package/dist/components/table-view/index.js +363 -1
- package/dist/components/tag-render/index.js +97 -1
- package/dist/components/tinymce-editor/index.js +173 -1
- package/dist/components/tinymce-wrapper/index.js +618 -1
- package/dist/components/toolbar/index.js +217 -1
- package/dist/components/toolbar-button/index.js +90 -1
- package/dist/components/trigger/index.js +71 -1
- package/dist/components/vue-tags-input/index.js +439 -1
- package/dist/components/watermark/index.js +63 -1
- package/dist/components/x-dialog/index.js +173 -1
- package/dist/index.css +2102 -1
- package/dist/index.es.js +2995 -2078
- package/package.json +29 -29
- package/web-types.json +22 -16
- package/dist/chunks/23bd3525.js +0 -1
- package/dist/chunks/65f4f4f2.js +0 -1
- package/dist/chunks/8473fc69.js +0 -1
- package/dist/chunks/addb6ed5.js +0 -1
- package/dist/chunks/b8305633.js +0 -1
- package/dist/chunks/e8547f66.js +0 -1
|
@@ -1 +1,145 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import { p as a } from "../../chunks/8bbde9bf.js";
|
|
2
|
+
import { n as s } from "../../chunks/6499de3a.js";
|
|
3
|
+
var o = function() {
|
|
4
|
+
var t = this, r = t.$createElement, e = t._self._c || r;
|
|
5
|
+
return e("div", {
|
|
6
|
+
staticClass: "vux-tab-wrap",
|
|
7
|
+
class: t.barPosition === "top" ? "vux-tab-bar-top" : ""
|
|
8
|
+
}, [e("div", {
|
|
9
|
+
staticClass: "vux-tab-container"
|
|
10
|
+
}, [e("div", {
|
|
11
|
+
ref: "nav",
|
|
12
|
+
staticClass: "vux-tab",
|
|
13
|
+
class: [{
|
|
14
|
+
"vux-tab-no-animate": !t.animate,
|
|
15
|
+
scrollable: t.scrollable
|
|
16
|
+
}]
|
|
17
|
+
}, [t._t("default"), t.animate ? e("div", {
|
|
18
|
+
staticClass: "vux-tab-ink-bar",
|
|
19
|
+
class: t.barClass,
|
|
20
|
+
style: t.barStyle
|
|
21
|
+
}, [t.customBarWidth ? e("span", {
|
|
22
|
+
staticClass: "vux-tab-bar-inner",
|
|
23
|
+
style: t.innerBarStyle
|
|
24
|
+
}) : t._e()]) : t._e()], 2)])]);
|
|
25
|
+
}, l = [];
|
|
26
|
+
const c = {
|
|
27
|
+
name: "Tab",
|
|
28
|
+
mixins: [a],
|
|
29
|
+
props: {
|
|
30
|
+
lineWidth: {
|
|
31
|
+
type: Number,
|
|
32
|
+
default: 3
|
|
33
|
+
},
|
|
34
|
+
activeColor: String,
|
|
35
|
+
barActiveColor: String,
|
|
36
|
+
animate: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: !0
|
|
39
|
+
},
|
|
40
|
+
customBarWidth: [Function, String],
|
|
41
|
+
scrollThreshold: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 4
|
|
44
|
+
},
|
|
45
|
+
barPosition: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: "bottom",
|
|
48
|
+
validator(t) {
|
|
49
|
+
return ["bottom", "top"].indexOf(t) !== -1;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
data() {
|
|
54
|
+
return {
|
|
55
|
+
direction: "forward",
|
|
56
|
+
hasReady: !1
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
computed: {
|
|
60
|
+
barLeft() {
|
|
61
|
+
if (this.hasReady) {
|
|
62
|
+
const t = this.scrollable ? window.innerWidth / this.$children[this.currentIndex || 0].$el.getBoundingClientRect().width : this.number;
|
|
63
|
+
return `${this.currentIndex * (100 / t)}%`;
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
},
|
|
67
|
+
barRight() {
|
|
68
|
+
if (this.hasReady) {
|
|
69
|
+
const t = this.scrollable ? window.innerWidth / this.$children[this.currentIndex || 0].$el.getBoundingClientRect().width : this.number;
|
|
70
|
+
return `${(t - this.currentIndex - 1) * (100 / t)}%`;
|
|
71
|
+
}
|
|
72
|
+
return null;
|
|
73
|
+
},
|
|
74
|
+
innerBarStyle() {
|
|
75
|
+
return {
|
|
76
|
+
width: typeof this.customBarWidth == "function" ? this.customBarWidth(this.currentIndex) : this.customBarWidth,
|
|
77
|
+
backgroundColor: this.barActiveColor || this.activeColor
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
barStyle() {
|
|
81
|
+
const t = {
|
|
82
|
+
left: this.barLeft,
|
|
83
|
+
right: this.barRight,
|
|
84
|
+
display: "block",
|
|
85
|
+
height: `${this.lineWidth}px`,
|
|
86
|
+
transition: this.hasReady ? null : "none"
|
|
87
|
+
};
|
|
88
|
+
return this.customBarWidth ? t.backgroundColor = "transparent" : t.backgroundColor = this.barActiveColor || this.activeColor, t;
|
|
89
|
+
},
|
|
90
|
+
barClass() {
|
|
91
|
+
return {
|
|
92
|
+
"vux-tab-ink-bar-transition-forward": this.direction === "forward",
|
|
93
|
+
"vux-tab-ink-bar-transition-backward": this.direction === "backward"
|
|
94
|
+
};
|
|
95
|
+
},
|
|
96
|
+
scrollable() {
|
|
97
|
+
return this.number > this.scrollThreshold;
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
watch: {
|
|
101
|
+
currentIndex(t, r) {
|
|
102
|
+
this.direction = t > r ? "forward" : "backward", this.$emit("on-index-change", t, r), this.hasReady && this.scrollToActiveTab();
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
mounted() {
|
|
106
|
+
this.$nextTick(() => {
|
|
107
|
+
setTimeout(() => {
|
|
108
|
+
this.hasReady = !0;
|
|
109
|
+
}, 0);
|
|
110
|
+
});
|
|
111
|
+
},
|
|
112
|
+
methods: {
|
|
113
|
+
scrollToActiveTab() {
|
|
114
|
+
if (!this.scrollable || !this.$children || !this.$children.length)
|
|
115
|
+
return;
|
|
116
|
+
const t = this.$children[this.currentIndex].$el;
|
|
117
|
+
let r = 0;
|
|
118
|
+
const e = () => {
|
|
119
|
+
const i = this.$refs.nav;
|
|
120
|
+
i.scrollLeft += (t.offsetLeft - (i.offsetWidth - t.offsetWidth) / 2 - i.scrollLeft) / 15, ++r < 15 && window.requestAnimationFrame(e);
|
|
121
|
+
};
|
|
122
|
+
window.requestAnimationFrame(e);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}, n = {};
|
|
126
|
+
var h = /* @__PURE__ */ s(
|
|
127
|
+
c,
|
|
128
|
+
o,
|
|
129
|
+
l,
|
|
130
|
+
!1,
|
|
131
|
+
u,
|
|
132
|
+
null,
|
|
133
|
+
null,
|
|
134
|
+
null
|
|
135
|
+
);
|
|
136
|
+
function u(t) {
|
|
137
|
+
for (let r in n)
|
|
138
|
+
this[r] = n[r];
|
|
139
|
+
}
|
|
140
|
+
const m = /* @__PURE__ */ function() {
|
|
141
|
+
return h.exports;
|
|
142
|
+
}();
|
|
143
|
+
export {
|
|
144
|
+
m as default
|
|
145
|
+
};
|
|
@@ -1 +1,73 @@
|
|
|
1
|
-
import{c as n}from"../../chunks/8bbde9bf.js";
|
|
1
|
+
import { c as n } from "../../chunks/8bbde9bf.js";
|
|
2
|
+
import { n as l } from "../../chunks/6499de3a.js";
|
|
3
|
+
var o = function() {
|
|
4
|
+
var e = this, t = e.$createElement, a = e._self._c || t;
|
|
5
|
+
return a("div", {
|
|
6
|
+
staticClass: "vux-tab-item",
|
|
7
|
+
class: [e.currentSelected ? e.activeClass : "", {
|
|
8
|
+
"vux-tab-selected": e.currentSelected,
|
|
9
|
+
"vux-tab-disabled": e.disabled
|
|
10
|
+
}],
|
|
11
|
+
style: e.style,
|
|
12
|
+
on: {
|
|
13
|
+
click: e.onItemClick
|
|
14
|
+
}
|
|
15
|
+
}, [e._t("default"), typeof e.badgeLabel < "u" && e.badgeLabel !== "" ? a("span", {
|
|
16
|
+
staticClass: "vux-tab-item-badge",
|
|
17
|
+
style: {
|
|
18
|
+
background: e.badgeBackground,
|
|
19
|
+
color: e.badgeColor
|
|
20
|
+
}
|
|
21
|
+
}, [e._v(" " + e._s(e.badgeLabel) + " ")]) : e._e()], 2);
|
|
22
|
+
}, s = [];
|
|
23
|
+
const i = {
|
|
24
|
+
name: "TabItem",
|
|
25
|
+
mixins: [n],
|
|
26
|
+
props: {
|
|
27
|
+
activeClass: {
|
|
28
|
+
type: String
|
|
29
|
+
},
|
|
30
|
+
disabled: Boolean,
|
|
31
|
+
badgeBackground: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "#f74c31"
|
|
34
|
+
},
|
|
35
|
+
badgeColor: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: "#fff"
|
|
38
|
+
},
|
|
39
|
+
badgeLabel: {
|
|
40
|
+
type: String
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
computed: {
|
|
44
|
+
style() {
|
|
45
|
+
return {
|
|
46
|
+
borderWidth: `${this.$parent.lineWidth}px`,
|
|
47
|
+
borderColor: this.$parent.activeColor,
|
|
48
|
+
color: this.currentSelected ? this.$parent.activeColor : this.disabled ? this.$parent.disabledColor : this.$parent.defaultColor,
|
|
49
|
+
border: this.$parent.animate ? "none" : "auto"
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}, r = {};
|
|
54
|
+
var d = /* @__PURE__ */ l(
|
|
55
|
+
i,
|
|
56
|
+
o,
|
|
57
|
+
s,
|
|
58
|
+
!1,
|
|
59
|
+
c,
|
|
60
|
+
null,
|
|
61
|
+
null,
|
|
62
|
+
null
|
|
63
|
+
);
|
|
64
|
+
function c(e) {
|
|
65
|
+
for (let t in r)
|
|
66
|
+
this[t] = r[t];
|
|
67
|
+
}
|
|
68
|
+
const p = /* @__PURE__ */ function() {
|
|
69
|
+
return d.exports;
|
|
70
|
+
}();
|
|
71
|
+
export {
|
|
72
|
+
p as default
|
|
73
|
+
};
|
|
@@ -1 +1,89 @@
|
|
|
1
|
-
|
|
1
|
+
import { n as o } from "../../chunks/6499de3a.js";
|
|
2
|
+
const i = {
|
|
3
|
+
props: {
|
|
4
|
+
type: {
|
|
5
|
+
type: String,
|
|
6
|
+
default: "default"
|
|
7
|
+
},
|
|
8
|
+
label: String,
|
|
9
|
+
className: String,
|
|
10
|
+
labelClassName: String,
|
|
11
|
+
property: String,
|
|
12
|
+
prop: String,
|
|
13
|
+
width: {},
|
|
14
|
+
minWidth: {},
|
|
15
|
+
renderHeader: Function,
|
|
16
|
+
sortable: {
|
|
17
|
+
type: [Boolean, String],
|
|
18
|
+
default: !1
|
|
19
|
+
},
|
|
20
|
+
sortMethod: Function,
|
|
21
|
+
sortBy: [String, Function, Array],
|
|
22
|
+
resizable: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !0
|
|
25
|
+
},
|
|
26
|
+
columnKey: String,
|
|
27
|
+
align: String,
|
|
28
|
+
headerAlign: String,
|
|
29
|
+
showTooltipWhenOverflow: Boolean,
|
|
30
|
+
showOverflowTooltip: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !0
|
|
33
|
+
},
|
|
34
|
+
fixed: [Boolean, String],
|
|
35
|
+
formatter: Function,
|
|
36
|
+
selectable: Function,
|
|
37
|
+
reserveSelection: Boolean,
|
|
38
|
+
filterMethod: Function,
|
|
39
|
+
filteredValue: Array,
|
|
40
|
+
filters: Array,
|
|
41
|
+
filterPlacement: String,
|
|
42
|
+
filterMultiple: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !0
|
|
45
|
+
},
|
|
46
|
+
index: [Number, Function],
|
|
47
|
+
sortOrders: {
|
|
48
|
+
type: Array,
|
|
49
|
+
default() {
|
|
50
|
+
return ["ascending", "descending", null];
|
|
51
|
+
},
|
|
52
|
+
validator(n) {
|
|
53
|
+
return n.every((e) => ["ascending", "descending", null].indexOf(e) > -1);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}, a = {
|
|
58
|
+
name: "TableColumn",
|
|
59
|
+
functional: !0,
|
|
60
|
+
mixins: [i],
|
|
61
|
+
render(n, { data: e, props: t, children: r }) {
|
|
62
|
+
return n("ElTableColumn", {
|
|
63
|
+
...e,
|
|
64
|
+
props: { ...t, showOverflowTooltip: ["selection", "single-selection", "index", "expand"].includes(t.type) ? !1 : t.showOverflowTooltip }
|
|
65
|
+
}, r);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
let s, u;
|
|
69
|
+
const l = {};
|
|
70
|
+
var d = /* @__PURE__ */ o(
|
|
71
|
+
a,
|
|
72
|
+
s,
|
|
73
|
+
u,
|
|
74
|
+
!1,
|
|
75
|
+
c,
|
|
76
|
+
null,
|
|
77
|
+
null,
|
|
78
|
+
null
|
|
79
|
+
);
|
|
80
|
+
function c(n) {
|
|
81
|
+
for (let e in l)
|
|
82
|
+
this[e] = l[e];
|
|
83
|
+
}
|
|
84
|
+
const p = /* @__PURE__ */ function() {
|
|
85
|
+
return d.exports;
|
|
86
|
+
}();
|
|
87
|
+
export {
|
|
88
|
+
p as default
|
|
89
|
+
};
|
|
@@ -1 +1,363 @@
|
|
|
1
|
-
import{isString as o,isArray as
|
|
1
|
+
import { isString as o, isArray as d, trace as n, warning as f, merge as i, toStringArray as p, isFunction as u, hasOwn as c } from "@web-utils/core";
|
|
2
|
+
import { k as b } from "../../chunks/2bd4e340.js";
|
|
3
|
+
import { n as m } from "../../chunks/6499de3a.js";
|
|
4
|
+
var _ = function() {
|
|
5
|
+
var e = this, r = e.$createElement, t = e._self._c || r;
|
|
6
|
+
return t("div", {
|
|
7
|
+
staticClass: "table-view"
|
|
8
|
+
}, [t("Toolbar", e._g(e._b({
|
|
9
|
+
on: {
|
|
10
|
+
search: e.toggleSearch,
|
|
11
|
+
del: e.del,
|
|
12
|
+
create: e.create,
|
|
13
|
+
reload: e.reloadTable,
|
|
14
|
+
imp: function(s) {
|
|
15
|
+
e.importDialogVisible = !0;
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
scopedSlots: e._u([{
|
|
19
|
+
key: "default",
|
|
20
|
+
fn: function() {
|
|
21
|
+
return [e._t("toolbar-button")];
|
|
22
|
+
},
|
|
23
|
+
proxy: !0
|
|
24
|
+
}, e._l(e.buttonSlots, function(s) {
|
|
25
|
+
return {
|
|
26
|
+
key: s,
|
|
27
|
+
fn: function() {
|
|
28
|
+
return [e._t(s)];
|
|
29
|
+
},
|
|
30
|
+
proxy: !0
|
|
31
|
+
};
|
|
32
|
+
})], null, !0)
|
|
33
|
+
}, "Toolbar", e.toolbarProps, !1), e.toolbarListeners)), t("div", {
|
|
34
|
+
staticClass: "table-view-content-wrapper"
|
|
35
|
+
}, [t("div", {
|
|
36
|
+
staticClass: "table-view-content"
|
|
37
|
+
}, [e.treeProps.show ? t("div", {
|
|
38
|
+
ref: "treeScroller",
|
|
39
|
+
staticClass: "table-view-sidebar",
|
|
40
|
+
on: {
|
|
41
|
+
scroll: e.onTreeScroll
|
|
42
|
+
}
|
|
43
|
+
}, [t("div", {
|
|
44
|
+
staticStyle: {
|
|
45
|
+
"font-size": "16px"
|
|
46
|
+
}
|
|
47
|
+
}, [e._v(" \u89C6\u56FE\u5BFC\u822A ")]), t("EditableTree", e._g(e._b({
|
|
48
|
+
ref: "tree",
|
|
49
|
+
attrs: {
|
|
50
|
+
readonly: ""
|
|
51
|
+
},
|
|
52
|
+
scopedSlots: e._u([{
|
|
53
|
+
key: "default",
|
|
54
|
+
fn: function(s) {
|
|
55
|
+
var l = s.node, a = s.data;
|
|
56
|
+
return [e._t("tree-node", function() {
|
|
57
|
+
return [t("span", [t("i", {
|
|
58
|
+
staticClass: "node-icon",
|
|
59
|
+
class: l.childNodes.length > 0 ? l.expanded ? "el-icon-folder-opened" : "el-icon-folder" : "el-icon-tickets"
|
|
60
|
+
}), e._t("tree-label", function() {
|
|
61
|
+
return [e._v(e._s(l.label))];
|
|
62
|
+
}, {
|
|
63
|
+
node: l,
|
|
64
|
+
data: a
|
|
65
|
+
})], 2)];
|
|
66
|
+
}, {
|
|
67
|
+
node: l,
|
|
68
|
+
data: a
|
|
69
|
+
})];
|
|
70
|
+
}
|
|
71
|
+
}], null, !0)
|
|
72
|
+
}, "EditableTree", e.treeProps, !1), e.treeListeners))], 1) : e._e(), t("div", {
|
|
73
|
+
staticClass: "table-view-table"
|
|
74
|
+
}, [t("PageableTable", e._g(e._b({
|
|
75
|
+
ref: "table",
|
|
76
|
+
class: [{
|
|
77
|
+
"border-top": e.borderTop,
|
|
78
|
+
"border-bottom": e.borderBottom,
|
|
79
|
+
"border-left": e.borderLeft || e.treeAttrs && e.treeAttrs.show,
|
|
80
|
+
"border-right": e.borderRight
|
|
81
|
+
}],
|
|
82
|
+
attrs: {
|
|
83
|
+
border: e.border
|
|
84
|
+
},
|
|
85
|
+
on: {
|
|
86
|
+
"row-dblclick": e.rowDbClick,
|
|
87
|
+
"selection-change": e.onSelectionChange
|
|
88
|
+
}
|
|
89
|
+
}, "PageableTable", e.tableProps, !1), e.tableListeners), [e._t("columns")], 2)], 1)]), e.toolbarProps.searchable ? t("div", {
|
|
90
|
+
staticClass: "slide-panel",
|
|
91
|
+
style: {
|
|
92
|
+
right: `${e.right}px`,
|
|
93
|
+
width: `${e.searchPanelProps.width}px`
|
|
94
|
+
}
|
|
95
|
+
}, [e._m(0), t("div", {
|
|
96
|
+
staticClass: "slide-panel-content"
|
|
97
|
+
}, [t("ElForm", {
|
|
98
|
+
ref: "form",
|
|
99
|
+
attrs: {
|
|
100
|
+
"label-position": "right",
|
|
101
|
+
model: e.searchModel || e.searchPanelProps.model,
|
|
102
|
+
size: "mini",
|
|
103
|
+
"label-width": e.labelWidth
|
|
104
|
+
},
|
|
105
|
+
nativeOn: {
|
|
106
|
+
"!submit": function(s) {
|
|
107
|
+
return s.preventDefault(), e.onSearchClick.apply(null, arguments);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}, [t("FormItemConfigProvider", {
|
|
111
|
+
attrs: {
|
|
112
|
+
block: "",
|
|
113
|
+
"wrap-col": !1
|
|
114
|
+
}
|
|
115
|
+
}, [t("ElRow", {
|
|
116
|
+
attrs: {
|
|
117
|
+
gutter: 0
|
|
118
|
+
}
|
|
119
|
+
}, [e._t("search-form", function() {
|
|
120
|
+
return [t("p", [e._v("\u8BF7\u6DFB\u52A0\u641C\u7D22\u6761\u4EF6\uFF01")])];
|
|
121
|
+
})], 2)], 1), t("ElFormItem", {
|
|
122
|
+
attrs: {
|
|
123
|
+
"label-width": "0"
|
|
124
|
+
}
|
|
125
|
+
}, [t("div", {
|
|
126
|
+
staticClass: "slide-panel-actions"
|
|
127
|
+
}, [t("ElButton", {
|
|
128
|
+
attrs: {
|
|
129
|
+
type: "primary",
|
|
130
|
+
"native-type": "submit",
|
|
131
|
+
size: "mini"
|
|
132
|
+
}
|
|
133
|
+
}, [e._v(" \u5F00\u59CB\u641C\u7D22 ")]), t("ElButton", {
|
|
134
|
+
attrs: {
|
|
135
|
+
size: "mini"
|
|
136
|
+
},
|
|
137
|
+
on: {
|
|
138
|
+
click: e.onClearClick
|
|
139
|
+
}
|
|
140
|
+
}, [e._v(" \u6E05\u9664\u6761\u4EF6 ")])], 1)])], 1)], 1)]) : e._e()]), e._t("default")], 2);
|
|
141
|
+
}, g = [function() {
|
|
142
|
+
var e = this, r = e.$createElement, t = e._self._c || r;
|
|
143
|
+
return t("div", {
|
|
144
|
+
staticClass: "slide-panel-line"
|
|
145
|
+
}, [t("div", {
|
|
146
|
+
staticClass: "slide-panel-line-indicator"
|
|
147
|
+
})]);
|
|
148
|
+
}];
|
|
149
|
+
const w = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "agree", "disagree", "reject", "finish", "cancel", "enable", "exp", "imp", "del", "disabled", "reload", "slot"], v = {
|
|
150
|
+
name: "TableView",
|
|
151
|
+
bus: {
|
|
152
|
+
reloadTableView(e, r) {
|
|
153
|
+
if (!!this._viewIds)
|
|
154
|
+
if (o(e) || d(e)) {
|
|
155
|
+
let t = e;
|
|
156
|
+
o(t) && (t = t.split(",")), this._viewIds.some((s) => t.includes(s)) && (r ? this.$refs.tree && (n.call(this.$parent || {}, "reloadTree"), this.refreshTree()) : (n.call(this.$parent || {}, "reloadTable"), this.reloadTable()));
|
|
157
|
+
} else
|
|
158
|
+
f.call(this.$parent || {}, "`viewId`\u7684\u7C7B\u578B\u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u6216\u6570\u7EC4");
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
props: {
|
|
162
|
+
viewId: {
|
|
163
|
+
type: String
|
|
164
|
+
},
|
|
165
|
+
searchPanelAttrs: {
|
|
166
|
+
type: Object,
|
|
167
|
+
default: () => {
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
toolbarAttrs: {
|
|
171
|
+
type: Object,
|
|
172
|
+
default: () => {
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
toolbarListeners: {
|
|
176
|
+
type: Object
|
|
177
|
+
},
|
|
178
|
+
treeAttrs: {
|
|
179
|
+
type: Object,
|
|
180
|
+
default: () => {
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
treeListeners: {
|
|
184
|
+
type: Object
|
|
185
|
+
},
|
|
186
|
+
tableAttrs: {
|
|
187
|
+
type: Object
|
|
188
|
+
},
|
|
189
|
+
searchModel: {
|
|
190
|
+
type: Object
|
|
191
|
+
},
|
|
192
|
+
tableListeners: {
|
|
193
|
+
type: Object,
|
|
194
|
+
default: () => {
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
deleteApi: {
|
|
198
|
+
type: Function
|
|
199
|
+
},
|
|
200
|
+
borderTop: Boolean,
|
|
201
|
+
borderBottom: Boolean,
|
|
202
|
+
borderLeft: Boolean,
|
|
203
|
+
borderRight: Boolean,
|
|
204
|
+
border: {
|
|
205
|
+
type: Boolean,
|
|
206
|
+
default: !0
|
|
207
|
+
},
|
|
208
|
+
labelWidth: {
|
|
209
|
+
type: String,
|
|
210
|
+
default: "80px"
|
|
211
|
+
},
|
|
212
|
+
formPath: {
|
|
213
|
+
type: [String, Function]
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
data() {
|
|
217
|
+
var e;
|
|
218
|
+
return {
|
|
219
|
+
importDialogVisible: !1,
|
|
220
|
+
right: -(((e = this.searchPanelAttrs) == null ? void 0 : e.width) || 350),
|
|
221
|
+
selectedRows: []
|
|
222
|
+
};
|
|
223
|
+
},
|
|
224
|
+
computed: {
|
|
225
|
+
buttonSlots() {
|
|
226
|
+
return w.filter((e) => this.$scopedSlots[e]);
|
|
227
|
+
},
|
|
228
|
+
toolbarProps() {
|
|
229
|
+
var s, l;
|
|
230
|
+
const e = {}, r = i(this.toolbarAttrs, e);
|
|
231
|
+
let t = (r == null ? void 0 : r.buttons) || this.$parent.buttons;
|
|
232
|
+
return t = t || [], t.includes("reload") || (t = [...t, "reload"]), r.buttons = t, r.buttons = p(r.buttons), r.searchable = !!((l = (s = this.$scopedSlots)["search-form"]) != null && l.call(s)), r;
|
|
233
|
+
},
|
|
234
|
+
treeProps() {
|
|
235
|
+
const e = {
|
|
236
|
+
treeProps: {
|
|
237
|
+
children: "children",
|
|
238
|
+
label: "label",
|
|
239
|
+
isLeaf: (r) => c(r, "hasChildren") ? !r.hasChildren : c(r, "hasChild") ? !r.hasChild : !0
|
|
240
|
+
},
|
|
241
|
+
show: !1,
|
|
242
|
+
lazy: !0,
|
|
243
|
+
readonly: !0,
|
|
244
|
+
data: [],
|
|
245
|
+
"expand-first-node": !1,
|
|
246
|
+
"default-expand-all": !1
|
|
247
|
+
};
|
|
248
|
+
return i(this.treeAttrs, e);
|
|
249
|
+
},
|
|
250
|
+
tableProps() {
|
|
251
|
+
const e = this.tableAttrs.api || this.$parent.getPage, r = {
|
|
252
|
+
model: this.searchModel || {},
|
|
253
|
+
height: "auto",
|
|
254
|
+
"highlight-current-row": !0,
|
|
255
|
+
api: e
|
|
256
|
+
};
|
|
257
|
+
return i(this.tableAttrs, r);
|
|
258
|
+
},
|
|
259
|
+
searchPanelProps() {
|
|
260
|
+
const e = {
|
|
261
|
+
width: 350,
|
|
262
|
+
model: this.searchModel || {}
|
|
263
|
+
};
|
|
264
|
+
return i(this.searchPanelAttrs, e);
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
created() {
|
|
268
|
+
this._viewIds = [], this.viewId && this._viewIds.push(this.viewId), this._viewIds.includes(this.$parent.$options.name) || this._viewIds.push(this.$parent.$options.name);
|
|
269
|
+
},
|
|
270
|
+
async activated() {
|
|
271
|
+
this.$refs.treeScroller && (this.treeScrollTop && (this.$refs.treeScroller.scrollTop = this.treeScrollTop), this.treeScrollLeft && (this.$refs.treeScroller.scrollLeft = this.treeScrollLeft));
|
|
272
|
+
},
|
|
273
|
+
methods: {
|
|
274
|
+
onTreeScroll() {
|
|
275
|
+
this.treeScrollTop = this.$refs.treeScroller.scrollTop, this.treeScrollLeft = this.$refs.treeScroller.scrollLeft;
|
|
276
|
+
},
|
|
277
|
+
toggleSearch() {
|
|
278
|
+
this.right = this.right === 0 ? -this.searchPanelProps.width : 0;
|
|
279
|
+
},
|
|
280
|
+
async onSearchClick() {
|
|
281
|
+
this.$refs.table.setModel(this.searchModel || this.searchPanelProps.model), await this.refreshTable();
|
|
282
|
+
},
|
|
283
|
+
async onClearClick() {
|
|
284
|
+
this.$emit("reset"), this.$refs.form.resetFields(), this.$refs.table.setModel(this.searchModel || this.searchPanelProps.model), await this.refreshTable();
|
|
285
|
+
},
|
|
286
|
+
openFrom(e) {
|
|
287
|
+
this.$router.push(b(this.formPath, e));
|
|
288
|
+
},
|
|
289
|
+
rowDbClick(e) {
|
|
290
|
+
var r;
|
|
291
|
+
!((r = this.tableListeners) != null && r["row-dblclick"]) && this.formPath && this.openFrom(e);
|
|
292
|
+
},
|
|
293
|
+
onSelectionChange(e) {
|
|
294
|
+
this.selectedRows = e;
|
|
295
|
+
},
|
|
296
|
+
create() {
|
|
297
|
+
var e;
|
|
298
|
+
!((e = this.toolbarListeners) != null && e.create) && this.formPath && this.openFrom();
|
|
299
|
+
},
|
|
300
|
+
async del() {
|
|
301
|
+
var r;
|
|
302
|
+
const e = this.deleteApi || this.$parent.del;
|
|
303
|
+
if (!((r = this.toolbarListeners) != null && r.del) && u(e)) {
|
|
304
|
+
if (!this.selectedRows.length) {
|
|
305
|
+
this.$message.warning("\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u8BB0\u5F55\uFF01");
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
await this.$confirm(
|
|
309
|
+
`\u60A8\u786E\u5B9A\u8981\u5220\u9664\u9009\u4E2D\u7684[<span class="break-word" style="color: orange">${this.selectedRows.length}</span>]\u884C\u8BB0\u5F55\u5417\uFF1F`,
|
|
310
|
+
"\u7CFB\u7EDF\u63D0\u793A",
|
|
311
|
+
{
|
|
312
|
+
type: "warning",
|
|
313
|
+
modal: !0,
|
|
314
|
+
dangerouslyUseHTMLString: !0,
|
|
315
|
+
closeOnClickModal: !1,
|
|
316
|
+
beforeClose: async (t, s, l) => {
|
|
317
|
+
if (t === "confirm")
|
|
318
|
+
try {
|
|
319
|
+
s.confirmButtonLoading = !0, s.confirmButtonText = "\u5220\u9664...", await e.call(this, this.selectedRows.map((a) => a.id).join(",")), this.$message.success("\u5220\u9664\u6210\u529F"), await this.reloadTable(), await this.refreshTree();
|
|
320
|
+
} catch {
|
|
321
|
+
}
|
|
322
|
+
l();
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
).catch((t) => t);
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
reloadTable() {
|
|
329
|
+
var e;
|
|
330
|
+
(e = this.$refs.table) == null || e.reload();
|
|
331
|
+
},
|
|
332
|
+
async refreshTable() {
|
|
333
|
+
var e;
|
|
334
|
+
await ((e = this.$refs.table) == null ? void 0 : e.getPage());
|
|
335
|
+
},
|
|
336
|
+
refreshTree() {
|
|
337
|
+
this.$refs.tree.reloadTree();
|
|
338
|
+
},
|
|
339
|
+
getSearchModel() {
|
|
340
|
+
return this.searchPanelProps.model;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}, h = {};
|
|
344
|
+
var y = /* @__PURE__ */ m(
|
|
345
|
+
v,
|
|
346
|
+
_,
|
|
347
|
+
g,
|
|
348
|
+
!1,
|
|
349
|
+
P,
|
|
350
|
+
null,
|
|
351
|
+
null,
|
|
352
|
+
null
|
|
353
|
+
);
|
|
354
|
+
function P(e) {
|
|
355
|
+
for (let r in h)
|
|
356
|
+
this[r] = h[r];
|
|
357
|
+
}
|
|
358
|
+
const C = /* @__PURE__ */ function() {
|
|
359
|
+
return y.exports;
|
|
360
|
+
}();
|
|
361
|
+
export {
|
|
362
|
+
C as default
|
|
363
|
+
};
|