@web-utils/component 2.7.2 → 2.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/AfdColumn.vue_vue_type_template_lang.768f2ed2.js +302 -0
- package/dist/chunks/ConfigArray.vue_vue_type_template_lang.66483daa.js +51 -0
- package/dist/chunks/ConfigColor.vue_vue_type_template_lang.cd880091.js +24 -0
- package/dist/chunks/ConfigCustom.vue_vue_type_template_lang.6e03d7fd.js +52 -0
- package/dist/chunks/ConfigDate.vue_vue_type_template_lang.420fa897.js +104 -0
- package/dist/chunks/ConfigDynamic.vue_vue_type_template_lang.82d24ab0.js +133 -0
- package/dist/chunks/ConfigEvent.vue_vue_type_template_lang.5e8ed6cc.js +96 -0
- package/dist/chunks/ConfigGroup.vue_vue_type_template_lang.44117322.js +48 -0
- package/dist/chunks/ConfigInput.vue_vue_type_template_lang.cc1eb052.js +96 -0
- package/dist/chunks/ConfigMap.vue_vue_type_template_lang.daee4d38.js +31 -0
- package/dist/chunks/ConfigNumber.vue_vue_type_template_lang.d60231d7.js +130 -0
- package/dist/chunks/ConfigRate.vue_vue_type_style_index_0_scoped_true_lang.cf5d437d.js +125 -0
- package/dist/chunks/ConfigSelect.vue_vue_type_template_lang.7db7e57f.js +483 -0
- package/dist/chunks/ConfigSlider.vue_vue_type_template_lang.27b8cc7b.js +99 -0
- package/dist/chunks/ConfigSwitch.vue_vue_type_style_index_0_scoped_true_lang.4caf1bd0.js +54 -0
- package/dist/chunks/ConfigTable.vue_vue_type_template_lang.3e8136d9.js +341 -0
- package/dist/chunks/ConfigTextarea.vue_vue_type_template_lang.5cddf41c.js +88 -0
- package/dist/chunks/ConfigTitle.vue_vue_type_template_lang.57d9deb5.js +87 -0
- package/dist/chunks/ConfigTree.vue_vue_type_style_index_0_scoped_true_lang.3770c37e.js +464 -0
- package/dist/chunks/ConfigUEditor.vue_vue_type_template_lang.9726b4f5.js +240 -0
- package/dist/chunks/ConfigUpload.vue_vue_type_template_lang.531a9b2a.js +471 -0
- package/dist/chunks/FormConfig.vue_vue_type_template_lang.85b4ee87.js +232 -0
- package/dist/chunks/WidgetConfig.vue_vue_type_template_lang.f903c9b2.js +1765 -0
- package/dist/chunks/WidgetForm.vue_vue_type_template_lang.82248338.js +242 -0
- package/dist/chunks/WidgetFormGroup.vue_vue_type_template_lang.c636aabd.js +266 -0
- package/dist/chunks/WidgetFormItem.vue_vue_type_template_lang.48d55a5c.js +24 -0
- package/dist/chunks/WidgetFormTable.vue_vue_type_template_lang.30625146.js +228 -0
- package/dist/chunks/dataformat.d3fd2d1b.js +157 -0
- package/dist/chunks/{detail.a3249549.js → detail.ac4d421a.js} +7 -7
- package/dist/chunks/{dic.5f7e3523.js → dic.79d9f595.js} +28 -27
- package/dist/chunks/{event.50c365eb.js → event.43b42228.js} +7 -6
- package/dist/chunks/{init.352281f5.js → init.3b47bb80.js} +8 -7
- package/dist/chunks/{packages.5d7a86c4.js → packages.6f252850.js} +5 -61
- package/dist/chunks/{util.5053d54e.js → util.80e28481.js} +37 -51
- package/dist/components/afd-column/index.js +54 -0
- package/dist/components/chat/index.js +1 -1
- package/dist/components/code/index.js +1 -1
- package/dist/components/column/index.js +8 -7
- package/dist/components/column-default/index.js +1 -1
- package/dist/components/column-dynamic/index.js +1 -1
- package/dist/components/column-menu/index.js +1 -1
- package/dist/components/column-slot/index.js +27 -26
- package/dist/components/config-array/index.js +26 -0
- package/dist/components/config-color/index.js +26 -0
- package/dist/components/config-custom/index.js +60 -0
- package/dist/components/config-date/index.js +26 -0
- package/dist/components/config-dynamic/index.js +26 -0
- package/dist/components/config-event/index.js +72 -0
- package/dist/components/config-group/index.js +34 -0
- package/dist/components/config-input/index.js +26 -0
- package/dist/components/config-map/index.js +26 -0
- package/dist/components/config-number/index.js +26 -0
- package/dist/components/config-rate/index.js +69 -0
- package/dist/components/config-rate/style.css +1 -0
- package/dist/components/config-select/index.js +88 -0
- package/dist/components/config-slider/index.js +26 -0
- package/dist/components/config-switch/index.js +31 -0
- package/dist/components/config-switch/style.css +1 -0
- package/dist/components/config-table/index.js +120 -0
- package/dist/components/config-textarea/index.js +26 -0
- package/dist/components/config-title/index.js +31 -0
- package/dist/components/config-tree/index.js +120 -0
- package/dist/components/config-tree/style.css +1 -0
- package/dist/components/config-u-editor/index.js +32 -0
- package/dist/components/config-upload/index.js +56 -0
- package/dist/components/custom-scrollbar/index.js +6 -1
- package/dist/components/dialog-excel/index.js +2 -2
- package/dist/components/dialog-filter/index.js +1 -1
- package/dist/components/dialog-form/index.js +8 -7
- package/dist/components/flex-item/index.js +4 -1
- package/dist/components/flow/index.js +1 -1
- package/dist/components/flow-node/index.js +1 -1
- package/dist/components/form-config/index.js +26 -0
- package/dist/components/form-group/index.js +1 -1
- package/dist/components/form-temp/index.js +2 -2
- package/dist/components/{array → fy-array}/index.js +5 -5
- package/dist/components/{array → fy-array}/style.css +0 -0
- package/dist/components/fy-cascader/index.js +1 -1
- package/dist/components/fy-checkbox/index.js +1 -1
- package/dist/components/fy-curd/index.js +37 -131
- package/dist/components/fy-date/index.js +1 -1
- package/dist/components/fy-dialog-form/index.js +9 -8
- package/dist/components/{draggable → fy-draggable}/index.js +2 -2
- package/dist/components/{draggable → fy-draggable}/style.css +0 -0
- package/dist/components/fy-dynamic/index.js +2 -2
- package/dist/components/{empty → fy-empty}/index.js +6 -6
- package/dist/components/{empty → fy-empty}/style.css +0 -0
- package/dist/components/fy-form/index.js +9 -8
- package/dist/components/fy-form-design/index.js +1371 -0
- package/dist/components/fy-form-design/style.css +1 -0
- package/dist/components/fy-input/index.js +1 -1
- package/dist/components/fy-input-color/index.js +1 -1
- package/dist/components/fy-input-icon/index.js +1 -1
- package/dist/components/fy-input-map/index.js +4 -4
- package/dist/components/fy-input-number/index.js +1 -1
- package/dist/components/fy-input-table/index.js +4 -4
- package/dist/components/fy-input-tree/index.js +2 -2
- package/dist/components/fy-radio/index.js +1 -1
- package/dist/components/fy-rate/index.js +1 -1
- package/dist/components/fy-select/index.js +18 -17
- package/dist/components/fy-slider/index.js +2 -2
- package/dist/components/fy-switch/index.js +1 -1
- package/dist/components/fy-time/index.js +2 -2
- package/dist/components/fy-title/index.js +1 -1
- package/dist/components/fy-tree/index.js +7 -6
- package/dist/components/fy-upload/index.js +11 -10
- package/dist/components/header-menu/index.js +1 -1
- package/dist/components/header-search/index.js +2 -2
- package/dist/components/license/index.js +5 -5
- package/dist/components/login/index.js +9 -8
- package/dist/components/record-video/index.js +1 -1
- package/dist/components/search/index.js +10 -9
- package/dist/components/sign/index.js +1 -1
- package/dist/components/table-column/index.js +4 -1
- package/dist/components/table-page/index.js +9 -6
- package/dist/components/text-ellipsis/index.js +1 -1
- package/dist/components/verify/index.js +1 -1
- package/dist/components/watermark/index.js +5 -1
- package/dist/components/widget-config/index.js +107 -0
- package/dist/components/widget-form/index.js +68 -0
- package/dist/components/widget-form-group/index.js +91 -0
- package/dist/components/widget-form-item/index.js +70 -0
- package/dist/components/widget-form-table/index.js +90 -0
- package/dist/index.css +761 -201
- package/dist/index.es.js +24037 -16605
- package/package.json +6 -4
- package/web-types.json +1880 -1781
- package/dist/chunks/dataformat.fb35ee10.js +0 -61
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { d as s } from "./util.80e28481.js";
|
|
2
|
+
import { s as o, r as c } from "./WidgetFormItem.vue_vue_type_template_lang.48d55a5c.js";
|
|
3
|
+
import { n as d } from "./vueComponentNormalizer.71e2aa87.js";
|
|
4
|
+
const u = {
|
|
5
|
+
name: "WidgetFormItem",
|
|
6
|
+
props: {
|
|
7
|
+
item: {
|
|
8
|
+
type: Object,
|
|
9
|
+
default: () => ({})
|
|
10
|
+
},
|
|
11
|
+
params: {
|
|
12
|
+
type: Object,
|
|
13
|
+
default: () => ({})
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
data() {
|
|
17
|
+
return {
|
|
18
|
+
form: {}
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
computed: {
|
|
22
|
+
vBind() {
|
|
23
|
+
const e = Object.assign(s(this.item), this.params, {
|
|
24
|
+
size: this.item.size || "small",
|
|
25
|
+
dic: this.item.dicData ? this.item.dicData.map((i) => {
|
|
26
|
+
if (!this.item.props)
|
|
27
|
+
return i;
|
|
28
|
+
const { label: t, value: a, desc: l } = this.item.props;
|
|
29
|
+
return !t || !a ? i : {
|
|
30
|
+
[t]: i.label,
|
|
31
|
+
[a]: i.value,
|
|
32
|
+
[l]: i.desc
|
|
33
|
+
};
|
|
34
|
+
}) : void 0,
|
|
35
|
+
rules: this.item.pattern ? this.item.rules.map((i) => (i.pattern && (i.pattern = new RegExp(this.item.pattern)), i)) : this.item.rules
|
|
36
|
+
});
|
|
37
|
+
return ["change", "blur", "click", "focus"].forEach((i) => delete e[i]), e.event && delete e.event, e;
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
methods: {
|
|
41
|
+
getComponent(e, n) {
|
|
42
|
+
let i = "fy-", t = "input";
|
|
43
|
+
return n || (["array", "img", "url"].includes(e) ? t = "array" : e === "select" ? t = "select" : e === "radio" ? t = "radio" : e === "checkbox" ? t = "checkbox" : ["time", "timerange"].includes(e) ? t = "time" : ["dates", "date", "datetime", "datetimerange", "daterange", "week", "month", "year"].includes(e) ? t = "date" : e === "cascader" ? t = "cascader" : e === "number" ? t = "input-number" : e === "password" ? t = "input" : e === "switch" ? t = "switch" : e === "rate" ? t = "rate" : e === "upload" ? t = "upload" : e === "slider" ? t = "slider" : e === "dynamic" ? t = "dynamic" : e === "icon" ? t = "input-icon" : e === "color" ? t = "input-color" : e === "map" && (t = "input-map"), i + t);
|
|
44
|
+
},
|
|
45
|
+
getPlaceholder(e) {
|
|
46
|
+
const n = e.label;
|
|
47
|
+
return ["select", "checkbox", "radio", "tree", "color", "dates", "date", "datetime", "datetimerange", "daterange", "week", "month", "year", "map", "icon"].includes(e.type) ? `请选择 ${n}` : `请输入 ${n}`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}, r = {};
|
|
51
|
+
var p = /* @__PURE__ */ d(
|
|
52
|
+
u,
|
|
53
|
+
c,
|
|
54
|
+
o,
|
|
55
|
+
!1,
|
|
56
|
+
m,
|
|
57
|
+
null,
|
|
58
|
+
null,
|
|
59
|
+
null
|
|
60
|
+
);
|
|
61
|
+
function m(e) {
|
|
62
|
+
for (let n in r)
|
|
63
|
+
this[n] = r[n];
|
|
64
|
+
}
|
|
65
|
+
const _ = /* @__PURE__ */ function() {
|
|
66
|
+
return p.exports;
|
|
67
|
+
}();
|
|
68
|
+
var b = function() {
|
|
69
|
+
var e = this, n = e.$createElement, i = e._self._c || n;
|
|
70
|
+
return i("div", [i("h3", {
|
|
71
|
+
directives: [{
|
|
72
|
+
name: "show",
|
|
73
|
+
rawName: "v-show",
|
|
74
|
+
value: e.column.label,
|
|
75
|
+
expression: "column.label"
|
|
76
|
+
}],
|
|
77
|
+
staticStyle: {
|
|
78
|
+
margin: "10px"
|
|
79
|
+
}
|
|
80
|
+
}, [e._v(" " + e._s(e.column.label) + " ")]), i("Draggable", {
|
|
81
|
+
staticClass: "widget-form-table__content",
|
|
82
|
+
attrs: {
|
|
83
|
+
list: e.column.children.column,
|
|
84
|
+
group: {
|
|
85
|
+
name: "form"
|
|
86
|
+
},
|
|
87
|
+
"ghost-class": "ghost",
|
|
88
|
+
animation: 200,
|
|
89
|
+
handle: ".widget-form-table__item"
|
|
90
|
+
},
|
|
91
|
+
on: {
|
|
92
|
+
add: function(t) {
|
|
93
|
+
return e.handleWidgetTableAdd(t, e.column);
|
|
94
|
+
},
|
|
95
|
+
end: function(t) {
|
|
96
|
+
return e.$emit("change");
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}, [e.column.children.column.length > 0 ? e._l(e.column.children.column, function(t, a) {
|
|
100
|
+
return i("div", {
|
|
101
|
+
key: a,
|
|
102
|
+
staticClass: "widget-form-table__item",
|
|
103
|
+
class: {
|
|
104
|
+
active: e.selectWidget.prop === t.prop,
|
|
105
|
+
required: t.required
|
|
106
|
+
},
|
|
107
|
+
style: {
|
|
108
|
+
minWidth: t.width ? `${t.width}px` : "33.3%",
|
|
109
|
+
width: t.width ? `${t.width}px` : "33.3%"
|
|
110
|
+
},
|
|
111
|
+
on: {
|
|
112
|
+
click: function(l) {
|
|
113
|
+
return l.stopPropagation(), e.handleWidgetTableSelect(t);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}, [i("ElTable", {
|
|
117
|
+
attrs: {
|
|
118
|
+
data: [t],
|
|
119
|
+
border: ""
|
|
120
|
+
}
|
|
121
|
+
}, [i("ElTableColumn", {
|
|
122
|
+
attrs: {
|
|
123
|
+
prop: t.prop,
|
|
124
|
+
label: t.label,
|
|
125
|
+
align: e.column.children.align,
|
|
126
|
+
"header-align": e.column.children.headerAlign
|
|
127
|
+
}
|
|
128
|
+
}, [i("WidgetFormItem", {
|
|
129
|
+
attrs: {
|
|
130
|
+
item: t,
|
|
131
|
+
params: e.column.params
|
|
132
|
+
}
|
|
133
|
+
}), e.selectWidget.prop === t.prop ? i("ElButton", {
|
|
134
|
+
staticClass: "widget-table-action-delete",
|
|
135
|
+
attrs: {
|
|
136
|
+
title: "删除",
|
|
137
|
+
circle: "",
|
|
138
|
+
plain: "",
|
|
139
|
+
size: "small",
|
|
140
|
+
type: "danger"
|
|
141
|
+
},
|
|
142
|
+
on: {
|
|
143
|
+
click: function(l) {
|
|
144
|
+
return l.stopPropagation(), e.handleWidgetTableDelete(e.column, a);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}, [i("i", {
|
|
148
|
+
staticClass: "iconfont icon-delete"
|
|
149
|
+
})]) : e._e(), e.selectWidget.prop === t.prop ? i("ElButton", {
|
|
150
|
+
staticClass: "widget-table-action-clone",
|
|
151
|
+
attrs: {
|
|
152
|
+
title: "复制",
|
|
153
|
+
circle: "",
|
|
154
|
+
plain: "",
|
|
155
|
+
size: "small",
|
|
156
|
+
type: "primary"
|
|
157
|
+
},
|
|
158
|
+
on: {
|
|
159
|
+
click: function(l) {
|
|
160
|
+
return l.stopPropagation(), e.handleWidgetTableClone(e.column, t);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}, [i("i", {
|
|
164
|
+
staticClass: "iconfont icon-copy"
|
|
165
|
+
})]) : e._e()], 1)], 1)], 1);
|
|
166
|
+
}) : [i("FyEmpty", {
|
|
167
|
+
staticStyle: {
|
|
168
|
+
width: "100%"
|
|
169
|
+
},
|
|
170
|
+
attrs: {
|
|
171
|
+
size: "50",
|
|
172
|
+
description: "拖拽字段至此"
|
|
173
|
+
}
|
|
174
|
+
})]], 2), e.selectWidget.prop === e.column.prop ? i("ElButton", {
|
|
175
|
+
staticClass: "widget-action-delete",
|
|
176
|
+
attrs: {
|
|
177
|
+
title: "删除",
|
|
178
|
+
circle: "",
|
|
179
|
+
plain: "",
|
|
180
|
+
size: "small",
|
|
181
|
+
type: "danger"
|
|
182
|
+
},
|
|
183
|
+
on: {
|
|
184
|
+
click: function(t) {
|
|
185
|
+
return t.stopPropagation(), e.handleWidgetDelete(e.index);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}, [i("i", {
|
|
189
|
+
staticClass: "iconfont icon-delete"
|
|
190
|
+
})]) : e._e(), e.selectWidget.prop === e.column.prop ? i("ElButton", {
|
|
191
|
+
staticClass: "widget-action-clear",
|
|
192
|
+
attrs: {
|
|
193
|
+
title: "清空",
|
|
194
|
+
circle: "",
|
|
195
|
+
plain: "",
|
|
196
|
+
size: "small",
|
|
197
|
+
type: "warning"
|
|
198
|
+
},
|
|
199
|
+
on: {
|
|
200
|
+
click: function(t) {
|
|
201
|
+
return t.stopPropagation(), e.handleWidgetClear(e.index);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}, [i("i", {
|
|
205
|
+
staticClass: "iconfont icon-clear"
|
|
206
|
+
})]) : e._e(), e.selectWidget.prop === e.column.prop ? i("ElButton", {
|
|
207
|
+
staticClass: "widget-action-clone",
|
|
208
|
+
attrs: {
|
|
209
|
+
title: "复制",
|
|
210
|
+
circle: "",
|
|
211
|
+
plain: "",
|
|
212
|
+
size: "small",
|
|
213
|
+
type: "primary"
|
|
214
|
+
},
|
|
215
|
+
on: {
|
|
216
|
+
click: function(t) {
|
|
217
|
+
return t.stopPropagation(), e.handleWidgetCloneTable(e.index);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}, [i("i", {
|
|
221
|
+
staticClass: "iconfont icon-copy"
|
|
222
|
+
})]) : e._e()], 1);
|
|
223
|
+
}, v = [];
|
|
224
|
+
export {
|
|
225
|
+
_ as W,
|
|
226
|
+
b as r,
|
|
227
|
+
v as s
|
|
228
|
+
};
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { isBlank as c } from "@web-utils/core";
|
|
2
|
+
import { f as E, M as f, A as h, R as T, a as u, b as m, K as A, c as I, S as L, D as S, e as B, I as _ } from "./util.80e28481.js";
|
|
3
|
+
const P = {
|
|
4
|
+
common: {
|
|
5
|
+
condition: "条件",
|
|
6
|
+
display: "显示",
|
|
7
|
+
hide: "隐藏"
|
|
8
|
+
},
|
|
9
|
+
tip: {
|
|
10
|
+
select: "请选择",
|
|
11
|
+
input: "请输入"
|
|
12
|
+
},
|
|
13
|
+
check: {
|
|
14
|
+
checkAll: "全选"
|
|
15
|
+
},
|
|
16
|
+
upload: {
|
|
17
|
+
upload: "点击上传",
|
|
18
|
+
tip: "将文件拖到此处,或"
|
|
19
|
+
},
|
|
20
|
+
time: {
|
|
21
|
+
start: "开始",
|
|
22
|
+
end: "结束"
|
|
23
|
+
},
|
|
24
|
+
date: {
|
|
25
|
+
start: "开始",
|
|
26
|
+
end: "结束",
|
|
27
|
+
t: "今日",
|
|
28
|
+
y: "昨日",
|
|
29
|
+
n: "近7天",
|
|
30
|
+
a: "全部"
|
|
31
|
+
},
|
|
32
|
+
form: {
|
|
33
|
+
printBtn: "打 印",
|
|
34
|
+
mockBtn: "模 拟",
|
|
35
|
+
submitBtn: "提 交",
|
|
36
|
+
emptyBtn: "清 空"
|
|
37
|
+
},
|
|
38
|
+
crud: {
|
|
39
|
+
filter: {
|
|
40
|
+
addBtn: "新增条件",
|
|
41
|
+
clearBtn: "清空数据",
|
|
42
|
+
resetBtn: "清空条件",
|
|
43
|
+
cancelBtn: "取 消",
|
|
44
|
+
submitBtn: "确 定"
|
|
45
|
+
},
|
|
46
|
+
column: {
|
|
47
|
+
name: "列名",
|
|
48
|
+
hide: "隐藏",
|
|
49
|
+
fixed: "冻结",
|
|
50
|
+
filters: "过滤",
|
|
51
|
+
sortable: "排序",
|
|
52
|
+
index: "顺序",
|
|
53
|
+
width: "宽度"
|
|
54
|
+
},
|
|
55
|
+
tipStartTitle: "当前表格已选择",
|
|
56
|
+
tipEndTitle: "项",
|
|
57
|
+
editTitle: "编 辑",
|
|
58
|
+
copyTitle: "复 制",
|
|
59
|
+
addTitle: "新 增",
|
|
60
|
+
viewTitle: "查 看",
|
|
61
|
+
filterTitle: "过滤条件",
|
|
62
|
+
showTitle: "列显隐",
|
|
63
|
+
menu: "操作",
|
|
64
|
+
addBtn: "新 增",
|
|
65
|
+
show: "显 示",
|
|
66
|
+
hide: "隐 藏",
|
|
67
|
+
open: "展 开",
|
|
68
|
+
shrink: "收 缩",
|
|
69
|
+
printBtn: "打 印",
|
|
70
|
+
excelBtn: "导 出",
|
|
71
|
+
updateBtn: "修 改",
|
|
72
|
+
cancelBtn: "取 消",
|
|
73
|
+
searchBtn: "搜 索",
|
|
74
|
+
emptyBtn: "清 空",
|
|
75
|
+
menuBtn: "功 能",
|
|
76
|
+
saveBtn: "保 存",
|
|
77
|
+
viewBtn: "查 看",
|
|
78
|
+
editBtn: "编 辑",
|
|
79
|
+
copyBtn: "复 制",
|
|
80
|
+
delBtn: "删 除"
|
|
81
|
+
}
|
|
82
|
+
}, k = (e, n) => {
|
|
83
|
+
n = n || "";
|
|
84
|
+
const t = n.split(".");
|
|
85
|
+
let a = e, s = null;
|
|
86
|
+
for (let l = 0, d = t.length; l < d; l++) {
|
|
87
|
+
const o = t[l];
|
|
88
|
+
if (!a)
|
|
89
|
+
break;
|
|
90
|
+
if (l === d - 1) {
|
|
91
|
+
s = a[o];
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
a = a[o];
|
|
95
|
+
}
|
|
96
|
+
return s;
|
|
97
|
+
}, p = (e) => k(P, e), R = (e = []) => (e.forEach((n) => {
|
|
98
|
+
let t = n.cascader;
|
|
99
|
+
if (!c(t)) {
|
|
100
|
+
let a = n.prop;
|
|
101
|
+
t.forEach((s) => {
|
|
102
|
+
let l = E(e, s);
|
|
103
|
+
l !== -1 && (l.parentProp = a);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}), e);
|
|
107
|
+
let r = 0;
|
|
108
|
+
const C = (e, n = 12, t = !1) => {
|
|
109
|
+
t && (r = 0);
|
|
110
|
+
const a = 24;
|
|
111
|
+
return r = r + (e.span || n) + (e.offset || 0), r === a ? r = 0 : r > a ? r = (e.span || n) + (e.offset || 0) : e.row && r !== a && (e.count = a - r, r = 0), e;
|
|
112
|
+
}, v = (e, n) => {
|
|
113
|
+
let { type: t, multiple: a, dataType: s, separator: l = S, alone: d, emitPath: o, range: y } = n, i = e;
|
|
114
|
+
return f.includes(t) && a === !0 || h.includes(t) && o !== !1 || T.includes(t) && y === !0 ? (Array.isArray(i) || (c(i) ? i = [] : i = (i + "").split(l) || []), i.forEach((b, g) => {
|
|
115
|
+
i[g] = u(b, s);
|
|
116
|
+
}), m.includes(t) && c(i) && d && (i = [""])) : i = u(i, s), i;
|
|
117
|
+
}, N = (e) => {
|
|
118
|
+
const n = e.type, t = e.searchRange;
|
|
119
|
+
let a = n;
|
|
120
|
+
if (e.searchType)
|
|
121
|
+
return e.searchType;
|
|
122
|
+
if (["radio", "checkbox", "switch"].includes(n))
|
|
123
|
+
a = "select";
|
|
124
|
+
else if (B.includes(n)) {
|
|
125
|
+
let s = "range";
|
|
126
|
+
t ? n.includes(s) ? a = n : a = n + s : a = n.replace(s, "");
|
|
127
|
+
} else
|
|
128
|
+
["textarea"].includes(n) && (a = "input");
|
|
129
|
+
return a;
|
|
130
|
+
}, M = (e, n) => {
|
|
131
|
+
let t = e || "input";
|
|
132
|
+
if (c(n))
|
|
133
|
+
m.includes(e) ? t = "array" : ["time", "timerange"].includes(e) ? t = "time" : B.includes(e) ? t = "date" : ["password", "textarea", "search"].includes(e) ? t = "input" : _.includes(e) && (t = "input-" + e);
|
|
134
|
+
else
|
|
135
|
+
return n;
|
|
136
|
+
return A + t;
|
|
137
|
+
}, O = (e = []) => {
|
|
138
|
+
let n = {};
|
|
139
|
+
return e.forEach((t) => {
|
|
140
|
+
h.includes(t.type) && t.emitPath !== !1 || f.includes(t.type) && t.multiple || t.dataType === "array" ? n[t.prop] = [] : T.includes(t.type) && t.range === !0 ? n[t.prop] = [0, 0] : ["rate", "slider", "number"].includes(t.type) || t.dataType === "number" ? n[t.prop] = void 0 : n[t.prop] = "", t.bind && (n = I(n, t.bind)), c(t.value) || (n[t.prop] = t.value);
|
|
141
|
+
}), {
|
|
142
|
+
tableForm: n
|
|
143
|
+
};
|
|
144
|
+
}, V = function(e) {
|
|
145
|
+
const n = e.placeholder, t = e.label;
|
|
146
|
+
return c(n) ? L.includes(e.type) ? `${p("tip.select")} ${t}` : `${p("tip.input")} ${t}` : n;
|
|
147
|
+
};
|
|
148
|
+
export {
|
|
149
|
+
V as a,
|
|
150
|
+
R as b,
|
|
151
|
+
C as c,
|
|
152
|
+
N as d,
|
|
153
|
+
O as f,
|
|
154
|
+
M as g,
|
|
155
|
+
v as i,
|
|
156
|
+
p as t
|
|
157
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
const P = (r = {}, t = {}, g = {},
|
|
1
|
+
import { isBlank as T, formatDate as f } from "@web-utils/core";
|
|
2
|
+
import { i as Y, M as I, A as L, D as y, m as _, b as S, n as A, p as $, e as b, q as h } from "./util.80e28481.js";
|
|
3
|
+
const P = (r = {}, t = {}, g = {}, n = []) => {
|
|
4
4
|
let e = r[t.prop], a = t.type, s = t.separator;
|
|
5
|
-
if (t.bind && (e =
|
|
5
|
+
if (t.bind && (e = Y(r, t.bind)), T(e))
|
|
6
6
|
e = "";
|
|
7
7
|
else {
|
|
8
|
-
let
|
|
9
|
-
if ((["string", "number"].includes(t.dataType) ||
|
|
8
|
+
let o = I.includes(t.type) && t.multiple, D = L.includes(t.type);
|
|
9
|
+
if ((["string", "number"].includes(t.dataType) || o || D) && !Array.isArray(e) && (e = (e + "").split(s || y), t.dataType === "number" && (e = _(e))), S.includes(a))
|
|
10
10
|
Array.isArray(e) ? e = e.join(s || A) : e = e.split(s || y).join(s || A);
|
|
11
11
|
else if (a === "password")
|
|
12
12
|
e = $(e, "*");
|
|
@@ -19,7 +19,7 @@ const P = (r = {}, t = {}, g = {}, o = []) => {
|
|
|
19
19
|
} else
|
|
20
20
|
a === "time" && e.length <= 8 && (e = `${l} ${e}`), e = f(e, d);
|
|
21
21
|
}
|
|
22
|
-
e = h(
|
|
22
|
+
e = h(n, e, t.props || g.props);
|
|
23
23
|
}
|
|
24
24
|
return t.formatter && typeof t.formatter == "function" && (e = t.formatter(r, r[t.prop], e, t)), e;
|
|
25
25
|
};
|
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { isBlank as w } from "@web-utils/core";
|
|
2
|
+
import { t as D, v as x } from "./util.80e28481.js";
|
|
3
|
+
const F = (p, t = []) => new Promise((o, i) => {
|
|
3
4
|
let e = [], a = [], c = {};
|
|
4
|
-
p.forEach((
|
|
5
|
-
|
|
6
|
-
}), t.forEach((
|
|
5
|
+
p.forEach((d) => {
|
|
6
|
+
d.parentProp && e.push(d);
|
|
7
|
+
}), t.forEach((d, s) => {
|
|
7
8
|
e.forEach((r) => {
|
|
8
9
|
r.hide !== !0 && r.dicFlag !== !1 && a.push(
|
|
9
10
|
new Promise((h) => {
|
|
10
|
-
w(
|
|
11
|
+
w(d[r.parentProp]) ? h({
|
|
11
12
|
prop: r.prop,
|
|
12
13
|
data: [],
|
|
13
|
-
index:
|
|
14
|
+
index: s
|
|
14
15
|
}) : r.dicUrl && g({
|
|
15
|
-
url: `${r.dicUrl.replace("{{key}}",
|
|
16
|
+
url: `${r.dicUrl.replace("{{key}}", d[r.parentProp])}`,
|
|
16
17
|
props: r.props,
|
|
17
18
|
method: r.dicMethod,
|
|
18
19
|
headers: r.dicHeaders,
|
|
19
20
|
formatter: r.dicFormatter,
|
|
20
21
|
query: r.dicQuery,
|
|
21
|
-
form:
|
|
22
|
+
form: d
|
|
22
23
|
}).then((m) => {
|
|
23
24
|
h({
|
|
24
25
|
prop: r.prop,
|
|
25
26
|
data: m,
|
|
26
|
-
index:
|
|
27
|
+
index: s
|
|
27
28
|
});
|
|
28
29
|
});
|
|
29
30
|
})
|
|
30
31
|
);
|
|
31
32
|
});
|
|
32
|
-
}), Promise.all(a).then((
|
|
33
|
-
|
|
34
|
-
w(c[
|
|
33
|
+
}), Promise.all(a).then((d) => {
|
|
34
|
+
d.forEach((s) => {
|
|
35
|
+
w(c[s.index]) && (c[s.index] = {}), c[s.index][s.prop] = s.data;
|
|
35
36
|
}), o(c);
|
|
36
37
|
});
|
|
37
|
-
}),
|
|
38
|
+
}), U = (p) => {
|
|
38
39
|
let t = [];
|
|
39
40
|
return new Promise((o, i) => {
|
|
40
41
|
t = E(p).ajaxdic, k(t).then((a) => {
|
|
@@ -43,7 +44,7 @@ const b = (p, t = []) => new Promise((o, i) => {
|
|
|
43
44
|
i(a);
|
|
44
45
|
});
|
|
45
46
|
});
|
|
46
|
-
},
|
|
47
|
+
}, K = (p) => {
|
|
47
48
|
let t = {}, o = p.dicData || {};
|
|
48
49
|
return p.column.forEach((i) => {
|
|
49
50
|
i.dicData && (t[i.prop] = D(i.dicData, i.props, i.dataType));
|
|
@@ -52,10 +53,10 @@ const b = (p, t = []) => new Promise((o, i) => {
|
|
|
52
53
|
function E(p) {
|
|
53
54
|
let t = p.column || [], o = [], i = {}, e = [];
|
|
54
55
|
return t.forEach((a) => {
|
|
55
|
-
let c = a.dicData,
|
|
56
|
-
e = e.concat(a.cascader || []), Array.isArray(c) && (i[
|
|
57
|
-
url:
|
|
58
|
-
name:
|
|
56
|
+
let c = a.dicData, d = a.dicUrl, s = a.prop, r = a.parentProp;
|
|
57
|
+
e = e.concat(a.cascader || []), Array.isArray(c) && (i[s] = c), !(a.dicFlag === !1 || a.lazy === !0 || e.includes(s)) && d && !r && o.push({
|
|
58
|
+
url: d,
|
|
59
|
+
name: s,
|
|
59
60
|
method: a.dicMethod,
|
|
60
61
|
headers: t.dicHeaders,
|
|
61
62
|
formatter: a.dicFormatter,
|
|
@@ -92,14 +93,14 @@ function k(p) {
|
|
|
92
93
|
});
|
|
93
94
|
}
|
|
94
95
|
const g = (p) => {
|
|
95
|
-
let { url: t, query: o, method: i, resKey: e, props: a, formatter: c, headers:
|
|
96
|
-
r && (t = r.dicUrl, i = r.dicMethod,
|
|
96
|
+
let { url: t, query: o, method: i, resKey: e, props: a, formatter: c, headers: d = {}, value: s = "", column: r, form: h = {} } = p;
|
|
97
|
+
r && (t = r.dicUrl, i = r.dicMethod, d = r.headers || {}, o = r.dicQuery || {}, c = r.dicFormatter, a = r.props);
|
|
97
98
|
let m = "key";
|
|
98
99
|
t = t || "";
|
|
99
100
|
let u = [], y = {};
|
|
100
101
|
return u = t.match(/[^\{\}]+(?=\})/g) || [], u.forEach((n) => {
|
|
101
102
|
let f = `{{${n}}}`, l = h[n];
|
|
102
|
-
n === m ? t = t.replace(f,
|
|
103
|
+
n === m ? t = t.replace(f, s) : t = t.replace(f, l);
|
|
103
104
|
}), i === "post" && (u = Object.keys(o), u.forEach((n) => {
|
|
104
105
|
let f = o[n];
|
|
105
106
|
typeof f == "string" && f.match(/\{{|}}/g) ? y[n] = h[f.replace(/\{{|}}/g, "")] : y[n] = f;
|
|
@@ -109,14 +110,14 @@ const g = (p) => {
|
|
|
109
110
|
typeof c == "function" ? P = c(l.data) : P = x(l.data, e), n(P);
|
|
110
111
|
};
|
|
111
112
|
i === "post" ? window.axios.post(t, y, {
|
|
112
|
-
headers:
|
|
113
|
+
headers: d
|
|
113
114
|
}).then(function(l) {
|
|
114
115
|
f(l);
|
|
115
116
|
}).catch(() => [
|
|
116
117
|
n([])
|
|
117
118
|
]) : window.axios.get(t, {
|
|
118
119
|
params: o,
|
|
119
|
-
headers:
|
|
120
|
+
headers: d
|
|
120
121
|
}).then(function(l) {
|
|
121
122
|
f(l);
|
|
122
123
|
}).catch(() => [
|
|
@@ -125,8 +126,8 @@ const g = (p) => {
|
|
|
125
126
|
});
|
|
126
127
|
};
|
|
127
128
|
export {
|
|
128
|
-
|
|
129
|
-
b,
|
|
130
|
-
|
|
129
|
+
U as a,
|
|
130
|
+
F as b,
|
|
131
|
+
K as l,
|
|
131
132
|
g as s
|
|
132
133
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { y as r, k as i, D as a } from "./util.80e28481.js";
|
|
2
2
|
import { s as l } from "./slot.1b8d2b1b.js";
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { isBlank as s } from "@web-utils/core";
|
|
4
|
+
import { i as p } from "./dataformat.d3fd2d1b.js";
|
|
5
|
+
const f = {
|
|
5
6
|
mixins: [l],
|
|
6
7
|
data() {
|
|
7
8
|
return {
|
|
@@ -203,7 +204,7 @@ const d = {
|
|
|
203
204
|
created() {
|
|
204
205
|
this.initVal();
|
|
205
206
|
}
|
|
206
|
-
},
|
|
207
|
+
}, y = {
|
|
207
208
|
methods: {
|
|
208
209
|
bindEvent(t, e) {
|
|
209
210
|
e = Object.assign(e, { column: this.column }, this.tableData), typeof this[t] == "function" && (t === "change" ? this.column.cell !== !0 && this[t](e) : this[t](e)), this.$emit(t, e);
|
|
@@ -230,6 +231,6 @@ const d = {
|
|
|
230
231
|
}
|
|
231
232
|
};
|
|
232
233
|
export {
|
|
233
|
-
|
|
234
|
-
|
|
234
|
+
y as e,
|
|
235
|
+
f as p
|
|
235
236
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { s as
|
|
2
|
-
import {
|
|
1
|
+
import { s as a, l as n, a as h, b as r } from "./dic.79d9f595.js";
|
|
2
|
+
import { d, k as l } from "./util.80e28481.js";
|
|
3
3
|
import { s as c } from "./slot.1b8d2b1b.js";
|
|
4
|
-
|
|
4
|
+
import { isBlank as s } from "@web-utils/core";
|
|
5
|
+
const f = {
|
|
5
6
|
mixins: [c],
|
|
6
7
|
props: {
|
|
7
8
|
defaults: {
|
|
@@ -91,10 +92,10 @@ const O = {
|
|
|
91
92
|
},
|
|
92
93
|
updateDic(t, i) {
|
|
93
94
|
let e = this.findObject(this.propOption, t);
|
|
94
|
-
s(i) && s(t) ? this.handleLoadDic() : s(i) && !s(e.dicUrl) ?
|
|
95
|
+
s(i) && s(t) ? this.handleLoadDic() : s(i) && !s(e.dicUrl) ? a({
|
|
95
96
|
column: e
|
|
96
|
-
}).then((
|
|
97
|
-
this.$set(this.DIC, t,
|
|
97
|
+
}).then((o) => {
|
|
98
|
+
this.$set(this.DIC, t, o);
|
|
98
99
|
}) : this.$set(this.DIC, t, i);
|
|
99
100
|
},
|
|
100
101
|
handleSetDic(t, i = {}) {
|
|
@@ -117,5 +118,5 @@ const O = {
|
|
|
117
118
|
}
|
|
118
119
|
};
|
|
119
120
|
export {
|
|
120
|
-
|
|
121
|
+
f as i
|
|
121
122
|
};
|
|
@@ -1,57 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
let i = "";
|
|
4
|
-
switch (t) {
|
|
5
|
-
case "default":
|
|
6
|
-
i = "#35495E";
|
|
7
|
-
break;
|
|
8
|
-
case "primary":
|
|
9
|
-
i = "#3488ff";
|
|
10
|
-
break;
|
|
11
|
-
case "success":
|
|
12
|
-
i = "#43B883";
|
|
13
|
-
break;
|
|
14
|
-
case "warning":
|
|
15
|
-
i = "#e6a23c";
|
|
16
|
-
break;
|
|
17
|
-
case "danger":
|
|
18
|
-
i = "#f56c6c";
|
|
19
|
-
break;
|
|
20
|
-
}
|
|
21
|
-
return i;
|
|
22
|
-
}
|
|
23
|
-
s.capsule = function(t, i, a = "primary") {
|
|
24
|
-
console.log(
|
|
25
|
-
`%c ${t} %c ${i} %c`,
|
|
26
|
-
"background:#35495E; padding: 1px; border-radius: 3px 0 0 3px; color: #fff;",
|
|
27
|
-
`background:${l(
|
|
28
|
-
a
|
|
29
|
-
)}; padding: 1px; border-radius: 0 3px 3px 0; color: #fff;`,
|
|
30
|
-
"background:transparent"
|
|
31
|
-
);
|
|
32
|
-
};
|
|
33
|
-
s.colorful = function(t) {
|
|
34
|
-
console.log(
|
|
35
|
-
`%c${t.map((i) => i.text || "").join("%c")}`,
|
|
36
|
-
...t.map((i) => `color: ${l(i.type)};`)
|
|
37
|
-
);
|
|
38
|
-
};
|
|
39
|
-
s.default = function(t) {
|
|
40
|
-
s.colorful([{ text: t }]);
|
|
41
|
-
};
|
|
42
|
-
s.primary = function(t) {
|
|
43
|
-
s.colorful([{ text: t, type: "primary" }]);
|
|
44
|
-
};
|
|
45
|
-
s.success = function(t) {
|
|
46
|
-
s.colorful([{ text: t, type: "success" }]);
|
|
47
|
-
};
|
|
48
|
-
s.warning = function(t) {
|
|
49
|
-
s.colorful([{ text: t, type: "warning" }]);
|
|
50
|
-
};
|
|
51
|
-
s.danger = function(t) {
|
|
52
|
-
s.colorful([{ text: t, type: "danger" }]);
|
|
53
|
-
};
|
|
54
|
-
const c = {
|
|
1
|
+
import { createLogger as l } from "@web-utils/core";
|
|
2
|
+
const a = {
|
|
55
3
|
AliOSS: {
|
|
56
4
|
url: "https://cdn.staticfile.org/ali-oss/6.17.1/aliyun-oss-sdk.min.js",
|
|
57
5
|
title: "阿里云云图片上传,需引入OSS的sdk",
|
|
@@ -100,13 +48,9 @@ const c = {
|
|
|
100
48
|
github: "https://github.com/Colingo/mock"
|
|
101
49
|
}
|
|
102
50
|
}, o = (() => ({
|
|
103
|
-
logs: function(
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
t,
|
|
107
|
-
i.title,
|
|
108
|
-
"warning"
|
|
109
|
-
), s.warning("CDN:" + (i.url || "-")), s.warning("GITHUB:" + (i.github || "-"));
|
|
51
|
+
logs: function(s) {
|
|
52
|
+
const t = a[s], i = l(s);
|
|
53
|
+
i.warning(t.title), i.warning("CDN:" + (t.url || "-")), i.warning("GITHUB:" + (t.github || "-"));
|
|
110
54
|
}
|
|
111
55
|
}))();
|
|
112
56
|
export {
|