@web-utils/component 3.8.3 → 4.0.1
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/awesome-button/index.mjs +25 -55
- package/base.css +1 -1
- package/card/index.mjs +13 -13
- package/card/style.css +1 -1
- package/carousel/style.css +1 -1
- package/chat/index.mjs +2 -2
- package/chat/style.css +1 -1
- package/chunks/{ElementForm.8w6UkiuU.mjs → ElementForm.CQ3PN5qj.mjs} +17 -35
- package/chunks/{ElementListeners.DOy8wyD2.mjs → ElementListeners.De_PRuIm.mjs} +56 -95
- package/chunks/{ElementMultiInstance.3Z28ewuh.mjs → ElementMultiInstance.DQo2wuAQ.mjs} +16 -26
- package/chunks/{ElementProperties.B2I48muA.mjs → ElementProperties.CosfDrlW.mjs} +16 -16
- package/chunks/{ElementTaskConfig.MBbkLrth.mjs → ElementTaskConfig.Bko0kgTp.mjs} +104 -113
- package/chunks/{FlowCondition.BfU9kw6h.mjs → FlowCondition.Y6qEYi1T.mjs} +36 -66
- package/chunks/{FormTemp.BSpnNput.mjs → FormTemp.Bu2VCxUh.mjs} +2 -2
- package/chunks/{SignalAndMessage.CH6L7cYu.mjs → SignalAndMessage.Bb5PFX0N.mjs} +11 -22
- package/chunks/{UserTaskListeners.XXe5dC5I.mjs → UserTaskListeners.Bv3BDfEI.mjs} +45 -86
- package/chunks/configComponents.BDhlZU8F.mjs +23 -0
- package/chunks/confirmable-mixin.D9aKzKZ9.mjs +85 -0
- package/chunks/core.DJEgjQW6.mjs +54 -0
- package/chunks/{dataformat.B9UvztrQ.mjs → dataformat.CpqOeGBl.mjs} +2 -2
- package/chunks/{dic.CET0XdKP.mjs → dic.Dkl-leRW.mjs} +43 -43
- package/chunks/dictionary.DqiP9x2m.mjs +25 -0
- package/chunks/{event.BT1F_1vF.mjs → event.9aDS6jcw.mjs} +2 -2
- package/chunks/form-input.B8z37eqj.mjs +31 -0
- package/chunks/form-item.D-H-wCPE.mjs +233 -0
- package/chunks/form-validate.CVarNHKX.mjs +12 -0
- package/chunks/helper.BiMLcEEk.mjs +41 -0
- package/chunks/index.9OxHjTIE.mjs +16 -0
- package/chunks/{index.MAFc4eFi.mjs → index.d3MV3Wq2.mjs} +43 -47
- package/chunks/{init.ofpxEyAI.mjs → init.DAsXSoLW.mjs} +2 -2
- package/chunks/{packages.CWPkeLu9.mjs → packages.ByyangTp.mjs} +3 -3
- package/chunks/sub-table-plus-props.BVsD71hT.mjs +30 -0
- package/chunks/{tab-mixin.CVr9bZtn.mjs → tab-mixin.BNK6dxLN.mjs} +1 -1
- package/chunks/{util.CoahLDYn.mjs → util.DqFv_pWg.mjs} +54 -55
- package/chunks/utilSelf.Csq1766E.mjs +48 -0
- package/color-picker/index.mjs +19 -37
- package/comment/style.css +1 -1
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/context-menu/style.css +1 -1
- package/count-up/index.mjs +13 -24
- package/custom-scrollbar/index.mjs +1 -2
- package/data-operatext/style.css +1 -1
- package/data-panel/style.css +1 -1
- package/data-pay/style.css +1 -1
- package/data-price/style.css +1 -1
- package/data-rotate/style.css +1 -1
- package/data-table-picker/index.mjs +1 -1
- package/data-tabs/style.css +1 -1
- package/dialog-form/index.mjs +16 -28
- package/dynamic-table/style.css +1 -1
- package/easy-popup/index.mjs +22 -40
- package/easy-popup/style.css +1 -1
- package/editable-tree/index.mjs +203 -250
- package/editable-tree/style.css +1 -1
- package/element-dialog/index.mjs +30 -52
- package/element-dialog/style.css +1 -1
- package/flex-column/index.mjs +13 -25
- package/flex-item/index.mjs +15 -27
- package/flex-row/index.mjs +13 -25
- package/flow/index.mjs +30 -32
- package/flow-designer/index.mjs +344 -375
- package/flow-designer/style.css +1 -1
- package/flow-node/index.mjs +1 -1
- package/flow-viewer/index.mjs +64 -91
- package/form-block/index.mjs +33 -26
- package/form-card/index.mjs +25 -0
- package/form-cascader/index.mjs +70 -67
- package/form-checkbox/index.mjs +71 -0
- package/form-checkbox-group/index.mjs +33 -53
- package/form-date-picker/index.mjs +44 -73
- package/form-holder/index.mjs +60 -64
- package/form-holder/style.css +1 -0
- package/form-input/index.mjs +62 -40
- package/form-input-cron-expression/index.mjs +77 -0
- package/form-input-cron-expression/style.css +1 -0
- package/form-input-email/index.mjs +21 -33
- package/form-input-id-card/index.mjs +25 -38
- package/form-input-number/index.mjs +39 -42
- package/form-input-number/style.css +1 -1
- package/form-input-phone-number/index.mjs +26 -37
- package/form-input-tag/index.mjs +32 -34
- package/form-input-time/index.mjs +22 -37
- package/form-item/index.mjs +109 -101
- package/form-item/style.css +1 -1
- package/form-item-config-provider/index.mjs +18 -10
- package/form-item-group/index.mjs +73 -69
- package/form-item-group/style.css +1 -1
- package/form-radio-group/index.mjs +41 -36
- package/form-radio-group/style.css +1 -1
- package/form-select/index.mjs +142 -75
- package/form-select/style.css +1 -0
- package/form-switch/index.mjs +29 -34
- package/form-table/index.mjs +85 -0
- package/form-table-plus/index.mjs +109 -0
- package/form-textarea/index.mjs +23 -35
- package/form-tree-select/index.mjs +72 -0
- package/form-tree-select/style.css +1 -0
- package/form-tree-select-multiple/index.mjs +78 -0
- package/form-view/index.mjs +43 -77
- package/form-view/style.css +1 -1
- package/fy-array/index.mjs +2 -2
- package/fy-cascader/index.mjs +1 -1
- package/fy-checkbox/index.mjs +1 -1
- package/fy-code/index.mjs +1 -1
- package/fy-curd/index.mjs +12 -17
- package/fy-curd/style.css +1 -1
- package/fy-date/index.mjs +1 -1
- package/fy-draggable/index.mjs +5 -7
- package/fy-draggable/style.css +1 -1
- package/fy-dynamic/index.mjs +14 -16
- package/fy-empty/index.mjs +1 -1
- package/fy-empty/style.css +1 -1
- package/fy-form/index.mjs +117 -136
- package/fy-form/style.css +1 -1
- package/fy-form-design/index.mjs +319 -345
- package/fy-form-design/style.css +1 -1
- package/fy-input/index.mjs +2 -2
- package/fy-input-color/index.mjs +1 -1
- package/fy-input-icon/index.mjs +1 -1
- package/fy-input-map/index.mjs +21 -26
- package/fy-input-map/style.css +1 -1
- package/fy-input-number/index.mjs +1 -1
- package/fy-input-table/index.mjs +10 -12
- package/fy-input-tree/index.mjs +1 -1
- package/fy-radio/index.mjs +1 -1
- package/fy-rate/index.mjs +1 -1
- package/fy-select/index.mjs +4 -4
- package/fy-slider/index.mjs +2 -2
- package/fy-switch/index.mjs +1 -1
- package/fy-tabs/index.mjs +0 -1
- package/fy-time/index.mjs +1 -1
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +1 -1
- package/fy-u-editor/index.mjs +77 -103
- package/fy-upload/index.mjs +3 -3
- package/fy-upload/style.css +1 -1
- package/highlight-j-s/index.mjs +1 -1
- package/highlight-j-s/style.css +1 -1
- package/image-cropper/index.mjs +14 -65
- package/image-preview/index.mjs +17 -45
- package/image-preview/style.css +1 -1
- package/image-viewer/style.css +1 -1
- package/index.mjs +666 -496
- package/input-number/index.mjs +64 -9
- package/keyboard/style.css +1 -1
- package/license/index.mjs +1 -1
- package/login/index.mjs +1 -1
- package/monaco-editor/index.mjs +44 -74
- package/name-avatar/style.css +1 -1
- package/package.json +18 -17
- package/page-index/index.mjs +30 -54
- package/page-index-top/index.mjs +25 -47
- package/pageable-table/index.mjs +354 -226
- package/pageable-table/style.css +1 -1
- package/pageable-view/index.mjs +63 -106
- package/photo-swipe/index.mjs +51 -74
- package/picker-table-view/index.mjs +117 -0
- package/present-view/index.mjs +43 -77
- package/present-view/style.css +1 -1
- package/record-video/index.mjs +1 -1
- package/resize-observer/index.mjs +1 -1
- package/resize-observer/style.css +1 -1
- package/search/index.mjs +2 -2
- package/search/style.css +1 -1
- package/search-popover/index.mjs +28 -48
- package/search-popover/style.css +1 -1
- package/sign/index.mjs +2 -2
- package/sign-panel/style.css +1 -1
- package/skeleton-panel/index.mjs +38 -0
- package/skeleton-panel/style.css +1 -0
- package/split-pane/index.mjs +31 -49
- package/split-pane/style.css +1 -1
- package/sub-table/index.mjs +206 -0
- package/sub-table/style.css +1 -0
- package/sub-table-plus/index.mjs +231 -0
- package/sub-table-plus/style.css +1 -0
- package/swiper/index.mjs +18 -38
- package/swiper/style.css +1 -1
- package/tab/index.mjs +1 -1
- package/tab/style.css +1 -1
- package/tab-item/index.mjs +2 -2
- package/table-column/index.mjs +112 -37
- package/table-column/style.css +1 -0
- package/table-view/index.mjs +178 -135
- package/table-view/style.css +1 -1
- package/tabs-view/index.mjs +104 -0
- package/tabs-view/style.css +1 -0
- package/tag-render/index.mjs +13 -24
- package/text-ellipsis/index.mjs +1 -1
- package/toolbar/index.mjs +115 -58
- package/toolbar/style.css +1 -1
- package/toolbar-button/index.mjs +92 -48
- package/verify/index.mjs +1 -1
- package/vue-cron/index.mjs +48 -66
- package/vue-qr-code/index.mjs +14 -32
- package/vue-quill-editor/index.mjs +3 -3
- package/vue-tags-input/index.mjs +1 -1
- package/vue-tree-select/index.mjs +352 -393
- package/vue-tree-select/style.css +1 -1
- package/vue-video-player/index.mjs +36 -67
- package/watermark/index.mjs +21 -31
- package/web-types.json +9240 -3843
- package/x-input-tag/index.mjs +29 -61
- package/chunks/confirmable-mixin.D4LAArE5.mjs +0 -114
- package/chunks/form-input-mixin.BkKiqJhi.mjs +0 -24
- package/chunks/form-item-mixin.CG4ZwzMC.mjs +0 -140
- package/chunks/input-number-mixin.CzjtGf2n.mjs +0 -60
- package/chunks/utilSelf.CRqpl0Cz.mjs +0 -56
- package/toolbar-button/style.css +0 -1
- /package/chunks/{form-pick-mixin.BFTIVn_i.mjs → form-pick.BFTIVn_i.mjs} +0 -0
package/table-view/index.mjs
CHANGED
|
@@ -1,24 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
c(t.throw(i));
|
|
11
|
-
} catch (h) {
|
|
12
|
-
l(h);
|
|
13
|
-
}
|
|
14
|
-
}, c = (i) => i.done ? s(i.value) : Promise.resolve(i.value).then(o, b);
|
|
15
|
-
c((t = t.apply(r, e)).next());
|
|
16
|
-
});
|
|
17
|
-
import { merge as n } from "@web-utils/integrations/lodash";
|
|
18
|
-
import { isFunction as u, toStringArray as m, isString as d, isArray as g, trace as f, warning as w, hasOwn as p } from "@web-utils/core";
|
|
19
|
-
import { k as _ } from "../chunks/index.MAFc4eFi.mjs";
|
|
20
|
-
import { n as v } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
21
|
-
const P = [
|
|
1
|
+
import { isFunction as w, toStringArray as g, isString as i, isArray as d, trace as u, warning as b, hasOwn as p } from "@web-utils/core";
|
|
2
|
+
import { merge as a } from "@web-utils/integrations/lodash";
|
|
3
|
+
import { e as v } from "../chunks/index.d3MV3Wq2.mjs";
|
|
4
|
+
import _ from "../form-item-config-provider/index.mjs";
|
|
5
|
+
import { g as f } from "../chunks/configComponents.BDhlZU8F.mjs";
|
|
6
|
+
import { b as n } from "../chunks/core.DJEgjQW6.mjs";
|
|
7
|
+
import y from "element-ui/lib/transitions/collapse-transition";
|
|
8
|
+
import { n as S } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
9
|
+
const T = [
|
|
22
10
|
"back",
|
|
23
11
|
"create",
|
|
24
12
|
"save",
|
|
@@ -38,22 +26,29 @@ const P = [
|
|
|
38
26
|
"disabled",
|
|
39
27
|
"reload",
|
|
40
28
|
"slot"
|
|
41
|
-
],
|
|
29
|
+
], P = {
|
|
42
30
|
name: "TableView",
|
|
43
31
|
bus: {
|
|
44
|
-
reloadTableView(
|
|
32
|
+
reloadTableView(t) {
|
|
33
|
+
if (this._viewIds)
|
|
34
|
+
if (i(t) || d(t)) {
|
|
35
|
+
let e = t;
|
|
36
|
+
i(e) && (e = e.split(",")), this._viewIds.some((r) => e.includes(r)) && (u.call(this.$parent || {}, "reloadTableView"), this.reloadTable());
|
|
37
|
+
} else
|
|
38
|
+
b.call(this.$parent || {}, "`viewId`的类型必须是字符串或数组");
|
|
39
|
+
},
|
|
40
|
+
reloadTreeView(t) {
|
|
45
41
|
if (this._viewIds)
|
|
46
|
-
if (
|
|
47
|
-
let
|
|
48
|
-
|
|
42
|
+
if (i(t) || d(t)) {
|
|
43
|
+
let e = t;
|
|
44
|
+
i(e) && (e = e.split(",")), this._viewIds.some((r) => e.includes(r)) && this.$refs.tree && (u.call(this.$parent || {}, "reloadTreeView"), this.reloadTree());
|
|
49
45
|
} else
|
|
50
|
-
|
|
46
|
+
b.call(this.$parent || {}, "`viewId`的类型必须是字符串或数组");
|
|
51
47
|
}
|
|
52
48
|
},
|
|
49
|
+
components: { FormItemConfigProvider: _, ElCollapseTransition: y },
|
|
53
50
|
props: {
|
|
54
|
-
viewId:
|
|
55
|
-
type: String
|
|
56
|
-
},
|
|
51
|
+
viewId: [String, Array],
|
|
57
52
|
searchPanelAttrs: {
|
|
58
53
|
type: Object,
|
|
59
54
|
default: () => {
|
|
@@ -64,31 +59,21 @@ const P = [
|
|
|
64
59
|
default: () => {
|
|
65
60
|
}
|
|
66
61
|
},
|
|
67
|
-
toolbarListeners:
|
|
68
|
-
type: Object
|
|
69
|
-
},
|
|
62
|
+
toolbarListeners: Object,
|
|
70
63
|
treeAttrs: {
|
|
71
64
|
type: Object,
|
|
72
65
|
default: () => {
|
|
73
66
|
}
|
|
74
67
|
},
|
|
75
|
-
treeListeners:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
tableAttrs: {
|
|
79
|
-
type: Object
|
|
80
|
-
},
|
|
81
|
-
searchModel: {
|
|
82
|
-
type: Object
|
|
83
|
-
},
|
|
68
|
+
treeListeners: Object,
|
|
69
|
+
tableAttrs: Object,
|
|
70
|
+
searchModel: Object,
|
|
84
71
|
tableListeners: {
|
|
85
72
|
type: Object,
|
|
86
73
|
default: () => {
|
|
87
74
|
}
|
|
88
75
|
},
|
|
89
|
-
deleteApi:
|
|
90
|
-
type: Function
|
|
91
|
-
},
|
|
76
|
+
deleteApi: Function,
|
|
92
77
|
borderTop: Boolean,
|
|
93
78
|
borderBottom: Boolean,
|
|
94
79
|
borderLeft: Boolean,
|
|
@@ -99,32 +84,45 @@ const P = [
|
|
|
99
84
|
},
|
|
100
85
|
labelWidth: {
|
|
101
86
|
type: String,
|
|
102
|
-
default: "
|
|
87
|
+
default: "120px"
|
|
103
88
|
},
|
|
104
|
-
formPath:
|
|
105
|
-
|
|
89
|
+
formPath: [String, Function],
|
|
90
|
+
searchFormPosition: {
|
|
91
|
+
type: String,
|
|
92
|
+
default: "top"
|
|
93
|
+
},
|
|
94
|
+
embed: Boolean,
|
|
95
|
+
deleteTips: String,
|
|
96
|
+
selectTips: String,
|
|
97
|
+
rowKey: {
|
|
98
|
+
type: String,
|
|
99
|
+
default: "id"
|
|
100
|
+
},
|
|
101
|
+
expandSearch: Boolean,
|
|
102
|
+
showToolbar: {
|
|
103
|
+
type: Boolean,
|
|
104
|
+
default: !0
|
|
106
105
|
}
|
|
107
106
|
},
|
|
108
107
|
data() {
|
|
109
|
-
var r;
|
|
110
108
|
return {
|
|
111
109
|
importDialogVisible: !1,
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
selectedRows: [],
|
|
111
|
+
isSearchVisible: !1
|
|
114
112
|
};
|
|
115
113
|
},
|
|
116
114
|
computed: {
|
|
117
115
|
buttonSlots() {
|
|
118
|
-
return
|
|
116
|
+
return T.filter((t) => this.$scopedSlots[t]);
|
|
119
117
|
},
|
|
120
118
|
toolbarProps() {
|
|
121
119
|
var s, l;
|
|
122
|
-
const
|
|
123
|
-
let
|
|
124
|
-
return
|
|
120
|
+
const t = {}, e = a({}, this.toolbarAttrs, t);
|
|
121
|
+
let r = (e == null ? void 0 : e.buttons) || this.$parent.buttons;
|
|
122
|
+
return r = r || [], e.buttons = r, e.buttons = f.privilege.processButtons(e.buttons), e.buttons = g(e.buttons), e.searchable = !!((l = (s = this.$scopedSlots)["search-form"]) != null && l.call(s)), e;
|
|
125
123
|
},
|
|
126
124
|
treeProps() {
|
|
127
|
-
const
|
|
125
|
+
const t = {
|
|
128
126
|
treeProps: {
|
|
129
127
|
children: "children",
|
|
130
128
|
label: "label",
|
|
@@ -134,151 +132,196 @@ const P = [
|
|
|
134
132
|
lazy: !0,
|
|
135
133
|
readonly: !0,
|
|
136
134
|
data: [],
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
expandFirstNode: !0,
|
|
136
|
+
defaultExpandAll: !1
|
|
139
137
|
};
|
|
140
|
-
return n(this.treeAttrs,
|
|
138
|
+
return n(a({}, this.treeAttrs, t));
|
|
141
139
|
},
|
|
142
140
|
tableProps() {
|
|
143
|
-
const
|
|
141
|
+
const t = this.tableAttrs.api || this.$parent.getPage, e = {
|
|
144
142
|
model: this.searchModel || {},
|
|
145
143
|
height: "auto",
|
|
146
|
-
|
|
147
|
-
api:
|
|
144
|
+
highlightCurrentRow: !0,
|
|
145
|
+
api: t
|
|
148
146
|
};
|
|
149
|
-
return n(this.tableAttrs, e);
|
|
147
|
+
return n(a({}, this.tableAttrs, e));
|
|
150
148
|
},
|
|
151
149
|
searchPanelProps() {
|
|
152
|
-
const
|
|
150
|
+
const t = {
|
|
153
151
|
width: 350,
|
|
154
152
|
model: this.searchModel || {}
|
|
155
153
|
};
|
|
156
|
-
return n(this.searchPanelAttrs,
|
|
154
|
+
return n(a({}, this.searchPanelAttrs, t));
|
|
155
|
+
},
|
|
156
|
+
toolbarEventHandlers() {
|
|
157
|
+
if (this.toolbarListeners) {
|
|
158
|
+
const { exp: t, ...e } = this.toolbarListeners;
|
|
159
|
+
return e;
|
|
160
|
+
}
|
|
161
|
+
return null;
|
|
162
|
+
},
|
|
163
|
+
tableScopeSlotNames() {
|
|
164
|
+
var t, e;
|
|
165
|
+
return ((e = (t = this.tableAttrs) == null ? void 0 : t.columns) == null ? void 0 : e.map((r) => r.prop).filter((r) => this.$scopedSlots[r])) ?? [];
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
watch: {
|
|
169
|
+
expandSearch: {
|
|
170
|
+
immediate: !0,
|
|
171
|
+
handler(t) {
|
|
172
|
+
this.isSearchVisible = t;
|
|
173
|
+
}
|
|
157
174
|
}
|
|
158
175
|
},
|
|
159
176
|
created() {
|
|
160
177
|
this._viewIds = [], this.viewId && this._viewIds.push(this.viewId), this._viewIds.includes(this.$parent.$options.name) || this._viewIds.push(this.$parent.$options.name);
|
|
161
178
|
},
|
|
162
179
|
activated() {
|
|
163
|
-
|
|
164
|
-
this.$refs.treeScroller && (this.treeScrollTop && (this.$refs.treeScroller.scrollTop = this.treeScrollTop), this.treeScrollLeft && (this.$refs.treeScroller.scrollLeft = this.treeScrollLeft));
|
|
165
|
-
});
|
|
180
|
+
this.$refs.treeScroller && (this.treeScrollTop && (this.$refs.treeScroller.scrollTop = this.treeScrollTop), this.treeScrollLeft && (this.$refs.treeScroller.scrollLeft = this.treeScrollLeft));
|
|
166
181
|
},
|
|
167
182
|
methods: {
|
|
183
|
+
toHyphenateKey: n,
|
|
168
184
|
onTreeScroll() {
|
|
169
185
|
this.treeScrollTop = this.$refs.treeScroller.scrollTop, this.treeScrollLeft = this.$refs.treeScroller.scrollLeft;
|
|
170
186
|
},
|
|
171
187
|
toggleSearch() {
|
|
172
|
-
this.
|
|
188
|
+
this.isSearchVisible = !this.isSearchVisible;
|
|
173
189
|
},
|
|
174
|
-
onSearchClick() {
|
|
175
|
-
|
|
176
|
-
this.$refs.table.setModel(this.searchModel || this.searchPanelProps.model), yield this.refreshTable();
|
|
177
|
-
});
|
|
190
|
+
async onSearchClick() {
|
|
191
|
+
await this.reloadTable();
|
|
178
192
|
},
|
|
179
|
-
onClearClick() {
|
|
180
|
-
|
|
181
|
-
this.$emit("reset"), this.$refs.form.resetFields(), this.$refs.table.setModel(this.searchModel || this.searchPanelProps.model), yield this.refreshTable();
|
|
182
|
-
});
|
|
193
|
+
async onClearClick() {
|
|
194
|
+
this.$emit("reset"), this.$refs.form.resetFields(), await this.reloadTable();
|
|
183
195
|
},
|
|
184
|
-
openFrom(
|
|
185
|
-
this.$router.push(
|
|
196
|
+
openFrom(t) {
|
|
197
|
+
this.$router.push(v(this.formPath, t));
|
|
186
198
|
},
|
|
187
|
-
rowDbClick(
|
|
199
|
+
rowDbClick(t) {
|
|
188
200
|
var e;
|
|
189
|
-
!((e = this.tableListeners) != null && e["row-dblclick"]) && this.formPath && this.openFrom(
|
|
201
|
+
!((e = this.tableListeners) != null && e["row-dblclick"]) && this.formPath && this.openFrom(t);
|
|
190
202
|
},
|
|
191
|
-
onSelectionChange(
|
|
192
|
-
this.selectedRows =
|
|
203
|
+
onSelectionChange(t) {
|
|
204
|
+
this.selectedRows = t;
|
|
193
205
|
},
|
|
194
206
|
create() {
|
|
195
|
-
var
|
|
196
|
-
!((
|
|
207
|
+
var t;
|
|
208
|
+
!((t = this.toolbarListeners) != null && t.create) && this.formPath && this.openFrom();
|
|
197
209
|
},
|
|
198
|
-
del() {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
if (!
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
210
|
+
async del() {
|
|
211
|
+
var e;
|
|
212
|
+
const t = this.deleteApi || this.$parent.del;
|
|
213
|
+
if (!((e = this.toolbarListeners) != null && e.del) && w(t)) {
|
|
214
|
+
if (!this.selectedRows.length) {
|
|
215
|
+
this.$message.warning(this.selectTips || "请选择要删除的记录!");
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
await this.$confirm(
|
|
219
|
+
this.deleteTips || `您确定要删除选中的[<span class="break-word" style="color: orange">${this.selectedRows.length}</span>]行记录吗?`,
|
|
220
|
+
"系统提示",
|
|
221
|
+
{
|
|
208
222
|
type: "warning",
|
|
209
223
|
modal: !0,
|
|
210
224
|
dangerouslyUseHTMLString: !0,
|
|
211
225
|
closeOnClickModal: !1,
|
|
212
|
-
beforeClose: (
|
|
213
|
-
|
|
226
|
+
beforeClose: async (r, s, l) => {
|
|
227
|
+
var o, c;
|
|
228
|
+
if (r === "confirm")
|
|
214
229
|
try {
|
|
215
|
-
s.confirmButtonLoading = !0, s.confirmButtonText = "删除..."
|
|
216
|
-
|
|
230
|
+
s.confirmButtonLoading = !0, s.confirmButtonText = "删除...";
|
|
231
|
+
const h = await t.call(
|
|
232
|
+
this,
|
|
233
|
+
this.selectedRows.map((m) => m[this.rowKey])
|
|
234
|
+
);
|
|
235
|
+
this.$message.success(h.data.msg || "删除成功"), this.reloadTableAndTree(), (c = (o = f.tableView) == null ? void 0 : o.reload) == null || c.call(o);
|
|
236
|
+
} catch {
|
|
217
237
|
}
|
|
218
238
|
l();
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
).catch((r) => r);
|
|
242
|
+
}
|
|
223
243
|
},
|
|
224
244
|
reloadTable() {
|
|
225
|
-
var
|
|
226
|
-
(
|
|
245
|
+
var t;
|
|
246
|
+
(t = this.$refs.table) == null || t.reload();
|
|
247
|
+
},
|
|
248
|
+
async refreshTable(t) {
|
|
249
|
+
var e;
|
|
250
|
+
await ((e = this.$refs.table) == null ? void 0 : e.getPage(t));
|
|
227
251
|
},
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
yield (r = this.$refs.table) == null ? void 0 : r.getPage();
|
|
232
|
-
});
|
|
252
|
+
reloadTree() {
|
|
253
|
+
var t;
|
|
254
|
+
(t = this.$refs.tree) == null || t.reloadTree();
|
|
233
255
|
},
|
|
234
|
-
|
|
235
|
-
this
|
|
256
|
+
reloadTableAndTree() {
|
|
257
|
+
this.reloadTable(), this.reloadTree();
|
|
236
258
|
},
|
|
237
|
-
|
|
238
|
-
return this.
|
|
259
|
+
currentRow() {
|
|
260
|
+
return this.$refs.table.currentRow;
|
|
261
|
+
},
|
|
262
|
+
getPageQuery() {
|
|
263
|
+
return this.$refs.table.getPageQuery();
|
|
264
|
+
},
|
|
265
|
+
exp() {
|
|
266
|
+
var t, e;
|
|
267
|
+
(e = (t = this.toolbarListeners).exp) == null || e.call(t, this.selectedRows);
|
|
268
|
+
},
|
|
269
|
+
getTableColumns() {
|
|
270
|
+
return this.$refs.table.tableColumns;
|
|
239
271
|
}
|
|
240
272
|
}
|
|
241
273
|
};
|
|
242
|
-
var
|
|
243
|
-
var e = this,
|
|
244
|
-
return
|
|
274
|
+
var C = function() {
|
|
275
|
+
var e = this, r = e._self._c;
|
|
276
|
+
return r("div", { class: ["table-view", { embed: e.embed, "has-tree": e.treeProps.show }] }, [r("div", { staticClass: "table-view-wrapper" }, [e.searchFormPosition === "top" ? [r("ElCollapseTransition", [e.toolbarProps.searchable ? r("div", { directives: [{ name: "show", rawName: "v-show", value: e.isSearchVisible, expression: "isSearchVisible" }], staticClass: "search-form-top" }, [r("ElForm", { ref: "form", attrs: { "label-position": "right", model: e.searchModel || e.searchPanelProps.model, size: "mini", "label-width": e.labelWidth }, nativeOn: { "!submit": function(s) {
|
|
277
|
+
return s.preventDefault(), e.onSearchClick.apply(null, arguments);
|
|
278
|
+
} } }, [r("FormItemConfigProvider", { attrs: { reactive: "" } }, [r("ElRow", { attrs: { gutter: 0 } }, [e._t("search-form", function() {
|
|
279
|
+
return [r("p", [e._v("请添加搜索条件!")])];
|
|
280
|
+
}), r("FormItem", { staticClass: "search-actions", attrs: { "hide-label": "" } }, [r("ElButton", { attrs: { type: "primary", "native-type": "submit", size: "mini" } }, [e._v("开始搜索")]), r("ElButton", { staticStyle: { "margin-left": "10px" }, attrs: { size: "mini" }, on: { click: e.onClearClick } }, [e._v("清除条件")])], 1)], 2)], 1)], 1)], 1) : e._e()])] : e._e(), e.showToolbar ? r("Toolbar", e._g(e._b({ attrs: { refreshable: "" }, on: { search: e.toggleSearch, settings: () => e.$refs.table.toggleSettings(), del: e.del, create: e.create, reload: e.reloadTableAndTree, exp: e.exp, imp: function(s) {
|
|
245
281
|
e.importDialogVisible = !0;
|
|
246
282
|
} }, scopedSlots: e._u([{ key: "default", fn: function() {
|
|
247
|
-
return [e._t("toolbar-button")];
|
|
283
|
+
return [e._t("toolbar-button", null, { selectedRows: e.selectedRows })];
|
|
284
|
+
}, proxy: !0 }, { key: "toolbar-left", fn: function() {
|
|
285
|
+
return [e._t("toolbar-left", null, { selectedRows: e.selectedRows })];
|
|
286
|
+
}, proxy: !0 }, { key: "toolbar-right", fn: function() {
|
|
287
|
+
return [e._t("toolbar-right", null, { del: e.del, create: e.create, reload: e.reloadTableAndTree, selectedRows: e.selectedRows })];
|
|
288
|
+
}, proxy: !0 }, { key: "toolbar-right-button", fn: function() {
|
|
289
|
+
return [e._t("toolbar-right-button")];
|
|
248
290
|
}, proxy: !0 }, e._l(e.buttonSlots, function(s) {
|
|
249
291
|
return { key: s, fn: function() {
|
|
250
|
-
return [e._t(s)];
|
|
292
|
+
return [e._t(s, null, { selectedRows: e.selectedRows })];
|
|
251
293
|
}, proxy: !0 };
|
|
252
|
-
})], null, !0) }, "Toolbar", e.toolbarProps, !1), e.
|
|
294
|
+
})], null, !0) }, "Toolbar", e.toolbarProps, !1), e.toolbarEventHandlers)) : e._e(), r("div", { staticClass: "table-view-content-wrapper" }, [r("div", { staticClass: "table-view-content" }, [e.treeProps.show ? r("div", { ref: "treeScroller", staticClass: "table-view-sidebar", on: { scroll: e.onTreeScroll } }, [r("EditableTree", e._g(e._b({ ref: "tree", attrs: { readonly: "" }, scopedSlots: e._u([{ key: "default", fn: function({ node: s, data: l }) {
|
|
253
295
|
return [e._t("tree-node", function() {
|
|
254
|
-
return [
|
|
296
|
+
return [r("span", [r("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() {
|
|
255
297
|
return [e._v(e._s(s.label))];
|
|
256
298
|
}, { node: s, data: l })], 2)];
|
|
257
299
|
}, { node: s, data: l })];
|
|
258
|
-
} }], null, !0) }, "EditableTree", e.treeProps, !1), e.treeListeners))], 1) : e._e(),
|
|
300
|
+
} }], null, !0) }, "EditableTree", e.treeProps, !1), e.toHyphenateKey(e.treeListeners)))], 1) : e._e(), r("div", { staticClass: "table-view-table" }, [r("PageableTable", e._g(e._b({ ref: "table", class: [
|
|
259
301
|
{
|
|
260
302
|
"border-top": e.borderTop,
|
|
261
303
|
"border-bottom": e.borderBottom,
|
|
262
304
|
"border-left": e.borderLeft || e.treeAttrs && e.treeAttrs.show,
|
|
263
305
|
"border-right": e.borderRight
|
|
264
306
|
}
|
|
265
|
-
], attrs: { border: e.border }, on: { "row-dblclick": e.rowDbClick, "selection-change": e.onSelectionChange }
|
|
307
|
+
], attrs: { border: e.border }, on: { "row-dblclick": e.rowDbClick, "selection-change": e.onSelectionChange }, scopedSlots: e._u([e._l(e.tableScopeSlotNames, function(s) {
|
|
308
|
+
return { key: s, fn: function({ row: l }) {
|
|
309
|
+
return [e._t(s, null, { row: l })];
|
|
310
|
+
} };
|
|
311
|
+
})], null, !0) }, "PageableTable", e.tableProps, !1), e.toHyphenateKey(e.tableListeners)), [e._t("columns")], 2)], 1)]), e.searchFormPosition === "right" ? [r("Transition", { attrs: { name: "slide" } }, [e.toolbarProps.searchable ? r("div", { directives: [{ name: "show", rawName: "v-show", value: e.isSearchVisible, expression: "isSearchVisible" }], staticClass: "slide-panel", style: { width: `${e.searchPanelProps.width}px` } }, [r("div", { staticClass: "slide-panel-content" }, [r("ElForm", { ref: "form", attrs: { "label-position": "right", model: e.searchModel || e.searchPanelProps.model, size: "mini", "label-width": e.labelWidth }, nativeOn: { "!submit": function(s) {
|
|
266
312
|
return s.preventDefault(), e.onSearchClick.apply(null, arguments);
|
|
267
|
-
} } }, [
|
|
268
|
-
return [
|
|
269
|
-
})], 2)], 1),
|
|
270
|
-
},
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
y,
|
|
275
|
-
S,
|
|
276
|
-
T,
|
|
313
|
+
} } }, [r("FormItemConfigProvider", { attrs: { block: "", "wrap-col": !1 } }, [r("ElRow", { attrs: { gutter: 0 } }, [e._t("search-form", function() {
|
|
314
|
+
return [r("p", [e._v("请添加搜索条件!")])];
|
|
315
|
+
})], 2)], 1), r("ElFormItem", { attrs: { "label-width": "0" } }, [r("div", { staticClass: "slide-panel-actions" }, [r("ElButton", { attrs: { type: "primary", "native-type": "submit", size: "mini" } }, [e._v("开始搜索")]), r("ElButton", { attrs: { size: "mini" }, on: { click: e.onClearClick } }, [e._v("清除条件")])], 1)])], 1)], 1)]) : e._e()])] : e._e()], 2), e._t("default")], 2)]);
|
|
316
|
+
}, $ = [], k = /* @__PURE__ */ S(
|
|
317
|
+
P,
|
|
318
|
+
C,
|
|
319
|
+
$,
|
|
277
320
|
!1,
|
|
278
321
|
null,
|
|
279
322
|
null
|
|
280
323
|
);
|
|
281
|
-
const
|
|
324
|
+
const E = k.exports;
|
|
282
325
|
export {
|
|
283
|
-
|
|
326
|
+
E as default
|
|
284
327
|
};
|
package/table-view/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.table-view{flex-direction:column;height:100%;display:flex}.table-view .
|
|
1
|
+
.table-view{flex-direction:column;height:100%;padding:10px;display:flex}.table-view.has-tree .table-view-wrapper .pageable-table-wrapper,.table-view.embed{padding:0}.table-view.embed .toolbar{border:1px solid #ebeef5;border-bottom:none}.table-view.embed .table-view-wrapper{box-shadow:none;border-radius:0}.table-view.embed .table-view-wrapper .pageable-table-wrapper{padding:0}.table-view .toolbar{border-bottom:none;height:46px;line-height:46px}.table-view .table-view-wrapper{border-radius:4px;flex-direction:column;height:100%;display:flex;overflow:hidden;box-shadow:0 2px 12px #0000001a}.table-view .table-view-wrapper .pageable-table-wrapper{padding-left:10px;padding-right:10px}.table-view .table-view-wrapper .el-pagination{color:#303133;white-space:nowrap;text-align:left;padding:6px 10px;font-weight:700}.table-view .border-top .el-table--border{border-top:1px solid #ebeef5}.table-view .border-bottom .el-table--border{border-bottom:1px solid #ebeef5}.table-view .border-left .el-table--border,.table-view .border-left .el-pagination{border-left:1px solid #ebeef5}.table-view .border-right .el-table--border{border-right:1px solid #ebeef5}.table-view .node-icon{margin-right:4px}.table-view .table-view-content-wrapper{flex:1;position:relative;overflow:hidden}.table-view .table-view-content{background-color:#fff;width:100%;height:100%;display:flex;position:absolute;top:0;left:0}.table-view .table-view-sidebar{background-color:#fafafa;border-top:1px solid #ebeef5;flex-shrink:0;width:240px;height:100%;padding:4px 10px 10px 4px;overflow:auto}.table-view .table-view-sidebar .et-tree-wrapper{display:table;overflow:visible}.table-view .table-view-sidebar .et-tree-wrapper .el-tree{background-color:#0000}.table-view .table-view-table{flex:auto;height:100%}.table-view .search-form-top{background-color:#fff;padding:10px 10px 0}.table-view .search-form-top .el-form-item__content{align-items:center;display:flex}.table-view .search-actions{float:right}.table-view .search-actions .el-form-item__content{text-align:right;justify-content:right}.table-view .slide-panel{z-index:5;background-color:#fff;display:flex;position:absolute;top:0;bottom:0;right:0;box-shadow:0 0 10px 5px #0000001a}.table-view .slide-panel .slide-panel-line{background-color:#ddd;flex-shrink:0;width:3px;height:100%;position:relative}.table-view .slide-panel .slide-panel-line-indicator{background-color:#aaa;width:100%;height:50px;position:absolute;top:50%;left:0;transform:translateY(-50%)}.table-view .slide-panel .slide-panel-actions{justify-content:center;align-items:center;margin-top:10px;display:flex}.table-view .slide-panel .slide-panel-content{flex:1;padding:10px;overflow:auto}.table-view .slide-panel .slide-panel-content .el-date-editor{width:100%}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { toStringArray as a } from "@web-utils/core";
|
|
2
|
+
import { merge as n } from "@web-utils/integrations/lodash";
|
|
3
|
+
import { g as l } from "../chunks/configComponents.BDhlZU8F.mjs";
|
|
4
|
+
import { n as i } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
5
|
+
const u = [
|
|
6
|
+
"back",
|
|
7
|
+
"create",
|
|
8
|
+
"save",
|
|
9
|
+
"withdraw",
|
|
10
|
+
"edit",
|
|
11
|
+
"submit",
|
|
12
|
+
"publish",
|
|
13
|
+
"agree",
|
|
14
|
+
"disagree",
|
|
15
|
+
"reject",
|
|
16
|
+
"finish",
|
|
17
|
+
"cancel",
|
|
18
|
+
"enable",
|
|
19
|
+
"exp",
|
|
20
|
+
"imp",
|
|
21
|
+
"del",
|
|
22
|
+
"disabled",
|
|
23
|
+
"reload",
|
|
24
|
+
"slot"
|
|
25
|
+
], b = {
|
|
26
|
+
name: "TabsView",
|
|
27
|
+
props: {
|
|
28
|
+
toolbarAttrs: {
|
|
29
|
+
type: Object,
|
|
30
|
+
default: () => {
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
toolbarListeners: Object,
|
|
34
|
+
embed: Boolean,
|
|
35
|
+
leftSide: Boolean,
|
|
36
|
+
tabs: {
|
|
37
|
+
type: Array,
|
|
38
|
+
default: () => []
|
|
39
|
+
},
|
|
40
|
+
defaultTab: String
|
|
41
|
+
},
|
|
42
|
+
data() {
|
|
43
|
+
return {
|
|
44
|
+
tab: null
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
computed: {
|
|
48
|
+
buttonSlots() {
|
|
49
|
+
return u.filter((r) => this.$scopedSlots[r]);
|
|
50
|
+
},
|
|
51
|
+
toolbarProps() {
|
|
52
|
+
var o, s;
|
|
53
|
+
const r = {}, t = n({}, this.toolbarAttrs, r);
|
|
54
|
+
let e = (t == null ? void 0 : t.buttons) || this.$parent.buttons;
|
|
55
|
+
return e = e || [], t.buttons = e, t.buttons = l.privilege.processButtons(t.buttons), t.buttons = a(t.buttons), t.searchable = !!((s = (o = this.$scopedSlots)["search-form"]) != null && s.call(o)), t;
|
|
56
|
+
},
|
|
57
|
+
toolbarEventHandlers() {
|
|
58
|
+
if (this.toolbarListeners) {
|
|
59
|
+
const { exp: r, ...t } = this.toolbarListeners;
|
|
60
|
+
return t;
|
|
61
|
+
}
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
watch: {
|
|
66
|
+
tabs: {
|
|
67
|
+
immediate: !0,
|
|
68
|
+
handler(r) {
|
|
69
|
+
!this.defaultTab && (r == null ? void 0 : r.length) > 0 ? this.tab = r[0].value : this.tab = this.defaultTab;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
var c = function() {
|
|
75
|
+
var t = this, e = t._self._c;
|
|
76
|
+
return e("div", { class: ["tabs-view", { embed: t.embed }] }, [e("div", { staticClass: "tabs-view-wrapper" }, [e("Toolbar", t._g(t._b({ staticStyle: { "border-bottom": "1px solid #eee" }, scopedSlots: t._u([{ key: "default", fn: function() {
|
|
77
|
+
return [t._t("toolbar-button")];
|
|
78
|
+
}, proxy: !0 }, { key: "toolbar-left", fn: function() {
|
|
79
|
+
return [t._t("toolbar-left", function() {
|
|
80
|
+
return t._l(t.tabs, function(o) {
|
|
81
|
+
return e("ElTag", { key: o.value, staticStyle: { "margin-right": "14px", cursor: "pointer" }, attrs: { effect: o.value === t.tab ? "dark" : null, type: "primary" }, on: { click: function(s) {
|
|
82
|
+
t.tab = o.value;
|
|
83
|
+
} } }, [t._v(" " + t._s(o.label) + " ")]);
|
|
84
|
+
});
|
|
85
|
+
}), t._t("toolbar-left-append")];
|
|
86
|
+
}, proxy: !0 }, { key: "toolbar-right", fn: function() {
|
|
87
|
+
return [t._t("toolbar-right")];
|
|
88
|
+
}, proxy: !0 }, t._l(t.buttonSlots, function(o) {
|
|
89
|
+
return { key: o, fn: function() {
|
|
90
|
+
return [t._t(o)];
|
|
91
|
+
}, proxy: !0 };
|
|
92
|
+
})], null, !0) }, "Toolbar", t.toolbarProps, !1), t.toolbarEventHandlers)), e("div", { staticClass: "tabs-view-content-wrapper" }, [e("div", { staticClass: "tabs-view-content" }, [t.leftSide ? e("div", { ref: "treeScroller", staticClass: "tabs-view-sidebar" }, [t._t("left")], 2) : t._e(), e("div", { staticClass: "tabs-view-right" }, [t._t("default", null, { tab: t.tab })], 2)])])], 1)]);
|
|
93
|
+
}, f = [], d = /* @__PURE__ */ i(
|
|
94
|
+
b,
|
|
95
|
+
c,
|
|
96
|
+
f,
|
|
97
|
+
!1,
|
|
98
|
+
null,
|
|
99
|
+
null
|
|
100
|
+
);
|
|
101
|
+
const m = d.exports;
|
|
102
|
+
export {
|
|
103
|
+
m as default
|
|
104
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.tabs-view{flex-direction:column;height:100%;padding:10px;display:flex}.tabs-view.embed{padding:0}.tabs-view.embed .toolbar{border:1px solid #ebeef5;border-bottom:none}.tabs-view.embed .tabs-view-wrapper{box-shadow:none;border-radius:0}.tabs-view .toolbar{border-bottom:none;height:46px;line-height:46px}.tabs-view .tabs-view-wrapper{border-radius:4px;flex-direction:column;height:100%;display:flex;overflow:hidden;box-shadow:0 2px 12px #0000001a}.tabs-view .tabs-view-content-wrapper{flex:1;position:relative;overflow:hidden}.tabs-view .tabs-view-content{background-color:#fff;width:100%;height:100%;display:flex;position:absolute;top:0;left:0}.tabs-view .tabs-view-sidebar{background-color:#fafafa;border-top:1px solid #ebeef5;flex-shrink:0;width:240px;height:100%;padding:4px 10px 10px 4px;overflow:auto}.tabs-view .tabs-view-right{flex:auto;height:100%}
|
package/tag-render/index.mjs
CHANGED
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var l = (t, e, a) => e in t ? c(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a, i = (t, e) => {
|
|
5
|
-
for (var a in e || (e = {}))
|
|
6
|
-
u.call(e, a) && l(t, a, e[a]);
|
|
7
|
-
if (r)
|
|
8
|
-
for (var a of r(e))
|
|
9
|
-
m.call(e, a) && l(t, a, e[a]);
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { hasOwn as o } from "@web-utils/core";
|
|
13
|
-
import { n as g } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
14
|
-
const f = {
|
|
1
|
+
import { hasOwn as r } from "@web-utils/core";
|
|
2
|
+
import { n as l } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
3
|
+
const i = {
|
|
15
4
|
name: "TagRender",
|
|
16
5
|
inject: {
|
|
17
6
|
elFormItem: {
|
|
@@ -39,7 +28,7 @@ const f = {
|
|
|
39
28
|
computed: {
|
|
40
29
|
internalTags() {
|
|
41
30
|
return this.transfer ? this.tags.map((t) => {
|
|
42
|
-
const e =
|
|
31
|
+
const e = { ...t };
|
|
43
32
|
return this.transfer(e);
|
|
44
33
|
}) : this.tags;
|
|
45
34
|
}
|
|
@@ -52,28 +41,28 @@ const f = {
|
|
|
52
41
|
},
|
|
53
42
|
methods: {
|
|
54
43
|
getTagName(t) {
|
|
55
|
-
return
|
|
44
|
+
return r(t, "name") ? t.name : r(t, "label") ? t.label : t;
|
|
56
45
|
}
|
|
57
46
|
}
|
|
58
47
|
};
|
|
59
|
-
var
|
|
48
|
+
var o = function() {
|
|
60
49
|
var e = this, a = e._self._c;
|
|
61
50
|
return a("div", { staticClass: "tag-render" }, [e.tags && e.tags.length && e.tags[0] ? e._l(e.internalTags, function(s, n) {
|
|
62
|
-
return a("ElTag", { key: n, attrs: { closable: e.enable, size: "medium", "disable-transitions": "" }, on: { close: function(
|
|
51
|
+
return a("ElTag", { key: n, attrs: { closable: e.enable, size: "medium", "disable-transitions": "" }, on: { close: function(m) {
|
|
63
52
|
return e.$emit("close", e.tags[n], n);
|
|
64
53
|
} } }, [e._v(" " + e._s(e.getTagName(s)) + " ")]);
|
|
65
54
|
}) : e.enable ? e._e() : [a("span", { staticStyle: { "margin-left": "4px", color: "#b5b5b5", "line-height": "16px" } }, [e._v("无")])], e.enable ? a("ElButton", { staticClass: "add-tag", attrs: { size: "mini" }, on: { click: function(s) {
|
|
66
55
|
return e.$emit("add");
|
|
67
56
|
} } }, [e._v("+ 添加")]) : e._e(), e.count ? a("span", { staticClass: "tags-count" }, [e._v(e._s(e.tags.length && e.tags[0] ? e.tags.length : ""))]) : e._e()], 2);
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
57
|
+
}, c = [], u = /* @__PURE__ */ l(
|
|
58
|
+
i,
|
|
59
|
+
o,
|
|
60
|
+
c,
|
|
72
61
|
!1,
|
|
73
62
|
null,
|
|
74
63
|
null
|
|
75
64
|
);
|
|
76
|
-
const
|
|
65
|
+
const _ = u.exports;
|
|
77
66
|
export {
|
|
78
|
-
|
|
67
|
+
_ as default
|
|
79
68
|
};
|
package/text-ellipsis/index.mjs
CHANGED