@web-utils/form-ui 1.0.0-beta86 → 1.0.0-beta88
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/affix/index.mjs +1 -1
- package/chunks/{4kjeIiag2.mjs → 5RCAxanu2.mjs} +3 -3
- package/chunks/{vebd58-O.mjs → 9ec0Wti82.mjs} +1 -1
- package/chunks/{BxcsELcB2.mjs → B7BaAm4k2.mjs} +2 -2
- package/chunks/{DSTNXl142.mjs → BFhVUqpP2.mjs} +2 -2
- package/chunks/BLKcXIrX.mjs +517 -0
- package/chunks/{C8h_P_kl2.mjs → BSOrm2U4.mjs} +2 -2
- package/chunks/BbUUI4mF.mjs +204 -0
- package/chunks/{D_q3C3v4.mjs → BegZOXrr.mjs} +4 -4
- package/chunks/{BIy6bO4j.mjs → Bg01eBVa2.mjs} +2 -2
- package/chunks/{DJlgX5ty.mjs → BhPVs8Ju.mjs} +1 -1
- package/chunks/{DrvwVjzq2.mjs → BmbhIxPF2.mjs} +2 -2
- package/chunks/{BYu4QaK72.mjs → Br3whXEJ2.mjs} +2 -2
- package/chunks/{y1Q66LEa2.mjs → BuI82QMb2.mjs} +1 -1
- package/chunks/{CCpKg0cM.mjs → Bv7b2DXh2.mjs} +2 -2
- package/chunks/{ofu8wJKp.mjs → C-s-88fN2.mjs} +1 -1
- package/chunks/{CET31mBi.mjs → C54nZqvy2.mjs} +1 -1
- package/chunks/CBHGpbDK.mjs +56 -0
- package/chunks/CFpGTE5U2.mjs +221 -0
- package/chunks/CIihGrgY.mjs +30 -0
- package/chunks/{XQwnPkab2.mjs → CW021IPm2.mjs} +1 -1
- package/chunks/{CLn5E7NV.mjs → CW1nopZH.mjs} +1 -1
- package/chunks/CY2YrwMT.mjs +302 -0
- package/chunks/{DVF9q3oX.mjs → CdvD0NRo2.mjs} +2 -2
- package/chunks/Cf_h9S62.mjs +378 -0
- package/chunks/{8h-xBLL82.mjs → CixNVW_T2.mjs} +10 -10
- package/chunks/{By-W0XXn2.mjs → ClkLQjZ82.mjs} +1 -1
- package/chunks/CsNZt53l.mjs +4074 -0
- package/chunks/{HFLY8Wla.mjs → D1mQTnJ8.mjs} +181 -185
- package/chunks/{CjCNtCWd.mjs → D20CQ-B6.mjs} +1 -1
- package/chunks/{BxuM-fgJ.mjs → D2kLAzxW.mjs} +1 -1
- package/chunks/{tfaGdZX2.mjs → D8_fl5Oq.mjs} +4 -4
- package/chunks/{C28bnMcw.mjs → DC3DNg_r.mjs} +1 -1
- package/chunks/{DWN5uzm02.mjs → DL4xcGES2.mjs} +10 -10
- package/chunks/{SWO35fS42.mjs → Dd4RtBO02.mjs} +1 -1
- package/chunks/{3nLaRSbR2.mjs → DdHN2Nv72.mjs} +1 -1
- package/chunks/{BrSqLOi5.mjs → DmJaItEY.mjs} +6 -6
- package/chunks/{CkHQY4ME2.mjs → Dnapnskp2.mjs} +1 -1
- package/chunks/{vHsAJZRT.mjs → MUk_IdeO2.mjs} +2 -2
- package/chunks/NAZ8HFBg.mjs +340 -0
- package/chunks/{saZ_qJOT.mjs → aOv3rI7q.mjs} +1 -1
- package/chunks/{mqi8hesW2.mjs → dxZzZgUn.mjs} +2 -2
- package/chunks/{Tq3_dajC2.mjs → m5oFTe8Y2.mjs} +1 -1
- package/chunks/{Dst9_BmZ.mjs → n7IipIUY.mjs} +3 -3
- package/chunks/{SInS7QSL.mjs → vCOhFr2x.mjs} +1 -1
- package/constants/index.d.ts +2 -0
- package/constants/index.mjs +2 -2
- package/data-table-picker/index.mjs +1 -1
- package/dialog-form/index.d.ts +4 -0
- package/dialog-form/index.mjs +154 -0
- package/dialog-form/style.css +1 -0
- package/empty-view/index.d.ts +2 -2
- package/flex-box/index.mjs +1 -1
- package/flex-column/index.mjs +1 -1
- package/flex-item/index.mjs +1 -1
- package/flex-row/index.mjs +1 -1
- package/flow-designer/index.mjs +1 -1
- package/form-cascader/index.mjs +1 -1
- package/form-checkbox/index.mjs +1 -1
- package/form-checkbox-group/index.mjs +1 -1
- package/form-date-picker/index.d.ts +4 -4
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.mjs +1 -1
- package/form-image/index.mjs +1 -1
- package/form-input/index.mjs +1 -1
- package/form-input-cron-expression/index.mjs +1 -1
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.mjs +1 -1
- package/form-input-tag/index.mjs +1 -1
- package/form-input-time/index.mjs +1 -1
- package/form-item/index.mjs +1 -1
- package/form-item-group/index.mjs +1 -1
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.mjs +1 -1
- package/form-row/index.mjs +1 -1
- package/form-select/index.mjs +1 -1
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.mjs +1 -1
- package/form-table/index.mjs +1 -1
- package/form-table-plus/index.mjs +1 -1
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.mjs +1 -1
- package/form-time-select/index.mjs +1 -1
- package/form-tree-select/index.mjs +1 -1
- package/form-tree-select-multiple/index.mjs +1 -1
- package/form-view/index.mjs +2 -2
- package/fy-array/index.d.ts +234 -0
- package/fy-array/index.mjs +130 -0
- package/fy-array/style.css +1 -0
- package/fy-button/index.d.ts +18 -0
- package/fy-button/index.mjs +2 -0
- package/fy-button/style.css +1 -0
- package/fy-cascader/index.d.ts +298 -0
- package/fy-cascader/index.mjs +116 -0
- package/fy-checkbox/index.d.ts +231 -0
- package/fy-checkbox/index.mjs +100 -0
- package/fy-checkbox/style.css +1 -0
- package/fy-curd/index.d.ts +908 -0
- package/fy-curd/index.mjs +2 -0
- package/fy-date/index.d.ts +246 -0
- package/fy-date/index.mjs +79 -0
- package/fy-date/style.css +1 -0
- package/fy-dynamic/index.d.ts +268 -0
- package/fy-dynamic/index.mjs +2 -0
- package/fy-empty/index.d.ts +31 -0
- package/fy-empty/index.mjs +35 -0
- package/fy-empty/style.css +1 -0
- package/fy-form/index.d.ts +522 -0
- package/fy-form/index.mjs +2 -0
- package/fy-form/style.css +1 -0
- package/fy-input/index.d.ts +316 -0
- package/fy-input/index.mjs +122 -0
- package/fy-input-color/index.d.ts +235 -0
- package/fy-input-color/index.mjs +80 -0
- package/fy-input-icon/index.d.ts +244 -0
- package/fy-input-icon/index.mjs +133 -0
- package/fy-input-icon/style.css +1 -0
- package/fy-input-map/index.d.ts +266 -0
- package/fy-input-map/index.mjs +248 -0
- package/fy-input-map/style.css +1 -0
- package/fy-input-number/index.d.ts +266 -0
- package/fy-input-number/index.mjs +78 -0
- package/fy-input-table/index.d.ts +248 -0
- package/fy-input-table/index.mjs +166 -0
- package/fy-input-table/style.css +1 -0
- package/fy-input-tree/index.d.ts +351 -0
- package/fy-input-tree/index.mjs +266 -0
- package/fy-input-tree/style.css +1 -0
- package/fy-radio/index.d.ts +218 -0
- package/fy-radio/index.mjs +56 -0
- package/fy-radio/style.css +1 -0
- package/fy-rate/index.d.ts +288 -0
- package/fy-rate/index.mjs +90 -0
- package/fy-rate/style.css +1 -0
- package/fy-select/index.d.ts +324 -0
- package/fy-select/index.mjs +2 -0
- package/fy-select/style.css +1 -0
- package/fy-slider/index.d.ts +249 -0
- package/fy-slider/index.mjs +72 -0
- package/fy-switch/index.d.ts +229 -0
- package/fy-switch/index.mjs +71 -0
- package/fy-tabs/index.d.ts +20 -0
- package/fy-tabs/index.mjs +50 -0
- package/fy-time/index.d.ts +704 -0
- package/fy-time/index.mjs +85 -0
- package/fy-title/index.d.ts +224 -0
- package/fy-title/index.mjs +18 -0
- package/fy-title/style.css +1 -0
- package/fy-tree/index.d.ts +141 -0
- package/fy-tree/index.mjs +390 -0
- package/fy-tree/style.css +1 -0
- package/fy-u-editor/index.d.ts +116 -0
- package/fy-u-editor/index.mjs +2 -0
- package/fy-u-editor/style.css +1 -0
- package/fy-upload/index.d.ts +379 -0
- package/fy-upload/index.mjs +2 -0
- package/fy-upload/style.css +1 -0
- package/helper/avue.d.ts +36 -0
- package/helper/avue.mjs +35 -0
- package/helper/input.mjs +1 -1
- package/icon-temp/index.d.ts +19 -0
- package/icon-temp/index.mjs +27 -0
- package/icon-temp/style.css +1 -0
- package/image-viewer/index.d.ts +1 -1
- package/index.css +1 -1
- package/index.d.ts +31 -1
- package/index.mjs +118 -90
- package/keyboard/index.mjs +1 -1
- package/monaco-editor/index.d.ts +126 -0
- package/monaco-editor/index.mjs +2 -0
- package/monaco-editor/style.css +1 -0
- package/package.json +3 -1
- package/pageable-table/index.d.ts +1 -1
- package/pageable-table/index.mjs +1 -1
- package/photo-swipe/index.mjs +1 -1
- package/resolver/components.mjs +1 -1
- package/split-pane/index.mjs +1 -1
- package/sub-table/index.mjs +1 -1
- package/sub-table-plus/index.mjs +1 -1
- package/table-column-def/index.d.ts +6 -6
- package/table-view/index.mjs +4 -4
- package/tag-render/index.d.ts +1 -1
- package/toolbar/index.mjs +1 -1
- package/vue-cron/index.mjs +1 -1
- package/vue-tags-input/index.d.ts +1 -1
- package/vue-tree-select/index.mjs +1 -1
- package/watermark/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +1 -1
- package/chunks/{DCqyZyF6.mjs → BCYFaOiB.mjs} +0 -0
- package/chunks/{B1luuf_A2.mjs → BJDeTpmp2.mjs} +0 -0
- package/chunks/{BhHMGhJ8.mjs → BcsscZAM.mjs} +0 -0
- package/chunks/{DbcxJ45j.mjs → BfW25VbY.mjs} +1 -1
- package/chunks/{6dNVtIN32.mjs → BjccroM8.mjs} +0 -0
- package/chunks/{BTGrh7dw2.mjs → Br0vC3nS2.mjs} +0 -0
- package/chunks/{BM5LdxU72.mjs → CB0zQsKV2.mjs} +0 -0
- package/chunks/{Bs926z902.mjs → CHqxWrj7.mjs} +1 -1
- package/chunks/{B5c0s3IR.mjs → CJwAjhLy.mjs} +1 -1
- package/chunks/{BAG_R87k2.mjs → CZnwC17w.mjs} +0 -0
- package/chunks/{tVHVSu5h.mjs → CbedyG4s.mjs} +4 -4
- package/chunks/{BwL9Xz1F.mjs → Cp1olyWc.mjs} +0 -0
- package/chunks/{KOJEsarR2.mjs → CpmWELPU.mjs} +0 -0
- package/chunks/{C-zPVdz-.mjs → D9ft-f6n.mjs} +1 -1
- package/chunks/{PEU1JRcN2.mjs → DEHzWyyp.mjs} +0 -0
- package/chunks/{CHmZyvFr.mjs → DJe2Reym.mjs} +0 -0
- package/chunks/{CpsHWpwH2.mjs → DNq7pbXh2.mjs} +0 -0
- package/chunks/{X-ckP2Hj.mjs → DOLQ28wD.mjs} +0 -0
- package/chunks/{tqW2DSco.mjs → fT8tFJVO.mjs} +1 -1
- /package/chunks/{Dkw6LNCq2.mjs → jG7vu3RX.mjs} +0 -0
- /package/chunks/{b0ve2YgF.mjs → mQG01w6Y.mjs} +0 -0
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
import { t as e } from "../chunks/B1MSrc6f.mjs";
|
|
2
|
+
import { t } from "../chunks/V-Js6hNd.mjs";
|
|
3
|
+
import { t as n } from "../chunks/CIihGrgY.mjs";
|
|
4
|
+
import { i as r, t as i } from "../chunks/CsNZt53l.mjs";
|
|
5
|
+
import { C as a, g as o, m as s } from "../chunks/BbUUI4mF.mjs";
|
|
6
|
+
import { ElInput as c, ElLoadingDirective as l, ElScrollbar as u, ElTree as d } from "element-plus/es";
|
|
7
|
+
import "element-plus/es/components/base/style/css";
|
|
8
|
+
import "element-plus/es/components/input/style/css";
|
|
9
|
+
import { createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, normalizeStyle as v, openBlock as y, renderSlot as b, resolveDirective as x, toDisplayString as S, withCtx as C, withDirectives as w } from "vue";
|
|
10
|
+
import { isBlank as T } from "@web-utils/core";
|
|
11
|
+
import "element-plus/es/components/loading/style/css";
|
|
12
|
+
import "element-plus/es/components/tree/style/css";
|
|
13
|
+
import "element-plus/es/components/scrollbar/style/css";
|
|
14
|
+
//#region src/components/avue/tree/FyTree.vue
|
|
15
|
+
var E = {
|
|
16
|
+
name: "FyTree",
|
|
17
|
+
directives: { permission: r },
|
|
18
|
+
props: {
|
|
19
|
+
indent: Number,
|
|
20
|
+
filterNodeMethod: Function,
|
|
21
|
+
checkOnClickNode: Boolean,
|
|
22
|
+
beforeClose: Function,
|
|
23
|
+
beforeOpen: Function,
|
|
24
|
+
permission: {
|
|
25
|
+
type: [Function, Object],
|
|
26
|
+
default: () => ({})
|
|
27
|
+
},
|
|
28
|
+
iconClass: { type: String },
|
|
29
|
+
loading: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !1
|
|
32
|
+
},
|
|
33
|
+
expandOnClickNode: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !1
|
|
36
|
+
},
|
|
37
|
+
option: {
|
|
38
|
+
type: Object,
|
|
39
|
+
default: () => ({})
|
|
40
|
+
},
|
|
41
|
+
data: {
|
|
42
|
+
type: Array,
|
|
43
|
+
default: () => []
|
|
44
|
+
},
|
|
45
|
+
modelValue: {
|
|
46
|
+
type: Object,
|
|
47
|
+
default: () => ({})
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
emits: [
|
|
51
|
+
"node-click",
|
|
52
|
+
"del",
|
|
53
|
+
"update",
|
|
54
|
+
"check-change",
|
|
55
|
+
"change",
|
|
56
|
+
"update:modelValue"
|
|
57
|
+
],
|
|
58
|
+
data() {
|
|
59
|
+
return {
|
|
60
|
+
filterValue: "",
|
|
61
|
+
client: {
|
|
62
|
+
x: 0,
|
|
63
|
+
y: 0,
|
|
64
|
+
show: !1
|
|
65
|
+
},
|
|
66
|
+
box: !1,
|
|
67
|
+
type: "",
|
|
68
|
+
node: {},
|
|
69
|
+
form: {}
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
computed: {
|
|
73
|
+
styleName() {
|
|
74
|
+
return {
|
|
75
|
+
top: o(this.client.y - 10),
|
|
76
|
+
left: o(this.client.x - 10)
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
treeProps() {
|
|
80
|
+
return Object.assign(this.props, { isLeaf: this.leafKey });
|
|
81
|
+
},
|
|
82
|
+
menu() {
|
|
83
|
+
return s(this.option.menu, !0);
|
|
84
|
+
},
|
|
85
|
+
title() {
|
|
86
|
+
return this.option.title || "添加";
|
|
87
|
+
},
|
|
88
|
+
treeLoad() {
|
|
89
|
+
return this.option.treeLoad;
|
|
90
|
+
},
|
|
91
|
+
checkStrictly() {
|
|
92
|
+
return this.option.checkStrictly;
|
|
93
|
+
},
|
|
94
|
+
accordion() {
|
|
95
|
+
return this.option.accordion;
|
|
96
|
+
},
|
|
97
|
+
multiple() {
|
|
98
|
+
return this.option.multiple;
|
|
99
|
+
},
|
|
100
|
+
lazy() {
|
|
101
|
+
return this.option.lazy;
|
|
102
|
+
},
|
|
103
|
+
addText() {
|
|
104
|
+
return this.addFlag ? this.menuIcon("addBtn") : this.menuIcon("updateBtn");
|
|
105
|
+
},
|
|
106
|
+
addFlag() {
|
|
107
|
+
return ["add", "parentAdd"].includes(this.type);
|
|
108
|
+
},
|
|
109
|
+
size() {
|
|
110
|
+
return this.option.size || "small";
|
|
111
|
+
},
|
|
112
|
+
props() {
|
|
113
|
+
return this.option.props || {};
|
|
114
|
+
},
|
|
115
|
+
leafKey() {
|
|
116
|
+
return this.props.leaf || a.leaf;
|
|
117
|
+
},
|
|
118
|
+
valueKey() {
|
|
119
|
+
return this.props.value || a.value;
|
|
120
|
+
},
|
|
121
|
+
labelKey() {
|
|
122
|
+
return this.props.label || a.label;
|
|
123
|
+
},
|
|
124
|
+
childrenKey() {
|
|
125
|
+
return this.props.children || a.children;
|
|
126
|
+
},
|
|
127
|
+
nodeKey() {
|
|
128
|
+
return this.option.nodeKey || a.nodeKey;
|
|
129
|
+
},
|
|
130
|
+
defaultExpandAll() {
|
|
131
|
+
return this.option.defaultExpandAll;
|
|
132
|
+
},
|
|
133
|
+
defaultExpandedKeys() {
|
|
134
|
+
return this.option.defaultExpandedKeys;
|
|
135
|
+
},
|
|
136
|
+
formOption() {
|
|
137
|
+
return Object.assign(this.option.formOption || {}, { submitText: this.addText });
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
watch: {
|
|
141
|
+
filterValue(e) {
|
|
142
|
+
this.$refs.tree.filter(e);
|
|
143
|
+
},
|
|
144
|
+
modelValue(e) {
|
|
145
|
+
this.form = e;
|
|
146
|
+
},
|
|
147
|
+
form(e) {
|
|
148
|
+
this.$emit("update:modelValue", e), this.$emit("change", e);
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
mounted() {
|
|
152
|
+
document.addEventListener("click", this.hideClient), this.initFun();
|
|
153
|
+
},
|
|
154
|
+
beforeUnmount() {
|
|
155
|
+
document.removeEventListener("click", this.hideClient);
|
|
156
|
+
},
|
|
157
|
+
methods: {
|
|
158
|
+
optVal: s,
|
|
159
|
+
hideClient(e) {
|
|
160
|
+
this.$el.contains(e.target) || (this.client.show = !1);
|
|
161
|
+
},
|
|
162
|
+
menuIcon(e) {
|
|
163
|
+
return s(this.option[`${e}Text`], e);
|
|
164
|
+
},
|
|
165
|
+
getPermission(e) {
|
|
166
|
+
return typeof this.permission == "function" ? this.permission(e, this.node.data || {}) : T(this.permission[e]) ? !0 : this.permission[e];
|
|
167
|
+
},
|
|
168
|
+
initFun() {
|
|
169
|
+
[
|
|
170
|
+
"filter",
|
|
171
|
+
"updateKeyChildren",
|
|
172
|
+
"getCheckedNodes",
|
|
173
|
+
"setCheckedNodes",
|
|
174
|
+
"getCheckedKeys",
|
|
175
|
+
"setCheckedKeys",
|
|
176
|
+
"setChecked",
|
|
177
|
+
"getHalfCheckedNodes",
|
|
178
|
+
"getHalfCheckedKeys",
|
|
179
|
+
"getCurrentKey",
|
|
180
|
+
"getCurrentNode",
|
|
181
|
+
"setCurrentKey",
|
|
182
|
+
"setCurrentNode",
|
|
183
|
+
"getNode",
|
|
184
|
+
"remove",
|
|
185
|
+
"append",
|
|
186
|
+
"insertBefore",
|
|
187
|
+
"insertAfter"
|
|
188
|
+
].forEach((e) => {
|
|
189
|
+
this[e] = this.$refs.tree[e];
|
|
190
|
+
});
|
|
191
|
+
},
|
|
192
|
+
nodeContextmenu(e, t, n) {
|
|
193
|
+
this.node = n, this.client.x = e.clientX, this.client.y = e.clientY, this.client.show = !0;
|
|
194
|
+
},
|
|
195
|
+
handleCheckChange(e, t, n) {
|
|
196
|
+
this.$emit("check-change", e, t, n);
|
|
197
|
+
},
|
|
198
|
+
handleSubmit(e, t) {
|
|
199
|
+
this.addFlag ? this.save(e, t) : this.update(e, t);
|
|
200
|
+
},
|
|
201
|
+
nodeClick(e, t, n) {
|
|
202
|
+
this.client.show = !1, this.$emit("node-click", e, t, n);
|
|
203
|
+
},
|
|
204
|
+
filterNode(e, t) {
|
|
205
|
+
return typeof this.filterNodeMethod == "function" ? this.filterNodeMethod(e, t) : e ? t[this.labelKey].indexOf(e) !== -1 : !0;
|
|
206
|
+
},
|
|
207
|
+
hide(e) {
|
|
208
|
+
let t = () => {
|
|
209
|
+
e == null || e(), this.node = {}, this.form = {}, this.box = !1;
|
|
210
|
+
};
|
|
211
|
+
typeof this.beforeClose == "function" ? this.beforeClose(t, this.type) : t();
|
|
212
|
+
},
|
|
213
|
+
save(e, t) {
|
|
214
|
+
this.$emit("save", this.node, e, (e) => {
|
|
215
|
+
e = e || this.form, this.type === "add" ? this.$refs.tree.append(e, this.node.data[this.valueKey]) : this.type === "parentAdd" && this.$refs.tree.append(e), this.hide(), t();
|
|
216
|
+
}, t);
|
|
217
|
+
},
|
|
218
|
+
update(e, t) {
|
|
219
|
+
this.$emit("update", this.node, e, (e) => {
|
|
220
|
+
e = e || this.form;
|
|
221
|
+
let n = e[this.valueKey];
|
|
222
|
+
this.node.data = this.form;
|
|
223
|
+
let { parentList: r, index: i } = this.findData(n);
|
|
224
|
+
if (r) {
|
|
225
|
+
let t = r.splice(i, 1)[0];
|
|
226
|
+
e[this.childrenKey] = t[this.childrenKey], r.splice(i, 0, e);
|
|
227
|
+
}
|
|
228
|
+
this.hide(), t();
|
|
229
|
+
}, t);
|
|
230
|
+
},
|
|
231
|
+
rowEdit() {
|
|
232
|
+
this.type = "edit", this.form = this.node.data, this.show();
|
|
233
|
+
},
|
|
234
|
+
parentAdd() {
|
|
235
|
+
this.type = "parentAdd", this.show();
|
|
236
|
+
},
|
|
237
|
+
rowAdd() {
|
|
238
|
+
this.type = "add", this.show();
|
|
239
|
+
},
|
|
240
|
+
show() {
|
|
241
|
+
let e = () => {
|
|
242
|
+
this.client.show = !1, this.box = !0;
|
|
243
|
+
};
|
|
244
|
+
typeof this.beforeOpen == "function" ? this.beforeOpen(e, this.type) : e();
|
|
245
|
+
},
|
|
246
|
+
rowRemove() {
|
|
247
|
+
this.client.show = !1, this.$emit("del", this.node, () => {
|
|
248
|
+
this.$refs.tree.remove(this.node.data[this.valueKey]);
|
|
249
|
+
});
|
|
250
|
+
},
|
|
251
|
+
findData(e) {
|
|
252
|
+
let t = {}, n = (r, i) => {
|
|
253
|
+
r.forEach((a, o) => {
|
|
254
|
+
a[this.valueKey] === e && (t = {
|
|
255
|
+
item: a,
|
|
256
|
+
index: o,
|
|
257
|
+
parentList: r,
|
|
258
|
+
parent: i
|
|
259
|
+
}), a[this.childrenKey] && n(a[this.childrenKey], a);
|
|
260
|
+
});
|
|
261
|
+
};
|
|
262
|
+
return n(this.data), t;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}, D = { class: "avue-tree" }, O = {
|
|
266
|
+
key: 0,
|
|
267
|
+
class: "avue-tree__filter"
|
|
268
|
+
}, k = { key: 1 }, A = { class: "el-tree-node__label" }, j = { key: 2 };
|
|
269
|
+
function M(e, r, a, o, s, T) {
|
|
270
|
+
let E = c, M = n, N = d, P = u, F = i, I = t, L = x("permission"), R = l;
|
|
271
|
+
return y(), m("div", D, [
|
|
272
|
+
T.optVal(a.option.filter, !0) ? (y(), m("div", O, [_(E, {
|
|
273
|
+
modelValue: s.filterValue,
|
|
274
|
+
"onUpdate:modelValue": r[0] || (r[0] = (e) => s.filterValue = e),
|
|
275
|
+
placeholder: T.optVal(a.option.filterText, "输入关键字进行过滤"),
|
|
276
|
+
size: T.size
|
|
277
|
+
}, null, 8, [
|
|
278
|
+
"modelValue",
|
|
279
|
+
"placeholder",
|
|
280
|
+
"size"
|
|
281
|
+
]), T.optVal(a.option.addBtn, !0) ? w((y(), f(M, {
|
|
282
|
+
key: 0,
|
|
283
|
+
size: T.size,
|
|
284
|
+
icon: "el-icon-plus",
|
|
285
|
+
onClick: T.parentAdd
|
|
286
|
+
}, null, 8, ["size", "onClick"])), [[L, T.getPermission("addBtn")]]) : w((y(), m("div", k, [b(e.$slots, "addBtn")])), [[L, T.getPermission("addBtn")]])])) : p("v-if", !0),
|
|
287
|
+
_(P, { class: "avue-tree__content" }, {
|
|
288
|
+
default: C(() => [w((y(), f(N, {
|
|
289
|
+
ref: "tree",
|
|
290
|
+
data: a.data,
|
|
291
|
+
lazy: T.lazy,
|
|
292
|
+
load: T.treeLoad,
|
|
293
|
+
props: T.treeProps,
|
|
294
|
+
"icon-class": a.iconClass,
|
|
295
|
+
indent: a.indent,
|
|
296
|
+
"highlight-current": !T.multiple,
|
|
297
|
+
"show-checkbox": T.multiple,
|
|
298
|
+
accordion: T.accordion,
|
|
299
|
+
"node-key": T.valueKey,
|
|
300
|
+
"check-strictly": T.checkStrictly,
|
|
301
|
+
"check-on-click-node": a.checkOnClickNode,
|
|
302
|
+
"filter-node-method": T.filterNode,
|
|
303
|
+
"expand-on-click-node": a.expandOnClickNode,
|
|
304
|
+
"default-expand-all": T.defaultExpandAll,
|
|
305
|
+
"default-expanded-keys": T.defaultExpandedKeys,
|
|
306
|
+
onCheckChange: T.handleCheckChange,
|
|
307
|
+
onNodeClick: T.nodeClick,
|
|
308
|
+
onNodeContextmenu: T.nodeContextmenu
|
|
309
|
+
}, {
|
|
310
|
+
default: C(({ node: t, data: n }) => [b(e.$slots, "default", {
|
|
311
|
+
node: t,
|
|
312
|
+
data: n
|
|
313
|
+
}, () => [h("span", A, [h("span", null, S(t.label), 1)])])]),
|
|
314
|
+
_: 3
|
|
315
|
+
}, 8, [
|
|
316
|
+
"data",
|
|
317
|
+
"lazy",
|
|
318
|
+
"load",
|
|
319
|
+
"props",
|
|
320
|
+
"icon-class",
|
|
321
|
+
"indent",
|
|
322
|
+
"highlight-current",
|
|
323
|
+
"show-checkbox",
|
|
324
|
+
"accordion",
|
|
325
|
+
"node-key",
|
|
326
|
+
"check-strictly",
|
|
327
|
+
"check-on-click-node",
|
|
328
|
+
"filter-node-method",
|
|
329
|
+
"expand-on-click-node",
|
|
330
|
+
"default-expand-all",
|
|
331
|
+
"default-expanded-keys",
|
|
332
|
+
"onCheckChange",
|
|
333
|
+
"onNodeClick",
|
|
334
|
+
"onNodeContextmenu"
|
|
335
|
+
])), [[R, a.loading]])]),
|
|
336
|
+
_: 3
|
|
337
|
+
}),
|
|
338
|
+
s.client.show && T.menu ? (y(), m("div", {
|
|
339
|
+
key: 1,
|
|
340
|
+
class: "el-cascader-panel is-bordered avue-tree__menu",
|
|
341
|
+
style: v(T.styleName),
|
|
342
|
+
onClick: r[4] || (r[4] = (e) => s.client.show = !1)
|
|
343
|
+
}, [
|
|
344
|
+
T.optVal(a.option.addBtn, !0) ? w((y(), m("div", {
|
|
345
|
+
key: 0,
|
|
346
|
+
class: "avue-tree__item",
|
|
347
|
+
onClick: r[1] || (r[1] = (...e) => T.rowAdd && T.rowAdd(...e))
|
|
348
|
+
}, [g(S(T.menuIcon("addBtn")), 1)])), [[L, T.getPermission("addBtn")]]) : p("v-if", !0),
|
|
349
|
+
T.optVal(a.option.editBtn, !0) ? w((y(), m("div", {
|
|
350
|
+
key: 1,
|
|
351
|
+
class: "avue-tree__item",
|
|
352
|
+
onClick: r[2] || (r[2] = (...e) => T.rowEdit && T.rowEdit(...e))
|
|
353
|
+
}, [g(S(T.menuIcon("editBtn")), 1)])), [[L, T.getPermission("editBtn")]]) : p("v-if", !0),
|
|
354
|
+
T.optVal(a.option.delBtn, !0) ? w((y(), m("div", {
|
|
355
|
+
key: 2,
|
|
356
|
+
class: "avue-tree__item",
|
|
357
|
+
onClick: r[3] || (r[3] = (...e) => T.rowRemove && T.rowRemove(...e))
|
|
358
|
+
}, [g(S(T.menuIcon("delBtn")), 1)])), [[L, T.getPermission("delBtn")]]) : p("v-if", !0),
|
|
359
|
+
b(e.$slots, "menu", { node: s.node })
|
|
360
|
+
], 4)) : p("v-if", !0),
|
|
361
|
+
s.box ? (y(), m("div", j, [_(I, {
|
|
362
|
+
modelValue: s.box,
|
|
363
|
+
"onUpdate:modelValue": r[6] || (r[6] = (e) => s.box = e),
|
|
364
|
+
title: s.node[T.labelKey] || T.title,
|
|
365
|
+
"before-close": T.hide,
|
|
366
|
+
width: T.optVal(a.option.dialogWidth, "50%")
|
|
367
|
+
}, {
|
|
368
|
+
default: C(() => [_(F, {
|
|
369
|
+
ref: "form",
|
|
370
|
+
modelValue: s.form,
|
|
371
|
+
"onUpdate:modelValue": r[5] || (r[5] = (e) => s.form = e),
|
|
372
|
+
option: T.formOption,
|
|
373
|
+
onSubmit: T.handleSubmit
|
|
374
|
+
}, null, 8, [
|
|
375
|
+
"modelValue",
|
|
376
|
+
"option",
|
|
377
|
+
"onSubmit"
|
|
378
|
+
])]),
|
|
379
|
+
_: 1
|
|
380
|
+
}, 8, [
|
|
381
|
+
"modelValue",
|
|
382
|
+
"title",
|
|
383
|
+
"before-close",
|
|
384
|
+
"width"
|
|
385
|
+
])])) : p("v-if", !0)
|
|
386
|
+
]);
|
|
387
|
+
}
|
|
388
|
+
var N = /* @__PURE__ */ e(E, [["render", M]]);
|
|
389
|
+
//#endregion
|
|
390
|
+
export { N as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.avue-tree{height:100%;position:relative}.avue-tree__menu{z-index:1024;background-color:#fff;flex-wrap:wrap;width:200px;position:fixed}.avue-tree__dialog .el-dialog__body{padding:30px 20px 0}.avue-tree__item{color:#666;white-space:nowrap;text-overflow:ellipsis;outline:none;width:100%;height:34px;padding:0 10px;line-height:34px;position:relative;overflow:hidden}.avue-tree__item:hover{color:#409eff;cursor:pointer}.avue-tree__filter{align-items:center;margin-bottom:5px;display:flex}.avue-tree__content{height:calc(100% - 32px);padding:5px 0}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
|
+
data: {
|
|
3
|
+
type: ObjectConstructor;
|
|
4
|
+
default: () => {};
|
|
5
|
+
};
|
|
6
|
+
headers: {
|
|
7
|
+
type: ObjectConstructor;
|
|
8
|
+
default: () => {};
|
|
9
|
+
};
|
|
10
|
+
customConfig: {
|
|
11
|
+
type: ObjectConstructor;
|
|
12
|
+
default: () => {};
|
|
13
|
+
};
|
|
14
|
+
toolbarConfig: {
|
|
15
|
+
type: ObjectConstructor;
|
|
16
|
+
default: () => {};
|
|
17
|
+
};
|
|
18
|
+
propsHttp: {
|
|
19
|
+
type: ObjectConstructor;
|
|
20
|
+
default: () => {};
|
|
21
|
+
};
|
|
22
|
+
ali: {
|
|
23
|
+
type: ObjectConstructor;
|
|
24
|
+
default: () => {};
|
|
25
|
+
};
|
|
26
|
+
qiniu: {
|
|
27
|
+
type: ObjectConstructor;
|
|
28
|
+
default: () => {};
|
|
29
|
+
};
|
|
30
|
+
oss: StringConstructor;
|
|
31
|
+
action: StringConstructor;
|
|
32
|
+
disabled: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
modelValue: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
placeholder: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
}>, {}, {
|
|
45
|
+
editor: null;
|
|
46
|
+
}, {
|
|
47
|
+
fileName(): any;
|
|
48
|
+
homeUrl(): any;
|
|
49
|
+
resKey(): any;
|
|
50
|
+
urlKey(): any;
|
|
51
|
+
isQiniuOSS(): boolean;
|
|
52
|
+
isAliOSS(): boolean;
|
|
53
|
+
}, {
|
|
54
|
+
initEdit(): void;
|
|
55
|
+
uploadFile(file: any): Promise<any>;
|
|
56
|
+
getUEContent(): any;
|
|
57
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("update:modelValue" | "blur" | "focus")[], "update:modelValue" | "blur" | "focus", import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
58
|
+
data: {
|
|
59
|
+
type: ObjectConstructor;
|
|
60
|
+
default: () => {};
|
|
61
|
+
};
|
|
62
|
+
headers: {
|
|
63
|
+
type: ObjectConstructor;
|
|
64
|
+
default: () => {};
|
|
65
|
+
};
|
|
66
|
+
customConfig: {
|
|
67
|
+
type: ObjectConstructor;
|
|
68
|
+
default: () => {};
|
|
69
|
+
};
|
|
70
|
+
toolbarConfig: {
|
|
71
|
+
type: ObjectConstructor;
|
|
72
|
+
default: () => {};
|
|
73
|
+
};
|
|
74
|
+
propsHttp: {
|
|
75
|
+
type: ObjectConstructor;
|
|
76
|
+
default: () => {};
|
|
77
|
+
};
|
|
78
|
+
ali: {
|
|
79
|
+
type: ObjectConstructor;
|
|
80
|
+
default: () => {};
|
|
81
|
+
};
|
|
82
|
+
qiniu: {
|
|
83
|
+
type: ObjectConstructor;
|
|
84
|
+
default: () => {};
|
|
85
|
+
};
|
|
86
|
+
oss: StringConstructor;
|
|
87
|
+
action: StringConstructor;
|
|
88
|
+
disabled: {
|
|
89
|
+
type: BooleanConstructor;
|
|
90
|
+
default: boolean;
|
|
91
|
+
};
|
|
92
|
+
modelValue: {
|
|
93
|
+
type: StringConstructor;
|
|
94
|
+
default: string;
|
|
95
|
+
};
|
|
96
|
+
placeholder: {
|
|
97
|
+
type: StringConstructor;
|
|
98
|
+
default: string;
|
|
99
|
+
};
|
|
100
|
+
}>> & Readonly<{
|
|
101
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
102
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
103
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
|
104
|
+
}>, {
|
|
105
|
+
disabled: boolean;
|
|
106
|
+
modelValue: string;
|
|
107
|
+
data: Record<string, any>;
|
|
108
|
+
placeholder: string;
|
|
109
|
+
headers: Record<string, any>;
|
|
110
|
+
customConfig: Record<string, any>;
|
|
111
|
+
toolbarConfig: Record<string, any>;
|
|
112
|
+
propsHttp: Record<string, any>;
|
|
113
|
+
ali: Record<string, any>;
|
|
114
|
+
qiniu: Record<string, any>;
|
|
115
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
116
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.avue-ueditor{border:1px solid #ccc}.avue-ueditor .fy-editor-toolbar{border-bottom:1px solid #ccc}.avue-ueditor .fy-editor{height:300px}
|