general-basic-form 2.0.45 → 2.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -7
- package/dist/index.js +471 -339
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## 一个兼容 Vue2 、Vue3 和 React(未来实现) 的表单组件,支持typescript,vue2请使用@1版本,Vue3请使用@2版本
|
|
4
4
|
|
|
5
|
-
| 组件\兼容性 | vue2 | vue3 |
|
|
6
|
-
| ------------------- | ---- | ---- |
|
|
7
|
-
| VGeneralBasicForm | √ | √ |
|
|
8
|
-
| VSearchBox | √ | |
|
|
9
|
-
| VInfiniteScrollList | | √ |
|
|
10
|
-
| VDescriptions | | √ |
|
|
5
|
+
| 组件\兼容性 | vue2 | vue3 | Ant Design Vue | Element Plus | Element(ui) |
|
|
6
|
+
| ------------------- | ---- | ---- | ---- | ---- | ---- |
|
|
7
|
+
| VGeneralBasicForm | √ | √ | | √ | √ |
|
|
8
|
+
| VSearchBox | √ | | | | √ |
|
|
9
|
+
| VInfiniteScrollList | | √ | | √ | |
|
|
10
|
+
| VDescriptions | | √ | | √ | |
|
|
11
|
+
| VInputMobilecVerification | | √ | √ | √ | |
|
|
12
|
+
| VInputGraphicVerification | | √ | √ | √ | |
|
|
11
13
|
|
|
12
14
|
示例:
|
|
13
15
|
|
|
@@ -233,7 +235,7 @@ getList会传出默认的参数,首次请求时会有页数和分页大小,重
|
|
|
233
235
|
message: '请输入手机验证码',
|
|
234
236
|
trigger: 'blur'
|
|
235
237
|
}
|
|
236
|
-
]
|
|
238
|
+
],
|
|
237
239
|
getSmscode,// 获取验证码的回调函数,获取失败必须返回false,否则计时器不会重新计算
|
|
238
240
|
},
|
|
239
241
|
{
|
|
@@ -535,5 +537,19 @@ formItem:[ {
|
|
|
535
537
|
descriptionsItemProps:el-descriptions-item的配置
|
|
536
538
|
```
|
|
537
539
|
|
|
540
|
+
# VInputMobilecVerification,VInputGraphicVerification表单里的图形验证码、手机验证码组件,可以单独引入
|
|
541
|
+
|
|
542
|
+
```
|
|
543
|
+
<VInputGraphicVerification class="VInputGraphicVerification" :item="{同表单}" componentType="Ant Design Vue" :loading="loading"></VInputGraphicVerification>
|
|
544
|
+
<VInputMobilecVerification class="VInputGraphicVerification" :item="{同表单}" componentType="Ant Design Vue"></VInputMobilecVerification>
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
componentType:
|
|
548
|
+
|
|
549
|
+
"Ant Design Vue"
|
|
550
|
+
|
|
551
|
+
"Element Plus" (默认)
|
|
552
|
+
|
|
538
553
|
安装:npm i general-basic-form<br/>
|
|
539
554
|
install: npm i general-basic-form
|
|
555
|
+
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as b, inject as
|
|
2
|
-
import { useRoute as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as b, inject as f, resolveComponent as d, openBlock as o, createBlock as c, mergeProps as v, withKeys as Z, createSlots as Q, renderList as I, withCtx as _, resolveDynamicComponent as E, createCommentVNode as h, ref as $, unref as m, onMounted as le, createElementBlock as k, computed as G, shallowRef as X, onBeforeUnmount as ue, normalizeStyle as ce, createTextVNode as D, toDisplayString as R, h as J, normalizeProps as pe, guardReactiveProps as me, Fragment as L, provide as O, resolveDirective as j, withDirectives as A, renderSlot as K, createVNode as ee, vShow as de, watch as fe, createElementVNode as ye } from "vue";
|
|
2
|
+
import { useRoute as _e } from "vue-router";
|
|
3
|
+
const Y = {
|
|
4
4
|
placeholder: "请输入",
|
|
5
5
|
style: "width: 200px",
|
|
6
6
|
clearable: !0
|
|
7
|
-
},
|
|
7
|
+
}, he = {
|
|
8
8
|
style: "width: 227px",
|
|
9
9
|
"start-placeholder": "开始日期",
|
|
10
10
|
"end-placeholder": "结束日期",
|
|
11
11
|
type: "daterange"
|
|
12
|
-
},
|
|
12
|
+
}, te = {
|
|
13
13
|
placeholder: "请选择",
|
|
14
14
|
filterable: !0,
|
|
15
15
|
clearable: !0,
|
|
16
16
|
style: "width: 200px"
|
|
17
|
-
},
|
|
17
|
+
}, ge = b({
|
|
18
18
|
components: {
|
|
19
19
|
InputArchive: (e) => {
|
|
20
20
|
const { templateEle: t } = e;
|
|
@@ -26,13 +26,13 @@ const X = {
|
|
|
26
26
|
// null就是any
|
|
27
27
|
},
|
|
28
28
|
setup() {
|
|
29
|
-
const e =
|
|
30
|
-
return { queryParams: e, getList: t, size:
|
|
29
|
+
const e = f("queryParams", {}), t = f("getList"), n = f("size");
|
|
30
|
+
return { queryParams: e, getList: t, size: n };
|
|
31
31
|
},
|
|
32
32
|
data() {
|
|
33
33
|
return {
|
|
34
34
|
inputSetting: {
|
|
35
|
-
...
|
|
35
|
+
...Y,
|
|
36
36
|
...this.item.inputSetting,
|
|
37
37
|
...this.item.setting
|
|
38
38
|
}
|
|
@@ -55,143 +55,273 @@ const X = {
|
|
|
55
55
|
// console.log(val);
|
|
56
56
|
// },
|
|
57
57
|
// },
|
|
58
|
-
}),
|
|
59
|
-
const
|
|
60
|
-
for (const [
|
|
61
|
-
|
|
62
|
-
return
|
|
58
|
+
}), x = (e, t) => {
|
|
59
|
+
const n = e.__vccOpts || e;
|
|
60
|
+
for (const [l, s] of t)
|
|
61
|
+
n[l] = s;
|
|
62
|
+
return n;
|
|
63
63
|
};
|
|
64
|
-
function
|
|
65
|
-
const
|
|
66
|
-
return
|
|
67
|
-
onKeydown:
|
|
64
|
+
function ve(e, t, n, l, s, i) {
|
|
65
|
+
const u = d("el-input");
|
|
66
|
+
return o(), c(u, v({
|
|
67
|
+
onKeydown: Z(e.getList, ["enter"]),
|
|
68
68
|
modelValue: e.queryParams[e.item.prop],
|
|
69
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
69
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => e.queryParams[e.item.prop] = r),
|
|
70
70
|
size: e.size
|
|
71
|
-
}, e.inputSetting),
|
|
72
|
-
|
|
73
|
-
name:
|
|
74
|
-
fn:
|
|
75
|
-
|
|
76
|
-
key:
|
|
77
|
-
templateEle:
|
|
78
|
-
}, null, 8, ["templateEle"])) :
|
|
71
|
+
}, e.inputSetting), Q({ _: 2 }, [
|
|
72
|
+
I(e.item.template, (r, a) => ({
|
|
73
|
+
name: a,
|
|
74
|
+
fn: _(() => [
|
|
75
|
+
r ? (o(), c(E(e.currentInputComponent()), {
|
|
76
|
+
key: a,
|
|
77
|
+
templateEle: r
|
|
78
|
+
}, null, 8, ["templateEle"])) : h("", !0)
|
|
79
79
|
])
|
|
80
80
|
}))
|
|
81
81
|
]), 1040, ["onKeydown", "modelValue", "size"]);
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const U = /* @__PURE__ */ x(ge, [["render", ve]]), be = /* @__PURE__ */ b({
|
|
84
84
|
__name: "index",
|
|
85
85
|
props: {
|
|
86
86
|
item: {}
|
|
87
87
|
},
|
|
88
88
|
setup(e) {
|
|
89
|
-
const t =
|
|
90
|
-
...
|
|
89
|
+
const t = f("queryParams", {}), n = f("size"), l = $({
|
|
90
|
+
...Y,
|
|
91
91
|
...e.item.inputSetting,
|
|
92
92
|
...e.item.setting
|
|
93
93
|
});
|
|
94
|
-
return (
|
|
95
|
-
const
|
|
96
|
-
return
|
|
97
|
-
modelValue:
|
|
98
|
-
"onUpdate:modelValue":
|
|
99
|
-
size:
|
|
100
|
-
},
|
|
94
|
+
return (s, i) => {
|
|
95
|
+
const u = d("el-input-number");
|
|
96
|
+
return o(), c(u, v({
|
|
97
|
+
modelValue: m(t)[s.item.prop],
|
|
98
|
+
"onUpdate:modelValue": i[0] || (i[0] = (r) => m(t)[s.item.prop] = r),
|
|
99
|
+
size: m(n)
|
|
100
|
+
}, l.value), null, 16, ["modelValue", "size"]);
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
}),
|
|
103
|
+
}), ke = b({
|
|
104
|
+
components: {
|
|
105
|
+
InputArchive: (e) => {
|
|
106
|
+
const { templateEle: t } = e;
|
|
107
|
+
return t();
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
props: {
|
|
111
|
+
item: null
|
|
112
|
+
// null就是any
|
|
113
|
+
},
|
|
114
|
+
setup() {
|
|
115
|
+
const e = f("queryParams", {}), t = f("getList", () => {
|
|
116
|
+
}), n = f("size");
|
|
117
|
+
return { queryParams: e, getList: t, size: n };
|
|
118
|
+
},
|
|
119
|
+
data() {
|
|
120
|
+
return {
|
|
121
|
+
inputSetting: {
|
|
122
|
+
...Y,
|
|
123
|
+
...this.item.inputSetting,
|
|
124
|
+
...this.item.setting
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
},
|
|
128
|
+
// created() {
|
|
129
|
+
// console.log("new", this.item);
|
|
130
|
+
// console.log("new", this.inputSetting);
|
|
131
|
+
// },
|
|
132
|
+
methods: {
|
|
133
|
+
currentInputComponent() {
|
|
134
|
+
return "input-archive";
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
// watch: {
|
|
138
|
+
// item(val) {
|
|
139
|
+
// console.log("item", val);
|
|
140
|
+
// },
|
|
141
|
+
// size(val) {
|
|
142
|
+
// console.log(val);
|
|
143
|
+
// },
|
|
144
|
+
// },
|
|
145
|
+
});
|
|
146
|
+
function $e(e, t, n, l, s, i) {
|
|
147
|
+
const u = d("a-input");
|
|
148
|
+
return o(), c(u, v({
|
|
149
|
+
onKeydown: Z(e.getList, ["enter"]),
|
|
150
|
+
modelValue: e.queryParams[e.item.prop],
|
|
151
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => e.queryParams[e.item.prop] = r),
|
|
152
|
+
size: e.size
|
|
153
|
+
}, e.inputSetting), Q({ _: 2 }, [
|
|
154
|
+
I(e.item.template, (r, a) => ({
|
|
155
|
+
name: a,
|
|
156
|
+
fn: _(() => [
|
|
157
|
+
r ? (o(), c(E(e.currentInputComponent()), {
|
|
158
|
+
key: a,
|
|
159
|
+
templateEle: r
|
|
160
|
+
}, null, 8, ["templateEle"])) : h("", !0)
|
|
161
|
+
])
|
|
162
|
+
}))
|
|
163
|
+
]), 1040, ["onKeydown", "modelValue", "size"]);
|
|
164
|
+
}
|
|
165
|
+
const ne = /* @__PURE__ */ x(ke, [["render", $e]]), oe = Symbol(), Se = /* @__PURE__ */ b({
|
|
104
166
|
__name: "index",
|
|
105
167
|
props: {
|
|
106
|
-
|
|
168
|
+
imgSrc: {}
|
|
169
|
+
},
|
|
170
|
+
setup(e) {
|
|
171
|
+
const t = $();
|
|
172
|
+
return le(() => {
|
|
173
|
+
console.log("onMounted");
|
|
174
|
+
const n = new Image(), l = [], s = 8, i = 8;
|
|
175
|
+
let u = 0, r = 0;
|
|
176
|
+
const a = 300, g = t.value, P = g.getContext("2d");
|
|
177
|
+
n.onload = function() {
|
|
178
|
+
g.width = n.width, g.height = n.height, r = Math.floor(n.width / s), u = Math.floor(n.height / i), q(), w();
|
|
179
|
+
}, n.src = e.imgSrc;
|
|
180
|
+
const q = () => {
|
|
181
|
+
for (let z = 0; z < i; z++)
|
|
182
|
+
for (let y = 0; y < s; y++)
|
|
183
|
+
l.push({
|
|
184
|
+
x: r * y,
|
|
185
|
+
y: u * z,
|
|
186
|
+
offsetX: (Math.random() - 0.5) * a,
|
|
187
|
+
offsetY: (Math.random() - 0.5) * a
|
|
188
|
+
});
|
|
189
|
+
}, w = () => {
|
|
190
|
+
P.clearRect(0, 0, g.width, g.height);
|
|
191
|
+
let z = !0;
|
|
192
|
+
l.forEach((y, B) => {
|
|
193
|
+
P.drawImage(n, y.x, y.y, r, u, y.x + y.offsetX, y.y + y.offsetY, r, u), Math.abs(y.offsetX) > 0.5 && (z = !1, y.offsetX *= 0.95), Math.abs(y.offsetY) > 0.5 && (y.offsetY *= 0.95, z = !1);
|
|
194
|
+
}), z ? setTimeout(() => {
|
|
195
|
+
q(), w();
|
|
196
|
+
}, 300) : requestAnimationFrame(w);
|
|
197
|
+
};
|
|
198
|
+
}), (n, l) => (o(), k("canvas", {
|
|
199
|
+
ref_key: "loadingCanvas",
|
|
200
|
+
ref: t
|
|
201
|
+
}, null, 512));
|
|
202
|
+
}
|
|
203
|
+
}), Pe = { class: "input-graphic-verification" }, ze = ["src", "alt"], Ve = /* @__PURE__ */ b({
|
|
204
|
+
__name: "index",
|
|
205
|
+
props: {
|
|
206
|
+
item: {},
|
|
207
|
+
componentType: { default: "Element Plus" },
|
|
208
|
+
loading: { type: Boolean, default: !1 }
|
|
107
209
|
},
|
|
108
210
|
setup(e) {
|
|
109
211
|
const {
|
|
110
212
|
graphicSrc: t = "",
|
|
111
|
-
graphicAlt:
|
|
112
|
-
getGraphic:
|
|
213
|
+
graphicAlt: n = "",
|
|
214
|
+
getGraphic: l = () => {
|
|
113
215
|
},
|
|
114
|
-
key:
|
|
115
|
-
} = e.item, { formLoading:
|
|
116
|
-
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
216
|
+
key: s
|
|
217
|
+
} = e.item, { formLoading: i } = f(oe, !1), u = G(() => (i == null ? void 0 : i.value) || e.loading), r = async () => {
|
|
218
|
+
l && !(u != null && u.value) && await l();
|
|
219
|
+
}, a = X(U);
|
|
220
|
+
switch (e.componentType) {
|
|
221
|
+
case "Element Plus":
|
|
222
|
+
a.value = U;
|
|
223
|
+
break;
|
|
224
|
+
case "Ant Design Vue":
|
|
225
|
+
a.value = ne;
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
return (g, P) => (o(), k("div", Pe, [
|
|
229
|
+
(o(), c(E(a.value), {
|
|
230
|
+
item: g.item,
|
|
231
|
+
class: "input"
|
|
232
|
+
}, null, 8, ["item"])),
|
|
233
|
+
u.value ? (o(), c(Se, {
|
|
234
|
+
key: 0,
|
|
235
|
+
class: "graphic",
|
|
236
|
+
imgSrc: m(t)
|
|
237
|
+
}, null, 8, ["imgSrc"])) : (o(), k("img", {
|
|
238
|
+
key: 1,
|
|
239
|
+
class: "graphic",
|
|
240
|
+
onClick: r,
|
|
241
|
+
src: m(t),
|
|
242
|
+
alt: m(n) || `${m(s)}`
|
|
243
|
+
}, null, 8, ze))
|
|
244
|
+
]));
|
|
135
245
|
}
|
|
136
246
|
});
|
|
137
|
-
const
|
|
247
|
+
const re = /* @__PURE__ */ x(Ve, [["__scopeId", "data-v-f76fdd37"]]), F = "获取验证码", Ie = 60, qe = /* @__PURE__ */ b({
|
|
138
248
|
__name: "verification-button",
|
|
139
249
|
props: {
|
|
140
|
-
getSmscode: { type: Function }
|
|
250
|
+
getSmscode: { type: Function },
|
|
251
|
+
componentType: { default: "Element Plus" }
|
|
141
252
|
},
|
|
142
253
|
setup(e) {
|
|
143
|
-
const t =
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
254
|
+
const t = $(F), n = $(null), l = G(() => t.value === F), s = X("el-button");
|
|
255
|
+
switch (console.log(e.componentType), e.componentType) {
|
|
256
|
+
case "Element Plus":
|
|
257
|
+
s.value = "el-button";
|
|
258
|
+
break;
|
|
259
|
+
case "Ant Design Vue":
|
|
260
|
+
s.value = "a-button";
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
const i = () => {
|
|
264
|
+
n && (clearInterval(n.value), n.value = null, t.value = F);
|
|
265
|
+
}, u = async () => {
|
|
266
|
+
if (t.value === F)
|
|
267
|
+
if (t.value = Ie, n.value = setInterval(() => {
|
|
148
268
|
if (Number(t.value) <= 0 || !t.value) {
|
|
149
|
-
|
|
269
|
+
i();
|
|
150
270
|
return;
|
|
151
271
|
} else
|
|
152
272
|
t.value = Number(t.value) - 1;
|
|
153
273
|
}, 1e3), e.getSmscode)
|
|
154
|
-
await e.getSmscode() === !1 &&
|
|
274
|
+
await e.getSmscode() === !1 && i();
|
|
155
275
|
else
|
|
156
276
|
return;
|
|
157
277
|
};
|
|
158
|
-
return
|
|
159
|
-
|
|
160
|
-
}), (
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
_: 1
|
|
174
|
-
}, 8, ["style"]);
|
|
175
|
-
};
|
|
278
|
+
return ue(() => {
|
|
279
|
+
i();
|
|
280
|
+
}), (r, a) => (o(), c(E(s.value), {
|
|
281
|
+
class: "verifiaction-button",
|
|
282
|
+
style: ce({
|
|
283
|
+
color: l.value ? "var(--color-primary, #409EFF)" : "var(--text-color-placeholder, #A8ABB2)",
|
|
284
|
+
cursor: l.value ? "pointer" : "default"
|
|
285
|
+
}),
|
|
286
|
+
onClick: u
|
|
287
|
+
}, {
|
|
288
|
+
default: _(() => [
|
|
289
|
+
D(R(l.value ? F : t.value + "s"), 1)
|
|
290
|
+
]),
|
|
291
|
+
_: 1
|
|
292
|
+
}, 8, ["style"]));
|
|
176
293
|
}
|
|
177
294
|
});
|
|
178
|
-
const
|
|
295
|
+
const H = /* @__PURE__ */ x(qe, [["__scopeId", "data-v-2477efb7"]]), se = /* @__PURE__ */ b({
|
|
179
296
|
__name: "index",
|
|
180
297
|
props: {
|
|
181
|
-
item: {}
|
|
298
|
+
item: {},
|
|
299
|
+
componentType: { default: "Element Plus" }
|
|
182
300
|
},
|
|
183
301
|
setup(e) {
|
|
184
|
-
const t = e.item;
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
302
|
+
const t = e.item, n = X(U);
|
|
303
|
+
switch (e.componentType) {
|
|
304
|
+
case "Element Plus":
|
|
305
|
+
n.value = U, t.template = {
|
|
306
|
+
append: () => J(H, {
|
|
307
|
+
getSmscode: t.getSmscode
|
|
308
|
+
})
|
|
309
|
+
};
|
|
310
|
+
break;
|
|
311
|
+
case "Ant Design Vue":
|
|
312
|
+
n.value = ne, t.template = {
|
|
313
|
+
addonAfter: () => J(H, {
|
|
314
|
+
getSmscode: t.getSmscode
|
|
315
|
+
})
|
|
316
|
+
};
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
319
|
+
return (l, s) => (o(), c(E(n.value), {
|
|
320
|
+
item: m(t),
|
|
191
321
|
class: "input"
|
|
192
322
|
}, null, 8, ["item"]));
|
|
193
323
|
}
|
|
194
|
-
}),
|
|
324
|
+
}), we = b({
|
|
195
325
|
components: {
|
|
196
326
|
slotArchive: (e) => {
|
|
197
327
|
const { templateEle: t } = e;
|
|
@@ -218,45 +348,45 @@ const ke = /* @__PURE__ */ w(be, [["__scopeId", "data-v-4074e137"]]), Se = /* @_
|
|
|
218
348
|
}
|
|
219
349
|
}
|
|
220
350
|
});
|
|
221
|
-
function
|
|
222
|
-
const
|
|
223
|
-
return
|
|
224
|
-
|
|
225
|
-
name:
|
|
226
|
-
fn:
|
|
227
|
-
|
|
228
|
-
key:
|
|
229
|
-
templateEle:
|
|
230
|
-
}, null, 8, ["templateEle"])) :
|
|
351
|
+
function Ce(e, t, n, l, s, i) {
|
|
352
|
+
const u = d("el-divider");
|
|
353
|
+
return o(), c(u, pe(me(e.dividerSetting)), Q({ _: 2 }, [
|
|
354
|
+
I(e.item.template, (r, a) => ({
|
|
355
|
+
name: a,
|
|
356
|
+
fn: _(() => [
|
|
357
|
+
r ? (o(), c(E(e.currentInputComponent()), {
|
|
358
|
+
key: a,
|
|
359
|
+
templateEle: r
|
|
360
|
+
}, null, 8, ["templateEle"])) : h("", !0)
|
|
231
361
|
])
|
|
232
362
|
}))
|
|
233
363
|
]), 1040);
|
|
234
364
|
}
|
|
235
|
-
const
|
|
365
|
+
const De = /* @__PURE__ */ x(we, [["render", Ce]]), Le = /* @__PURE__ */ b({
|
|
236
366
|
__name: "index",
|
|
237
367
|
props: {
|
|
238
368
|
item: {}
|
|
239
369
|
},
|
|
240
370
|
setup(e) {
|
|
241
|
-
const t =
|
|
371
|
+
const t = f("queryParams", {}), n = f("size"), l = $({
|
|
242
372
|
...e.item.radioGroupSetting,
|
|
243
373
|
...e.item.setting
|
|
244
374
|
});
|
|
245
|
-
return (
|
|
246
|
-
const
|
|
247
|
-
return
|
|
248
|
-
modelValue:
|
|
249
|
-
"onUpdate:modelValue":
|
|
250
|
-
size:
|
|
251
|
-
},
|
|
252
|
-
default:
|
|
253
|
-
(
|
|
254
|
-
size:
|
|
255
|
-
key:
|
|
375
|
+
return (s, i) => {
|
|
376
|
+
const u = d("el-radio"), r = d("el-radio-group");
|
|
377
|
+
return o(), c(r, v({
|
|
378
|
+
modelValue: m(t)[s.item.prop],
|
|
379
|
+
"onUpdate:modelValue": i[0] || (i[0] = (a) => m(t)[s.item.prop] = a),
|
|
380
|
+
size: m(n)
|
|
381
|
+
}, l.value), {
|
|
382
|
+
default: _(() => [
|
|
383
|
+
(o(!0), k(L, null, I(s.item.option || [], (a) => (o(), c(u, v({
|
|
384
|
+
size: m(n),
|
|
385
|
+
key: a.value,
|
|
256
386
|
ref_for: !0
|
|
257
|
-
},
|
|
258
|
-
default:
|
|
259
|
-
|
|
387
|
+
}, a), {
|
|
388
|
+
default: _(() => [
|
|
389
|
+
D(R(a.label), 1)
|
|
260
390
|
]),
|
|
261
391
|
_: 2
|
|
262
392
|
}, 1040, ["size"]))), 128))
|
|
@@ -265,31 +395,31 @@ const Pe = /* @__PURE__ */ w(ze, [["render", $e]]), qe = /* @__PURE__ */ b({
|
|
|
265
395
|
}, 16, ["modelValue", "size"]);
|
|
266
396
|
};
|
|
267
397
|
}
|
|
268
|
-
}),
|
|
398
|
+
}), xe = /* @__PURE__ */ b({
|
|
269
399
|
__name: "index",
|
|
270
400
|
props: {
|
|
271
401
|
item: {}
|
|
272
402
|
},
|
|
273
403
|
setup(e) {
|
|
274
|
-
const t =
|
|
404
|
+
const t = f("queryParams", {}), n = f("size"), l = $({
|
|
275
405
|
...e.item.checkboxGroupSetting,
|
|
276
406
|
...e.item.setting
|
|
277
407
|
});
|
|
278
|
-
return (
|
|
279
|
-
const
|
|
280
|
-
return
|
|
281
|
-
modelValue:
|
|
282
|
-
"onUpdate:modelValue":
|
|
283
|
-
size:
|
|
284
|
-
},
|
|
285
|
-
default:
|
|
286
|
-
(
|
|
287
|
-
size:
|
|
288
|
-
key:
|
|
408
|
+
return (s, i) => {
|
|
409
|
+
const u = d("el-checkbox"), r = d("el-checkbox-group");
|
|
410
|
+
return o(), c(r, v({
|
|
411
|
+
modelValue: m(t)[s.item.prop],
|
|
412
|
+
"onUpdate:modelValue": i[0] || (i[0] = (a) => m(t)[s.item.prop] = a),
|
|
413
|
+
size: m(n)
|
|
414
|
+
}, l.value), {
|
|
415
|
+
default: _(() => [
|
|
416
|
+
(o(!0), k(L, null, I(s.item.option || [], (a) => (o(), c(u, v({
|
|
417
|
+
size: m(n),
|
|
418
|
+
key: a.value,
|
|
289
419
|
ref_for: !0
|
|
290
|
-
},
|
|
291
|
-
default:
|
|
292
|
-
|
|
420
|
+
}, a), {
|
|
421
|
+
default: _(() => [
|
|
422
|
+
D(R(a.label), 1)
|
|
293
423
|
]),
|
|
294
424
|
_: 2
|
|
295
425
|
}, 1040, ["size"]))), 128))
|
|
@@ -298,88 +428,88 @@ const Pe = /* @__PURE__ */ w(ze, [["render", $e]]), qe = /* @__PURE__ */ b({
|
|
|
298
428
|
}, 16, ["modelValue", "size"]);
|
|
299
429
|
};
|
|
300
430
|
}
|
|
301
|
-
}),
|
|
431
|
+
}), Be = /* @__PURE__ */ b({
|
|
302
432
|
__name: "index",
|
|
303
433
|
props: {
|
|
304
434
|
item: {}
|
|
305
435
|
},
|
|
306
436
|
setup(e) {
|
|
307
|
-
const t =
|
|
308
|
-
...
|
|
437
|
+
const t = f("queryParams", {}), n = f("size"), l = $({
|
|
438
|
+
...he,
|
|
309
439
|
...e.item.datePackerSetting,
|
|
310
440
|
...e.item.setting
|
|
311
441
|
});
|
|
312
|
-
return (
|
|
313
|
-
const
|
|
314
|
-
return
|
|
315
|
-
modelValue:
|
|
316
|
-
"onUpdate:modelValue":
|
|
317
|
-
size:
|
|
318
|
-
},
|
|
442
|
+
return (s, i) => {
|
|
443
|
+
const u = d("el-date-picker");
|
|
444
|
+
return o(), c(u, v({
|
|
445
|
+
modelValue: m(t)[s.item.prop],
|
|
446
|
+
"onUpdate:modelValue": i[0] || (i[0] = (r) => m(t)[s.item.prop] = r),
|
|
447
|
+
size: m(n)
|
|
448
|
+
}, l.value), null, 16, ["modelValue", "size"]);
|
|
319
449
|
};
|
|
320
450
|
}
|
|
321
|
-
}),
|
|
451
|
+
}), Re = /* @__PURE__ */ b({
|
|
322
452
|
__name: "index",
|
|
323
453
|
props: {
|
|
324
454
|
item: {}
|
|
325
455
|
},
|
|
326
456
|
setup(e) {
|
|
327
|
-
const t =
|
|
328
|
-
...
|
|
457
|
+
const t = f("queryParams", {}), n = f("size"), l = $({
|
|
458
|
+
...te,
|
|
329
459
|
...e.item.selectSetting,
|
|
330
460
|
...e.item.setting
|
|
331
461
|
});
|
|
332
|
-
return (
|
|
333
|
-
const
|
|
334
|
-
return
|
|
335
|
-
modelValue:
|
|
336
|
-
"onUpdate:modelValue":
|
|
337
|
-
size:
|
|
338
|
-
},
|
|
339
|
-
default:
|
|
340
|
-
(
|
|
341
|
-
key:
|
|
462
|
+
return (s, i) => {
|
|
463
|
+
const u = d("el-option"), r = d("el-select");
|
|
464
|
+
return o(), c(r, v({
|
|
465
|
+
modelValue: m(t)[s.item.prop],
|
|
466
|
+
"onUpdate:modelValue": i[0] || (i[0] = (a) => m(t)[s.item.prop] = a),
|
|
467
|
+
size: m(n)
|
|
468
|
+
}, l.value), {
|
|
469
|
+
default: _(() => [
|
|
470
|
+
(o(!0), k(L, null, I(s.item.option || [], (a) => (o(), c(u, v({
|
|
471
|
+
key: a.value,
|
|
342
472
|
ref_for: !0
|
|
343
|
-
},
|
|
473
|
+
}, a), null, 16))), 128))
|
|
344
474
|
]),
|
|
345
475
|
_: 1
|
|
346
476
|
}, 16, ["modelValue", "size"]);
|
|
347
477
|
};
|
|
348
478
|
}
|
|
349
|
-
}),
|
|
479
|
+
}), Ee = /* @__PURE__ */ b({
|
|
350
480
|
__name: "index",
|
|
351
481
|
props: {
|
|
352
482
|
item: {}
|
|
353
483
|
},
|
|
354
484
|
setup(e) {
|
|
355
|
-
const t =
|
|
356
|
-
...
|
|
485
|
+
const t = f("queryParams", {}), n = f("size"), l = $({
|
|
486
|
+
...te,
|
|
357
487
|
...e.item.selectSetting,
|
|
358
488
|
...e.item.setting
|
|
359
489
|
});
|
|
360
|
-
return (
|
|
361
|
-
const
|
|
362
|
-
return
|
|
363
|
-
modelValue:
|
|
364
|
-
"onUpdate:modelValue":
|
|
365
|
-
size:
|
|
366
|
-
options:
|
|
367
|
-
},
|
|
490
|
+
return (s, i) => {
|
|
491
|
+
const u = d("el-cascader");
|
|
492
|
+
return o(), c(u, v({
|
|
493
|
+
modelValue: m(t)[s.item.prop],
|
|
494
|
+
"onUpdate:modelValue": i[0] || (i[0] = (r) => m(t)[s.item.prop] = r),
|
|
495
|
+
size: m(n),
|
|
496
|
+
options: s.item.options || []
|
|
497
|
+
}, l.value), null, 16, ["modelValue", "size", "options"]);
|
|
368
498
|
};
|
|
369
499
|
}
|
|
370
|
-
}),
|
|
500
|
+
}), Fe = b({
|
|
371
501
|
name: "GeneralBasicForm",
|
|
372
502
|
components: {
|
|
373
|
-
Input:
|
|
374
|
-
InputNumber:
|
|
375
|
-
InputGraphicVerification:
|
|
376
|
-
InputMobileVerification:
|
|
377
|
-
Divider:
|
|
378
|
-
Radio:
|
|
379
|
-
Checkbox:
|
|
380
|
-
DatePicker:
|
|
381
|
-
Select:
|
|
382
|
-
Cascader:
|
|
503
|
+
Input: U,
|
|
504
|
+
InputNumber: be,
|
|
505
|
+
InputGraphicVerification: re,
|
|
506
|
+
InputMobileVerification: se,
|
|
507
|
+
Divider: De,
|
|
508
|
+
Radio: Le,
|
|
509
|
+
Checkbox: xe,
|
|
510
|
+
DatePicker: Be,
|
|
511
|
+
Select: Re,
|
|
512
|
+
Cascader: Ee
|
|
383
513
|
},
|
|
384
514
|
props: {
|
|
385
515
|
showSearch: {
|
|
@@ -448,14 +578,14 @@ const Pe = /* @__PURE__ */ w(ze, [["render", $e]]), qe = /* @__PURE__ */ b({
|
|
|
448
578
|
};
|
|
449
579
|
},
|
|
450
580
|
setup(e) {
|
|
451
|
-
const { size: t, noUrlParameters:
|
|
452
|
-
...
|
|
581
|
+
const { size: t, noUrlParameters: n, getList: l } = e, s = _e(), i = $({
|
|
582
|
+
...n ? {} : s == null ? void 0 : s.query
|
|
453
583
|
});
|
|
454
584
|
return O(
|
|
455
585
|
/* 注入名 */
|
|
456
586
|
"queryParams",
|
|
457
587
|
/* 值 */
|
|
458
|
-
|
|
588
|
+
i
|
|
459
589
|
), O(
|
|
460
590
|
/* 注入名 */
|
|
461
591
|
"size",
|
|
@@ -465,9 +595,9 @@ const Pe = /* @__PURE__ */ w(ze, [["render", $e]]), qe = /* @__PURE__ */ b({
|
|
|
465
595
|
/* 注入名 */
|
|
466
596
|
"getList",
|
|
467
597
|
/* 值 */
|
|
468
|
-
|
|
598
|
+
l
|
|
469
599
|
), {
|
|
470
|
-
queryParams:
|
|
600
|
+
queryParams: i
|
|
471
601
|
};
|
|
472
602
|
},
|
|
473
603
|
watch: {
|
|
@@ -499,8 +629,8 @@ const Pe = /* @__PURE__ */ w(ze, [["render", $e]]), qe = /* @__PURE__ */ b({
|
|
|
499
629
|
provide() {
|
|
500
630
|
return {
|
|
501
631
|
// 显式提供一个计算属性
|
|
502
|
-
[
|
|
503
|
-
formLoading:
|
|
632
|
+
[oe]: {
|
|
633
|
+
formLoading: G(() => this.formLoading),
|
|
504
634
|
updateFormLoading: (e) => {
|
|
505
635
|
this.formLoading = e;
|
|
506
636
|
}
|
|
@@ -510,9 +640,9 @@ const Pe = /* @__PURE__ */ w(ze, [["render", $e]]), qe = /* @__PURE__ */ b({
|
|
|
510
640
|
methods: {
|
|
511
641
|
/** 搜索按钮操作 */
|
|
512
642
|
handleQuery() {
|
|
513
|
-
var
|
|
643
|
+
var n;
|
|
514
644
|
const e = { page: 1, limit: 10 }, t = {
|
|
515
|
-
...(
|
|
645
|
+
...(n = this.$route) == null ? void 0 : n.query,
|
|
516
646
|
...this.queryParams,
|
|
517
647
|
...e
|
|
518
648
|
};
|
|
@@ -534,111 +664,111 @@ const Pe = /* @__PURE__ */ w(ze, [["render", $e]]), qe = /* @__PURE__ */ b({
|
|
|
534
664
|
}, this.afterReset(), this.handleQuery();
|
|
535
665
|
},
|
|
536
666
|
getItemRules(e) {
|
|
537
|
-
const { type: t, rules:
|
|
538
|
-
return this.noInputBlank && t === "input" &&
|
|
667
|
+
const { type: t, rules: n = [] } = e, l = [...n];
|
|
668
|
+
return this.noInputBlank && t === "input" && l.push({
|
|
539
669
|
pattern: this.trimRegex,
|
|
540
670
|
message: "请输入(不能仅输入空格)",
|
|
541
671
|
trigger: "blur"
|
|
542
|
-
}),
|
|
672
|
+
}), l;
|
|
543
673
|
}
|
|
544
674
|
}
|
|
545
675
|
});
|
|
546
|
-
function
|
|
547
|
-
const
|
|
548
|
-
return
|
|
676
|
+
function Ae(e, t, n, l, s, i) {
|
|
677
|
+
const u = d("Input"), r = d("Radio"), a = d("Select"), g = d("Divider"), P = d("Cascader"), q = d("Checkbox"), w = d("DatePicker"), z = d("InputNumber"), y = d("InputMobileVerification"), B = d("InputGraphicVerification"), C = d("el-form-item"), T = d("el-button"), M = d("el-form"), S = j("loading");
|
|
678
|
+
return A((o(), c(M, v({
|
|
549
679
|
model: e.queryParams,
|
|
550
680
|
ref: "queryFormRef",
|
|
551
681
|
inline: "",
|
|
552
682
|
"label-position": "left",
|
|
553
683
|
"label-width": e.labelWidth
|
|
554
684
|
}, e.$attrs), {
|
|
555
|
-
default:
|
|
556
|
-
(
|
|
557
|
-
label:
|
|
558
|
-
prop:
|
|
559
|
-
key:
|
|
560
|
-
rules: e.getItemRules(
|
|
685
|
+
default: _(() => [
|
|
686
|
+
(o(!0), k(L, null, I(e.formItem, (p) => (o(), c(C, {
|
|
687
|
+
label: p.label,
|
|
688
|
+
prop: p.prop,
|
|
689
|
+
key: p.prop,
|
|
690
|
+
rules: e.getItemRules(p)
|
|
561
691
|
}, {
|
|
562
|
-
default:
|
|
563
|
-
i.type
|
|
692
|
+
default: _(() => [
|
|
693
|
+
/^input$/i.test(p.type) ? (o(), c(u, {
|
|
564
694
|
key: 0,
|
|
565
|
-
item:
|
|
566
|
-
}, null, 8, ["item"])) :
|
|
567
|
-
i.type
|
|
695
|
+
item: p
|
|
696
|
+
}, null, 8, ["item"])) : h("", !0),
|
|
697
|
+
/^radio$/i.test(p.type) ? (o(), c(r, {
|
|
568
698
|
key: 1,
|
|
569
|
-
item:
|
|
570
|
-
}, null, 8, ["item"])) :
|
|
571
|
-
i.type
|
|
699
|
+
item: p
|
|
700
|
+
}, null, 8, ["item"])) : h("", !0),
|
|
701
|
+
/^select$/i.test(p.type) ? (o(), c(a, {
|
|
572
702
|
key: 2,
|
|
573
|
-
item:
|
|
574
|
-
}, null, 8, ["item"])) :
|
|
575
|
-
i.type
|
|
703
|
+
item: p
|
|
704
|
+
}, null, 8, ["item"])) : h("", !0),
|
|
705
|
+
/^divider$/i.test(p.type) ? (o(), c(g, {
|
|
576
706
|
key: 3,
|
|
577
|
-
item:
|
|
578
|
-
}, null, 8, ["item"])) :
|
|
579
|
-
i.type
|
|
707
|
+
item: p
|
|
708
|
+
}, null, 8, ["item"])) : h("", !0),
|
|
709
|
+
/^cascader$/i.test(p.type) ? (o(), c(P, {
|
|
580
710
|
key: 4,
|
|
581
|
-
item:
|
|
582
|
-
}, null, 8, ["item"])) :
|
|
583
|
-
i.type
|
|
711
|
+
item: p
|
|
712
|
+
}, null, 8, ["item"])) : h("", !0),
|
|
713
|
+
/^checkbox$/i.test(p.type) ? (o(), c(q, {
|
|
584
714
|
key: 5,
|
|
585
|
-
item:
|
|
586
|
-
}, null, 8, ["item"])) :
|
|
587
|
-
i.type
|
|
715
|
+
item: p
|
|
716
|
+
}, null, 8, ["item"])) : h("", !0),
|
|
717
|
+
/^date-picker$/i.test(p.type) ? (o(), c(w, {
|
|
588
718
|
key: 6,
|
|
589
|
-
item:
|
|
590
|
-
}, null, 8, ["item"])) :
|
|
591
|
-
i.type
|
|
719
|
+
item: p
|
|
720
|
+
}, null, 8, ["item"])) : h("", !0),
|
|
721
|
+
/^input-number$/i.test(p.type) ? (o(), c(z, {
|
|
592
722
|
key: 7,
|
|
593
|
-
item:
|
|
594
|
-
}, null, 8, ["item"])) :
|
|
595
|
-
|
|
596
|
-
|
|
723
|
+
item: p
|
|
724
|
+
}, null, 8, ["item"])) : h("", !0),
|
|
725
|
+
/^form-item-slot$/i.test(p.type) ? K(e.$slots, p.name, { key: 8 }) : h("", !0),
|
|
726
|
+
/^input-mobile-verification$/i.test(p.type) ? (o(), c(y, {
|
|
597
727
|
key: 9,
|
|
598
|
-
item:
|
|
599
|
-
}, null, 8, ["item"])) :
|
|
600
|
-
|
|
601
|
-
item:
|
|
602
|
-
key:
|
|
603
|
-
}, null, 8, ["item"])) :
|
|
728
|
+
item: p
|
|
729
|
+
}, null, 8, ["item"])) : h("", !0),
|
|
730
|
+
/^input-graphic-verification$/i.test(p.type) ? (o(), c(B, {
|
|
731
|
+
item: p,
|
|
732
|
+
key: p.key
|
|
733
|
+
}, null, 8, ["item"])) : h("", !0)
|
|
604
734
|
]),
|
|
605
735
|
_: 2
|
|
606
736
|
}, 1032, ["label", "prop", "rules"]))), 128)),
|
|
607
|
-
|
|
608
|
-
e.formOnly ?
|
|
609
|
-
default:
|
|
610
|
-
|
|
737
|
+
K(e.$slots, "default"),
|
|
738
|
+
e.formOnly ? h("", !0) : (o(), c(C, { key: 0 }, {
|
|
739
|
+
default: _(() => [
|
|
740
|
+
A((o(), c(T, {
|
|
611
741
|
type: "primary",
|
|
612
742
|
size: e.size,
|
|
613
743
|
onClick: e.handleQuery
|
|
614
744
|
}, {
|
|
615
|
-
default:
|
|
616
|
-
|
|
745
|
+
default: _(() => t[0] || (t[0] = [
|
|
746
|
+
D("查询")
|
|
617
747
|
])),
|
|
618
748
|
_: 1
|
|
619
749
|
}, 8, ["size", "onClick"])), [
|
|
620
|
-
[
|
|
750
|
+
[S, e.formLoading]
|
|
621
751
|
]),
|
|
622
|
-
T
|
|
752
|
+
ee(T, {
|
|
623
753
|
size: e.size,
|
|
624
754
|
onClick: e.resetQuery
|
|
625
755
|
}, {
|
|
626
|
-
default:
|
|
627
|
-
|
|
756
|
+
default: _(() => t[1] || (t[1] = [
|
|
757
|
+
D("重置")
|
|
628
758
|
])),
|
|
629
759
|
_: 1
|
|
630
760
|
}, 8, ["size", "onClick"])
|
|
631
761
|
]),
|
|
632
762
|
_: 1
|
|
633
763
|
})),
|
|
634
|
-
|
|
764
|
+
K(e.$slots, "behind-the-button")
|
|
635
765
|
]),
|
|
636
766
|
_: 3
|
|
637
767
|
}, 16, ["model", "label-width"])), [
|
|
638
|
-
[
|
|
768
|
+
[de, e.showSearch]
|
|
639
769
|
]);
|
|
640
770
|
}
|
|
641
|
-
const
|
|
771
|
+
const Ue = /* @__PURE__ */ x(Fe, [["render", Ae]]), Te = ["infinite-scroll-disabled"], Ge = ["infinite-scroll-disabled"], Me = { class: "checkbox" }, Ne = /* @__PURE__ */ b({
|
|
642
772
|
__name: "InfiniteScrollList",
|
|
643
773
|
props: {
|
|
644
774
|
search: {
|
|
@@ -667,103 +797,103 @@ const xe = /* @__PURE__ */ w(De, [["render", we]]), Be = ["infinite-scroll-disab
|
|
|
667
797
|
}
|
|
668
798
|
},
|
|
669
799
|
setup(e, { expose: t }) {
|
|
670
|
-
const
|
|
671
|
-
const { i:
|
|
672
|
-
return
|
|
673
|
-
},
|
|
674
|
-
|
|
800
|
+
const n = e, { search: l, id: s, name: i, extra: u } = n, r = $([]), a = $(1), g = $(!1), P = $([]), q = $(!1), w = (S, p) => {
|
|
801
|
+
const { i: N } = S;
|
|
802
|
+
return u && u !== "false" ? u(N) : "";
|
|
803
|
+
}, z = (S) => {
|
|
804
|
+
P.value = S.map((p) => typeof p == "object" ? p[s] : p);
|
|
675
805
|
};
|
|
676
|
-
|
|
677
|
-
() =>
|
|
678
|
-
(
|
|
679
|
-
|
|
806
|
+
fe(
|
|
807
|
+
() => n.defaultSelection,
|
|
808
|
+
(S = [], p = []) => {
|
|
809
|
+
z(S);
|
|
680
810
|
},
|
|
681
811
|
{ immediate: !0 }
|
|
682
812
|
);
|
|
683
|
-
const
|
|
684
|
-
|
|
685
|
-
},
|
|
686
|
-
|
|
687
|
-
},
|
|
688
|
-
if (
|
|
813
|
+
const y = () => {
|
|
814
|
+
B(), P.value = [];
|
|
815
|
+
}, B = () => {
|
|
816
|
+
a.value = 1, r.value = [], g.value = !1;
|
|
817
|
+
}, C = async () => {
|
|
818
|
+
if (q.value || g.value)
|
|
689
819
|
return;
|
|
690
|
-
|
|
691
|
-
const
|
|
692
|
-
|
|
693
|
-
},
|
|
694
|
-
|
|
695
|
-
},
|
|
696
|
-
() =>
|
|
820
|
+
q.value = !0;
|
|
821
|
+
const S = await l(a.value);
|
|
822
|
+
S && S.length > 0 ? (r.value = [...r.value, ...S], a.value += 1) : g.value = !0, q.value = !1;
|
|
823
|
+
}, T = () => {
|
|
824
|
+
B(), C();
|
|
825
|
+
}, M = G(
|
|
826
|
+
() => r.value.filter((S) => P.value.includes(S[s]))
|
|
697
827
|
) || {};
|
|
698
828
|
return t({
|
|
699
|
-
reset:
|
|
700
|
-
lowReset:
|
|
701
|
-
loadList:
|
|
702
|
-
selectInfo:
|
|
703
|
-
list:
|
|
704
|
-
ifbottom:
|
|
705
|
-
refreshList:
|
|
706
|
-
}), (
|
|
707
|
-
const
|
|
708
|
-
return
|
|
829
|
+
reset: y,
|
|
830
|
+
lowReset: B,
|
|
831
|
+
loadList: C,
|
|
832
|
+
selectInfo: M,
|
|
833
|
+
list: r,
|
|
834
|
+
ifbottom: g,
|
|
835
|
+
refreshList: T
|
|
836
|
+
}), (S, p) => {
|
|
837
|
+
const N = d("el-checkbox"), ie = d("el-checkbox-group"), W = j("infinite-scroll"), ae = j("loading");
|
|
838
|
+
return n.checkbox ? A((o(), c(ie, v({
|
|
709
839
|
key: 0,
|
|
710
|
-
modelValue:
|
|
711
|
-
"onUpdate:modelValue":
|
|
712
|
-
},
|
|
713
|
-
default:
|
|
714
|
-
|
|
840
|
+
modelValue: P.value,
|
|
841
|
+
"onUpdate:modelValue": p[0] || (p[0] = (V) => P.value = V)
|
|
842
|
+
}, n), {
|
|
843
|
+
default: _(() => [
|
|
844
|
+
A((o(), k("ul", {
|
|
715
845
|
class: "list",
|
|
716
|
-
"infinite-scroll-disabled":
|
|
846
|
+
"infinite-scroll-disabled": g.value
|
|
717
847
|
}, [
|
|
718
|
-
(
|
|
719
|
-
key:
|
|
848
|
+
(o(!0), k(L, null, I(r.value, (V) => (o(), k("li", {
|
|
849
|
+
key: V[m(s)],
|
|
720
850
|
class: "list-item"
|
|
721
851
|
}, [
|
|
722
|
-
|
|
723
|
-
value:
|
|
852
|
+
ee(N, {
|
|
853
|
+
value: V[m(s)],
|
|
724
854
|
class: "checkbox"
|
|
725
855
|
}, {
|
|
726
|
-
default:
|
|
727
|
-
|
|
728
|
-
|
|
856
|
+
default: _(() => [
|
|
857
|
+
D(R(V[m(i)]) + " ", 1),
|
|
858
|
+
n.extra ? (o(), c(w, {
|
|
729
859
|
key: 0,
|
|
730
|
-
i:
|
|
731
|
-
}, null, 8, ["i"])) :
|
|
860
|
+
i: V
|
|
861
|
+
}, null, 8, ["i"])) : h("", !0)
|
|
732
862
|
]),
|
|
733
863
|
_: 2
|
|
734
864
|
}, 1032, ["value"])
|
|
735
865
|
]))), 128))
|
|
736
|
-
], 8,
|
|
737
|
-
[
|
|
866
|
+
], 8, Te)), [
|
|
867
|
+
[W, C]
|
|
738
868
|
])
|
|
739
869
|
]),
|
|
740
870
|
_: 1
|
|
741
871
|
}, 16, ["modelValue"])), [
|
|
742
|
-
[
|
|
743
|
-
]) :
|
|
872
|
+
[ae, q.value]
|
|
873
|
+
]) : A((o(), k("ul", v({
|
|
744
874
|
key: 1,
|
|
745
875
|
class: "list",
|
|
746
|
-
"infinite-scroll-disabled":
|
|
747
|
-
},
|
|
748
|
-
(
|
|
749
|
-
key:
|
|
876
|
+
"infinite-scroll-disabled": g.value
|
|
877
|
+
}, n), [
|
|
878
|
+
(o(!0), k(L, null, I(r.value, (V) => (o(), k("li", {
|
|
879
|
+
key: V[m(s)],
|
|
750
880
|
class: "list-item"
|
|
751
881
|
}, [
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
882
|
+
ye("div", Me, [
|
|
883
|
+
D(R(V[m(i)]) + " ", 1),
|
|
884
|
+
n.extra ? (o(), c(w, {
|
|
755
885
|
key: 0,
|
|
756
|
-
i:
|
|
757
|
-
}, null, 8, ["i"])) :
|
|
886
|
+
i: V
|
|
887
|
+
}, null, 8, ["i"])) : h("", !0)
|
|
758
888
|
])
|
|
759
889
|
]))), 128))
|
|
760
|
-
], 16,
|
|
761
|
-
[
|
|
890
|
+
], 16, Ge)), [
|
|
891
|
+
[W, C]
|
|
762
892
|
]);
|
|
763
893
|
};
|
|
764
894
|
}
|
|
765
895
|
});
|
|
766
|
-
const
|
|
896
|
+
const Oe = /* @__PURE__ */ x(Ne, [["__scopeId", "data-v-77737aab"]]), Ke = { key: 1 }, je = /* @__PURE__ */ b({
|
|
767
897
|
__name: "Descriptions",
|
|
768
898
|
props: {
|
|
769
899
|
formData: {
|
|
@@ -776,33 +906,33 @@ const Ge = /* @__PURE__ */ w(Ue, [["__scopeId", "data-v-77737aab"]]), Ne = { key
|
|
|
776
906
|
}
|
|
777
907
|
},
|
|
778
908
|
setup(e) {
|
|
779
|
-
const t = e,
|
|
780
|
-
const { i
|
|
781
|
-
return
|
|
782
|
-
row:
|
|
783
|
-
$index:
|
|
909
|
+
const t = e, n = (l, s) => {
|
|
910
|
+
const { i, render: u, formData: r } = l;
|
|
911
|
+
return u({
|
|
912
|
+
row: r,
|
|
913
|
+
$index: i
|
|
784
914
|
});
|
|
785
915
|
};
|
|
786
|
-
return (
|
|
787
|
-
const
|
|
788
|
-
return
|
|
916
|
+
return (l, s) => {
|
|
917
|
+
const i = d("el-descriptions-item"), u = d("el-descriptions");
|
|
918
|
+
return o(), c(u, v({
|
|
789
919
|
column: 1,
|
|
790
920
|
border: "",
|
|
791
921
|
class: "form-width"
|
|
792
922
|
}, t), {
|
|
793
|
-
default:
|
|
794
|
-
(
|
|
795
|
-
key:
|
|
796
|
-
label:
|
|
923
|
+
default: _(() => [
|
|
924
|
+
(o(!0), k(L, null, I(t.formItem, (r, a) => (o(), c(i, v({
|
|
925
|
+
key: r.prop,
|
|
926
|
+
label: r.label,
|
|
797
927
|
ref_for: !0
|
|
798
|
-
},
|
|
799
|
-
default:
|
|
800
|
-
|
|
928
|
+
}, r.descriptionsItemProps), {
|
|
929
|
+
default: _(() => [
|
|
930
|
+
r.render ? (o(), c(n, {
|
|
801
931
|
key: 0,
|
|
802
|
-
i:
|
|
803
|
-
render:
|
|
932
|
+
i: a,
|
|
933
|
+
render: r.render,
|
|
804
934
|
formData: e.formData
|
|
805
|
-
}, null, 8, ["i", "render", "formData"])) : (
|
|
935
|
+
}, null, 8, ["i", "render", "formData"])) : (o(), k("span", Ke, R(e.formData[r.prop]), 1))
|
|
806
936
|
]),
|
|
807
937
|
_: 2
|
|
808
938
|
}, 1040, ["label"]))), 128))
|
|
@@ -811,9 +941,11 @@ const Ge = /* @__PURE__ */ w(Ue, [["__scopeId", "data-v-77737aab"]]), Ne = { key
|
|
|
811
941
|
}, 16);
|
|
812
942
|
};
|
|
813
943
|
}
|
|
814
|
-
}),
|
|
944
|
+
}), Ye = Ue, We = Oe, Je = je, He = re, Ze = se;
|
|
815
945
|
export {
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
946
|
+
Je as VDescriptions,
|
|
947
|
+
Ye as VGeneralBasicForm,
|
|
948
|
+
We as VInfiniteScrollList,
|
|
949
|
+
He as VInputGraphicVerification,
|
|
950
|
+
Ze as VInputMobilecVerification
|
|
819
951
|
};
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(d,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],e):(d=typeof globalThis<"u"?globalThis:d||self,e(d.Index={},d.Vue,d["vue-router"]))})(this,function(d,e,I){"use strict";const z={placeholder:"请输入",style:"width: 200px",clearable:!0},L={style:"width: 227px","start-placeholder":"开始日期","end-placeholder":"结束日期",type:"daterange"},$={placeholder:"请选择",filterable:!0,clearable:!0,style:"width: 200px"},N=e.defineComponent({components:{InputArchive:t=>{const{templateEle:o}=t;return o()}},props:{item:null},setup(){const t=e.inject("queryParams",{}),o=e.inject("getList"),n=e.inject("size");return{queryParams:t,getList:o,size:n}},data(){return{inputSetting:{...z,...this.item.inputSetting,...this.item.setting}}},methods:{currentInputComponent(){return"input-archive"}}}),y=(t,o)=>{const n=t.__vccOpts||t;for(const[s,r]of o)n[s]=r;return n};function F(t,o,n,s,r,a){const p=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(p,e.mergeProps({onKeydown:e.withKeys(t.getList,["enter"]),modelValue:t.queryParams[t.item.prop],"onUpdate:modelValue":o[0]||(o[0]=l=>t.queryParams[t.item.prop]=l),size:t.size},t.inputSetting),e.createSlots({_:2},[e.renderList(t.item.template,(l,c)=>({name:c,fn:e.withCtx(()=>[l?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.currentInputComponent()),{key:c,templateEle:l},null,8,["templateEle"])):e.createCommentVNode("",!0)])}))]),1040,["onKeydown","modelValue","size"])}const V=y(N,[["render",F]]),E=e.defineComponent({__name:"index",props:{item:{}},setup(t){const o=e.inject("queryParams",{}),n=e.inject("size"),s=e.ref({...z,...t.item.inputSetting,...t.item.setting});return(r,a)=>{const p=e.resolveComponent("el-input-number");return e.openBlock(),e.createBlock(p,e.mergeProps({modelValue:e.unref(o)[r.item.prop],"onUpdate:modelValue":a[0]||(a[0]=l=>e.unref(o)[r.item.prop]=l),size:e.unref(n)},s.value),null,16,["modelValue","size"])}}}),q=Symbol(),j={class:"input-graphic-verification"},R=["src","alt"],U=e.defineComponent({__name:"index",props:{item:{}},setup(t){const{graphicSrc:o="",graphicAlt:n="",getGraphic:s=()=>{},key:r}=t.item,{formLoading:a,updateFormLoading:p}=e.inject(q),l=async()=>{s&&!a.value&&await s()};return(c,k)=>{const _=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createElementBlock("div",j,[e.createVNode(V,{item:c.item,class:"input"},null,8,["item"]),e.createElementVNode("img",{class:"graphic",onClick:l,src:e.unref(o),alt:e.unref(n)||`${e.unref(r)}`},null,8,R)])),[[_,e.unref(a)]])}}}),ke="",T=y(U,[["__scopeId","data-v-006751c3"]]),h="获取验证码",G=60,A=e.defineComponent({__name:"verification-button",props:{getSmscode:{type:Function}},setup(t){const o=e.ref(h),n=e.ref(null),s=e.computed(()=>o.value===h),r=()=>{n&&(clearInterval(n.value),n.value=null,o.value=h)},a=async()=>{if(o.value===h)if(o.value=G,n.value=setInterval(()=>{if(Number(o.value)<=0||!o.value){r();return}else o.value=Number(o.value)-1},1e3),t.getSmscode)await t.getSmscode()===!1&&r();else return};return e.onBeforeUnmount(()=>{r()}),(p,l)=>{const c=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(c,{class:"verifiaction-button",style:e.normalizeStyle({color:s.value?"var(--color-primary, #409EFF)":"var(--text-color-placeholder, #A8ABB2)",cursor:s.value?"pointer":"default"}),onClick:a},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value?h:o.value+"s"),1)]),_:1},8,["style"])}}}),_e="",O=y(A,[["__scopeId","data-v-4074e137"]]),Q=e.defineComponent({__name:"index",props:{item:{}},setup(t){const o=t.item;return o.template={append:()=>e.h(O,{getSmscode:o.getSmscode})},(n,s)=>(e.openBlock(),e.createBlock(V,{item:e.unref(o),class:"input"},null,8,["item"]))}}),K=e.defineComponent({components:{slotArchive:t=>{const{templateEle:o}=t;return o()}},props:{item:null},setup(){},data(){return{dividerSetting:{...this.item.dividerSetting,...this.item.setting}}},methods:{currentInputComponent(){return"slot-archive"}}});function M(t,o,n,s,r,a){const p=e.resolveComponent("el-divider");return e.openBlock(),e.createBlock(p,e.normalizeProps(e.guardReactiveProps(t.dividerSetting)),e.createSlots({_:2},[e.renderList(t.item.template,(l,c)=>({name:c,fn:e.withCtx(()=>[l?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.currentInputComponent()),{key:c,templateEle:l},null,8,["templateEle"])):e.createCommentVNode("",!0)])}))]),1040)}const J=y(K,[["render",M]]),W=e.defineComponent({__name:"index",props:{item:{}},setup(t){const o=e.inject("queryParams",{}),n=e.inject("size"),s=e.ref({...t.item.radioGroupSetting,...t.item.setting});return(r,a)=>{const p=e.resolveComponent("el-radio"),l=e.resolveComponent("el-radio-group");return e.openBlock(),e.createBlock(l,e.mergeProps({modelValue:e.unref(o)[r.item.prop],"onUpdate:modelValue":a[0]||(a[0]=c=>e.unref(o)[r.item.prop]=c),size:e.unref(n)},s.value),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.item.option||[],c=>(e.openBlock(),e.createBlock(p,e.mergeProps({size:e.unref(n),key:c.value,ref_for:!0},c),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),_:2},1040,["size"]))),128))]),_:1},16,["modelValue","size"])}}}),H=e.defineComponent({__name:"index",props:{item:{}},setup(t){const o=e.inject("queryParams",{}),n=e.inject("size"),s=e.ref({...t.item.checkboxGroupSetting,...t.item.setting});return(r,a)=>{const p=e.resolveComponent("el-checkbox"),l=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createBlock(l,e.mergeProps({modelValue:e.unref(o)[r.item.prop],"onUpdate:modelValue":a[0]||(a[0]=c=>e.unref(o)[r.item.prop]=c),size:e.unref(n)},s.value),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.item.option||[],c=>(e.openBlock(),e.createBlock(p,e.mergeProps({size:e.unref(n),key:c.value,ref_for:!0},c),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),_:2},1040,["size"]))),128))]),_:1},16,["modelValue","size"])}}}),X=e.defineComponent({__name:"index",props:{item:{}},setup(t){const o=e.inject("queryParams",{}),n=e.inject("size"),s=e.ref({...L,...t.item.datePackerSetting,...t.item.setting});return(r,a)=>{const p=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(p,e.mergeProps({modelValue:e.unref(o)[r.item.prop],"onUpdate:modelValue":a[0]||(a[0]=l=>e.unref(o)[r.item.prop]=l),size:e.unref(n)},s.value),null,16,["modelValue","size"])}}}),Y=e.defineComponent({__name:"index",props:{item:{}},setup(t){const o=e.inject("queryParams",{}),n=e.inject("size"),s=e.ref({...$,...t.item.selectSetting,...t.item.setting});return(r,a)=>{const p=e.resolveComponent("el-option"),l=e.resolveComponent("el-select");return e.openBlock(),e.createBlock(l,e.mergeProps({modelValue:e.unref(o)[r.item.prop],"onUpdate:modelValue":a[0]||(a[0]=c=>e.unref(o)[r.item.prop]=c),size:e.unref(n)},s.value),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.item.option||[],c=>(e.openBlock(),e.createBlock(p,e.mergeProps({key:c.value,ref_for:!0},c),null,16))),128))]),_:1},16,["modelValue","size"])}}}),Z=e.defineComponent({__name:"index",props:{item:{}},setup(t){const o=e.inject("queryParams",{}),n=e.inject("size"),s=e.ref({...$,...t.item.selectSetting,...t.item.setting});return(r,a)=>{const p=e.resolveComponent("el-cascader");return e.openBlock(),e.createBlock(p,e.mergeProps({modelValue:e.unref(o)[r.item.prop],"onUpdate:modelValue":a[0]||(a[0]=l=>e.unref(o)[r.item.prop]=l),size:e.unref(n),options:r.item.options||[]},s.value),null,16,["modelValue","size","options"])}}}),v=e.defineComponent({name:"GeneralBasicForm",components:{Input:V,InputNumber:E,InputGraphicVerification:T,InputMobileVerification:Q,Divider:J,Radio:W,Checkbox:H,DatePicker:X,Select:Y,Cascader:Z},props:{showSearch:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},formOnly:{type:Boolean,default:!1},getList:{type:Function,default:()=>{}},afterReset:{type:Function,default:()=>{}},formItem:{type:Array,default:[]},size:{type:String,default:"default"},labelWidth:{type:String,default:"90px"},noUrlParameters:{type:Boolean,default:()=>!1},formData:{type:Object,default:()=>{}},noInputBlank:{type:Boolean,default:()=>!1}},data(){return{formLoading:this.loading||!1,trimRegex:/\S/}},setup(t){const{size:o,noUrlParameters:n,getList:s}=t,r=I.useRoute(),a=e.ref({...n?{}:r==null?void 0:r.query});return e.provide("queryParams",a),e.provide("size",o),e.provide("getList",s),{queryParams:a}},watch:{formData:{handler(t,o){JSON.stringify(t)!==JSON.stringify(o)&&(this.queryParams={...this.noUrlParameters?{}:this.queryParams,...t})},immediate:!0},queryParams:{handler(t){this.$emit("update:formData",t)},deep:!0},loading(t){this.formLoading!==t&&(this.formLoading=t)},formLoading(t){this.loading!==t&&this.$emit("update:loading",t)}},provide(){return{[q]:{formLoading:e.computed(()=>this.formLoading),updateFormLoading:t=>{this.formLoading=t}}}},methods:{handleQuery(){var n;const t={page:1,limit:10},o={...(n=this.$route)==null?void 0:n.query,...this.queryParams,...t};this.noUrlParameters||this.$router.push({query:{...o}}),this.getList({...o})},async resetQuery(){var o;this.$refs.queryFormRef.resetFields();const t={page:1};this.noUrlParameters||await this.$router.push({query:{...t}}),this.queryParams={...this.noUrlParameters?{}:(o=this.$route)==null?void 0:o.query},this.afterReset(),this.handleQuery()},getItemRules(t){const{type:o,rules:n=[]}=t,s=[...n];return this.noInputBlank&&o==="input"&&s.push({pattern:this.trimRegex,message:"请输入(不能仅输入空格)",trigger:"blur"}),s}}});function ee(t,o,n,s,r,a){const p=e.resolveComponent("Input"),l=e.resolveComponent("Radio"),c=e.resolveComponent("Select"),k=e.resolveComponent("Divider"),_=e.resolveComponent("Cascader"),g=e.resolveComponent("Checkbox"),C=e.resolveComponent("DatePicker"),S=e.resolveComponent("InputNumber"),P=e.resolveComponent("InputMobileVerification"),B=e.resolveComponent("InputGraphicVerification"),u=e.resolveComponent("el-form-item"),b=e.resolveComponent("el-button"),w=e.resolveComponent("el-form"),m=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createBlock(w,e.mergeProps({model:t.queryParams,ref:"queryFormRef",inline:"","label-position":"left","label-width":t.labelWidth},t.$attrs),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formItem,i=>(e.openBlock(),e.createBlock(u,{label:i.label,prop:i.prop,key:i.prop,rules:t.getItemRules(i)},{default:e.withCtx(()=>[i.type==="input"?(e.openBlock(),e.createBlock(p,{key:0,item:i},null,8,["item"])):e.createCommentVNode("",!0),i.type==="radio"?(e.openBlock(),e.createBlock(l,{key:1,item:i},null,8,["item"])):e.createCommentVNode("",!0),i.type==="select"?(e.openBlock(),e.createBlock(c,{key:2,item:i},null,8,["item"])):e.createCommentVNode("",!0),i.type==="divider"?(e.openBlock(),e.createBlock(k,{key:3,item:i},null,8,["item"])):e.createCommentVNode("",!0),i.type==="cascader"?(e.openBlock(),e.createBlock(_,{key:4,item:i},null,8,["item"])):e.createCommentVNode("",!0),i.type==="checkbox"?(e.openBlock(),e.createBlock(g,{key:5,item:i},null,8,["item"])):e.createCommentVNode("",!0),i.type==="date-picker"?(e.openBlock(),e.createBlock(C,{key:6,item:i},null,8,["item"])):e.createCommentVNode("",!0),i.type==="input-number"?(e.openBlock(),e.createBlock(S,{key:7,item:i},null,8,["item"])):e.createCommentVNode("",!0),i.type==="form-item-slot"?e.renderSlot(t.$slots,i.name,{key:8}):e.createCommentVNode("",!0),i.type==="input-mobile-verification"?(e.openBlock(),e.createBlock(P,{key:9,item:i},null,8,["item"])):e.createCommentVNode("",!0),i.type==="input-graphic-verification"?(e.openBlock(),e.createBlock(B,{item:i,key:i.key},null,8,["item"])):e.createCommentVNode("",!0)]),_:2},1032,["label","prop","rules"]))),128)),e.renderSlot(t.$slots,"default"),t.formOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(u,{key:0},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(b,{type:"primary",size:t.size,onClick:t.handleQuery},{default:e.withCtx(()=>o[0]||(o[0]=[e.createTextVNode("查询")])),_:1},8,["size","onClick"])),[[m,t.formLoading]]),e.createVNode(b,{size:t.size,onClick:t.resetQuery},{default:e.withCtx(()=>o[1]||(o[1]=[e.createTextVNode("重置")])),_:1},8,["size","onClick"])]),_:1})),e.renderSlot(t.$slots,"behind-the-button")]),_:3},16,["model","label-width"])),[[e.vShow,t.showSearch]])}const te=y(v,[["render",ee]]),oe=["infinite-scroll-disabled"],ne=["infinite-scroll-disabled"],re={class:"checkbox"},le=e.defineComponent({__name:"InfiniteScrollList",props:{search:{type:Function,required:!0},checkbox:{type:Boolean,required:!1},id:{type:String,required:!0},name:{type:String,required:!0},extra:{type:null,required:!1},defaultSelection:{type:Array,required:!1}},setup(t,{expose:o}){const n=t,{search:s,id:r,name:a,extra:p}=n,l=e.ref([]),c=e.ref(1),k=e.ref(!1),_=e.ref([]),g=e.ref(!1),C=(m,i)=>{const{i:x}=m;return p&&p!=="false"?p(x):""},S=m=>{_.value=m.map(i=>typeof i=="object"?i[r]:i)};e.watch(()=>n.defaultSelection,(m=[],i=[])=>{S(m)},{immediate:!0});const P=()=>{B(),_.value=[]},B=()=>{c.value=1,l.value=[],k.value=!1},u=async()=>{if(g.value||k.value)return;g.value=!0;const m=await s(c.value);m&&m.length>0?(l.value=[...l.value,...m],c.value+=1):k.value=!0,g.value=!1},b=()=>{B(),u()},w=e.computed(()=>l.value.filter(m=>_.value.includes(m[r])))||{};return o({reset:P,lowReset:B,loadList:u,selectInfo:w,list:l,ifbottom:k,refreshList:b}),(m,i)=>{const x=e.resolveComponent("el-checkbox"),de=e.resolveComponent("el-checkbox-group"),D=e.resolveDirective("infinite-scroll"),fe=e.resolveDirective("loading");return n.checkbox?e.withDirectives((e.openBlock(),e.createBlock(de,e.mergeProps({key:0,modelValue:_.value,"onUpdate:modelValue":i[0]||(i[0]=f=>_.value=f)},n),{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("ul",{class:"list","infinite-scroll-disabled":k.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,f=>(e.openBlock(),e.createElementBlock("li",{key:f[e.unref(r)],class:"list-item"},[e.createVNode(x,{value:f[e.unref(r)],class:"checkbox"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f[e.unref(a)])+" ",1),n.extra?(e.openBlock(),e.createBlock(C,{key:0,i:f},null,8,["i"])):e.createCommentVNode("",!0)]),_:2},1032,["value"])]))),128))],8,oe)),[[D,u]])]),_:1},16,["modelValue"])),[[fe,g.value]]):e.withDirectives((e.openBlock(),e.createElementBlock("ul",e.mergeProps({key:1,class:"list","infinite-scroll-disabled":k.value},n),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,f=>(e.openBlock(),e.createElementBlock("li",{key:f[e.unref(r)],class:"list-item"},[e.createElementVNode("div",re,[e.createTextVNode(e.toDisplayString(f[e.unref(a)])+" ",1),n.extra?(e.openBlock(),e.createBlock(C,{key:0,i:f},null,8,["i"])):e.createCommentVNode("",!0)])]))),128))],16,ne)),[[D,u]])}}}),ue="",ie=y(le,[["__scopeId","data-v-77737aab"]]),se={key:1},ae=e.defineComponent({__name:"Descriptions",props:{formData:{type:Object,required:!0},formItem:{type:Array,required:!0}},setup(t){const o=t,n=(s,r)=>{const{i:a,render:p,formData:l}=s;return p({row:l,$index:a})};return(s,r)=>{const a=e.resolveComponent("el-descriptions-item"),p=e.resolveComponent("el-descriptions");return e.openBlock(),e.createBlock(p,e.mergeProps({column:1,border:"",class:"form-width"},o),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.formItem,(l,c)=>(e.openBlock(),e.createBlock(a,e.mergeProps({key:l.prop,label:l.label,ref_for:!0},l.descriptionsItemProps),{default:e.withCtx(()=>[l.render?(e.openBlock(),e.createBlock(n,{key:0,i:c,render:l.render,formData:t.formData},null,8,["i","render","formData"])):(e.openBlock(),e.createElementBlock("span",se,e.toDisplayString(t.formData[l.prop]),1))]),_:2},1040,["label"]))),128))]),_:1},16)}}}),ce=te,pe=ie,me=ae;d.VDescriptions=me,d.VGeneralBasicForm=ce,d.VInfiniteScrollList=pe,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(u,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],e):(u=typeof globalThis<"u"?globalThis:u||self,e(u.Index={},u.Vue,u["vue-router"]))})(this,function(u,e,j){"use strict";const $={placeholder:"请输入",style:"width: 200px",clearable:!0},F={style:"width: 227px","start-placeholder":"开始日期","end-placeholder":"结束日期",type:"daterange"},z={placeholder:"请选择",filterable:!0,clearable:!0,style:"width: 200px"},T=e.defineComponent({components:{InputArchive:t=>{const{templateEle:n}=t;return n()}},props:{item:null},setup(){const t=e.inject("queryParams",{}),n=e.inject("getList"),o=e.inject("size");return{queryParams:t,getList:n,size:o}},data(){return{inputSetting:{...$,...this.item.inputSetting,...this.item.setting}}},methods:{currentInputComponent(){return"input-archive"}}}),B=(t,n)=>{const o=t.__vccOpts||t;for(const[a,l]of n)o[a]=l;return o};function R(t,n,o,a,l,i){const c=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(c,e.mergeProps({onKeydown:e.withKeys(t.getList,["enter"]),modelValue:t.queryParams[t.item.prop],"onUpdate:modelValue":n[0]||(n[0]=r=>t.queryParams[t.item.prop]=r),size:t.size},t.inputSetting),e.createSlots({_:2},[e.renderList(t.item.template,(r,s)=>({name:s,fn:e.withCtx(()=>[r?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.currentInputComponent()),{key:s,templateEle:r},null,8,["templateEle"])):e.createCommentVNode("",!0)])}))]),1040,["onKeydown","modelValue","size"])}const V=B(T,[["render",R]]),A=e.defineComponent({__name:"index",props:{item:{}},setup(t){const n=e.inject("queryParams",{}),o=e.inject("size"),a=e.ref({...$,...t.item.inputSetting,...t.item.setting});return(l,i)=>{const c=e.resolveComponent("el-input-number");return e.openBlock(),e.createBlock(c,e.mergeProps({modelValue:e.unref(n)[l.item.prop],"onUpdate:modelValue":i[0]||(i[0]=r=>e.unref(n)[l.item.prop]=r),size:e.unref(o)},a.value),null,16,["modelValue","size"])}}}),U=e.defineComponent({components:{InputArchive:t=>{const{templateEle:n}=t;return n()}},props:{item:null},setup(){const t=e.inject("queryParams",{}),n=e.inject("getList",()=>{}),o=e.inject("size");return{queryParams:t,getList:n,size:o}},data(){return{inputSetting:{...$,...this.item.inputSetting,...this.item.setting}}},methods:{currentInputComponent(){return"input-archive"}}});function G(t,n,o,a,l,i){const c=e.resolveComponent("a-input");return e.openBlock(),e.createBlock(c,e.mergeProps({onKeydown:e.withKeys(t.getList,["enter"]),modelValue:t.queryParams[t.item.prop],"onUpdate:modelValue":n[0]||(n[0]=r=>t.queryParams[t.item.prop]=r),size:t.size},t.inputSetting),e.createSlots({_:2},[e.renderList(t.item.template,(r,s)=>({name:s,fn:e.withCtx(()=>[r?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.currentInputComponent()),{key:s,templateEle:r},null,8,["templateEle"])):e.createCommentVNode("",!0)])}))]),1040,["onKeydown","modelValue","size"])}const q=B(U,[["render",G]]),D=Symbol(),M=e.defineComponent({__name:"index",props:{imgSrc:{}},setup(t){const n=e.ref();return e.onMounted(()=>{console.log("onMounted");const o=new Image,a=[],l=8,i=8;let c=0,r=0;const s=300,d=n.value,k=d.getContext("2d");o.onload=function(){d.width=o.width,d.height=o.height,r=Math.floor(o.width/l),c=Math.floor(o.height/i),g(),_()},o.src=t.imgSrc;const g=()=>{for(let y=0;y<i;y++)for(let m=0;m<l;m++)a.push({x:r*m,y:c*y,offsetX:(Math.random()-.5)*s,offsetY:(Math.random()-.5)*s})},_=()=>{k.clearRect(0,0,d.width,d.height);let y=!0;a.forEach((m,b)=>{k.drawImage(o,m.x,m.y,r,c,m.x+m.offsetX,m.y+m.offsetY,r,c),Math.abs(m.offsetX)>.5&&(y=!1,m.offsetX*=.95),Math.abs(m.offsetY)>.5&&(m.offsetY*=.95,y=!1)}),y?setTimeout(()=>{g(),_()},300):requestAnimationFrame(_)}}),(o,a)=>(e.openBlock(),e.createElementBlock("canvas",{ref_key:"loadingCanvas",ref:n},null,512))}}),O={class:"input-graphic-verification"},K=["src","alt"],Q=e.defineComponent({__name:"index",props:{item:{},componentType:{default:"Element Plus"},loading:{type:Boolean,default:!1}},setup(t){const{graphicSrc:n="",graphicAlt:o="",getGraphic:a=()=>{},key:l}=t.item,{formLoading:i}=e.inject(D,!1),c=e.computed(()=>(i==null?void 0:i.value)||t.loading),r=async()=>{a&&!(c!=null&&c.value)&&await a()},s=e.shallowRef(V);switch(t.componentType){case"Element Plus":s.value=V;break;case"Ant Design Vue":s.value=q;break}return(d,k)=>(e.openBlock(),e.createElementBlock("div",O,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{item:d.item,class:"input"},null,8,["item"])),c.value?(e.openBlock(),e.createBlock(M,{key:0,class:"graphic",imgSrc:e.unref(n)},null,8,["imgSrc"])):(e.openBlock(),e.createElementBlock("img",{key:1,class:"graphic",onClick:r,src:e.unref(n),alt:e.unref(o)||`${e.unref(l)}`},null,8,K))]))}}),Be="",x=B(Q,[["__scopeId","data-v-f76fdd37"]]),S="获取验证码",X=60,Y=e.defineComponent({__name:"verification-button",props:{getSmscode:{type:Function},componentType:{default:"Element Plus"}},setup(t){const n=e.ref(S),o=e.ref(null),a=e.computed(()=>n.value===S),l=e.shallowRef("el-button");switch(console.log(t.componentType),t.componentType){case"Element Plus":l.value="el-button";break;case"Ant Design Vue":l.value="a-button";break}const i=()=>{o&&(clearInterval(o.value),o.value=null,n.value=S)},c=async()=>{if(n.value===S)if(n.value=X,o.value=setInterval(()=>{if(Number(n.value)<=0||!n.value){i();return}else n.value=Number(n.value)-1},1e3),t.getSmscode)await t.getSmscode()===!1&&i();else return};return e.onBeforeUnmount(()=>{i()}),(r,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value),{class:"verifiaction-button",style:e.normalizeStyle({color:a.value?"var(--color-primary, #409EFF)":"var(--text-color-placeholder, #A8ABB2)",cursor:a.value?"pointer":"default"}),onClick:c},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value?S:n.value+"s"),1)]),_:1},8,["style"]))}}),Ce="",L=B(Y,[["__scopeId","data-v-2477efb7"]]),N=e.defineComponent({__name:"index",props:{item:{},componentType:{default:"Element Plus"}},setup(t){const n=t.item,o=e.shallowRef(V);switch(t.componentType){case"Element Plus":o.value=V,n.template={append:()=>e.h(L,{getSmscode:n.getSmscode})};break;case"Ant Design Vue":o.value=q,n.template={addonAfter:()=>e.h(L,{getSmscode:n.getSmscode})};break}return(a,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value),{item:e.unref(n),class:"input"},null,8,["item"]))}}),W=e.defineComponent({components:{slotArchive:t=>{const{templateEle:n}=t;return n()}},props:{item:null},setup(){},data(){return{dividerSetting:{...this.item.dividerSetting,...this.item.setting}}},methods:{currentInputComponent(){return"slot-archive"}}});function J(t,n,o,a,l,i){const c=e.resolveComponent("el-divider");return e.openBlock(),e.createBlock(c,e.normalizeProps(e.guardReactiveProps(t.dividerSetting)),e.createSlots({_:2},[e.renderList(t.item.template,(r,s)=>({name:s,fn:e.withCtx(()=>[r?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.currentInputComponent()),{key:s,templateEle:r},null,8,["templateEle"])):e.createCommentVNode("",!0)])}))]),1040)}const H=B(W,[["render",J]]),Z=e.defineComponent({__name:"index",props:{item:{}},setup(t){const n=e.inject("queryParams",{}),o=e.inject("size"),a=e.ref({...t.item.radioGroupSetting,...t.item.setting});return(l,i)=>{const c=e.resolveComponent("el-radio"),r=e.resolveComponent("el-radio-group");return e.openBlock(),e.createBlock(r,e.mergeProps({modelValue:e.unref(n)[l.item.prop],"onUpdate:modelValue":i[0]||(i[0]=s=>e.unref(n)[l.item.prop]=s),size:e.unref(o)},a.value),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.item.option||[],s=>(e.openBlock(),e.createBlock(c,e.mergeProps({size:e.unref(o),key:s.value,ref_for:!0},s),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1040,["size"]))),128))]),_:1},16,["modelValue","size"])}}}),v=e.defineComponent({__name:"index",props:{item:{}},setup(t){const n=e.inject("queryParams",{}),o=e.inject("size"),a=e.ref({...t.item.checkboxGroupSetting,...t.item.setting});return(l,i)=>{const c=e.resolveComponent("el-checkbox"),r=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createBlock(r,e.mergeProps({modelValue:e.unref(n)[l.item.prop],"onUpdate:modelValue":i[0]||(i[0]=s=>e.unref(n)[l.item.prop]=s),size:e.unref(o)},a.value),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.item.option||[],s=>(e.openBlock(),e.createBlock(c,e.mergeProps({size:e.unref(o),key:s.value,ref_for:!0},s),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1040,["size"]))),128))]),_:1},16,["modelValue","size"])}}}),ee=e.defineComponent({__name:"index",props:{item:{}},setup(t){const n=e.inject("queryParams",{}),o=e.inject("size"),a=e.ref({...F,...t.item.datePackerSetting,...t.item.setting});return(l,i)=>{const c=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(c,e.mergeProps({modelValue:e.unref(n)[l.item.prop],"onUpdate:modelValue":i[0]||(i[0]=r=>e.unref(n)[l.item.prop]=r),size:e.unref(o)},a.value),null,16,["modelValue","size"])}}}),te=e.defineComponent({__name:"index",props:{item:{}},setup(t){const n=e.inject("queryParams",{}),o=e.inject("size"),a=e.ref({...z,...t.item.selectSetting,...t.item.setting});return(l,i)=>{const c=e.resolveComponent("el-option"),r=e.resolveComponent("el-select");return e.openBlock(),e.createBlock(r,e.mergeProps({modelValue:e.unref(n)[l.item.prop],"onUpdate:modelValue":i[0]||(i[0]=s=>e.unref(n)[l.item.prop]=s),size:e.unref(o)},a.value),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.item.option||[],s=>(e.openBlock(),e.createBlock(c,e.mergeProps({key:s.value,ref_for:!0},s),null,16))),128))]),_:1},16,["modelValue","size"])}}}),ne=e.defineComponent({__name:"index",props:{item:{}},setup(t){const n=e.inject("queryParams",{}),o=e.inject("size"),a=e.ref({...z,...t.item.selectSetting,...t.item.setting});return(l,i)=>{const c=e.resolveComponent("el-cascader");return e.openBlock(),e.createBlock(c,e.mergeProps({modelValue:e.unref(n)[l.item.prop],"onUpdate:modelValue":i[0]||(i[0]=r=>e.unref(n)[l.item.prop]=r),size:e.unref(o),options:l.item.options||[]},a.value),null,16,["modelValue","size","options"])}}}),oe=e.defineComponent({name:"GeneralBasicForm",components:{Input:V,InputNumber:A,InputGraphicVerification:x,InputMobileVerification:N,Divider:H,Radio:Z,Checkbox:v,DatePicker:ee,Select:te,Cascader:ne},props:{showSearch:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},formOnly:{type:Boolean,default:!1},getList:{type:Function,default:()=>{}},afterReset:{type:Function,default:()=>{}},formItem:{type:Array,default:[]},size:{type:String,default:"default"},labelWidth:{type:String,default:"90px"},noUrlParameters:{type:Boolean,default:()=>!1},formData:{type:Object,default:()=>{}},noInputBlank:{type:Boolean,default:()=>!1}},data(){return{formLoading:this.loading||!1,trimRegex:/\S/}},setup(t){const{size:n,noUrlParameters:o,getList:a}=t,l=j.useRoute(),i=e.ref({...o?{}:l==null?void 0:l.query});return e.provide("queryParams",i),e.provide("size",n),e.provide("getList",a),{queryParams:i}},watch:{formData:{handler(t,n){JSON.stringify(t)!==JSON.stringify(n)&&(this.queryParams={...this.noUrlParameters?{}:this.queryParams,...t})},immediate:!0},queryParams:{handler(t){this.$emit("update:formData",t)},deep:!0},loading(t){this.formLoading!==t&&(this.formLoading=t)},formLoading(t){this.loading!==t&&this.$emit("update:loading",t)}},provide(){return{[D]:{formLoading:e.computed(()=>this.formLoading),updateFormLoading:t=>{this.formLoading=t}}}},methods:{handleQuery(){var o;const t={page:1,limit:10},n={...(o=this.$route)==null?void 0:o.query,...this.queryParams,...t};this.noUrlParameters||this.$router.push({query:{...n}}),this.getList({...n})},async resetQuery(){var n;this.$refs.queryFormRef.resetFields();const t={page:1};this.noUrlParameters||await this.$router.push({query:{...t}}),this.queryParams={...this.noUrlParameters?{}:(n=this.$route)==null?void 0:n.query},this.afterReset(),this.handleQuery()},getItemRules(t){const{type:n,rules:o=[]}=t,a=[...o];return this.noInputBlank&&n==="input"&&a.push({pattern:this.trimRegex,message:"请输入(不能仅输入空格)",trigger:"blur"}),a}}});function re(t,n,o,a,l,i){const c=e.resolveComponent("Input"),r=e.resolveComponent("Radio"),s=e.resolveComponent("Select"),d=e.resolveComponent("Divider"),k=e.resolveComponent("Cascader"),g=e.resolveComponent("Checkbox"),_=e.resolveComponent("DatePicker"),y=e.resolveComponent("InputNumber"),m=e.resolveComponent("InputMobileVerification"),b=e.resolveComponent("InputGraphicVerification"),C=e.resolveComponent("el-form-item"),P=e.resolveComponent("el-button"),w=e.resolveComponent("el-form"),f=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createBlock(w,e.mergeProps({model:t.queryParams,ref:"queryFormRef",inline:"","label-position":"left","label-width":t.labelWidth},t.$attrs),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formItem,p=>(e.openBlock(),e.createBlock(C,{label:p.label,prop:p.prop,key:p.prop,rules:t.getItemRules(p)},{default:e.withCtx(()=>[/^input$/i.test(p.type)?(e.openBlock(),e.createBlock(c,{key:0,item:p},null,8,["item"])):e.createCommentVNode("",!0),/^radio$/i.test(p.type)?(e.openBlock(),e.createBlock(r,{key:1,item:p},null,8,["item"])):e.createCommentVNode("",!0),/^select$/i.test(p.type)?(e.openBlock(),e.createBlock(s,{key:2,item:p},null,8,["item"])):e.createCommentVNode("",!0),/^divider$/i.test(p.type)?(e.openBlock(),e.createBlock(d,{key:3,item:p},null,8,["item"])):e.createCommentVNode("",!0),/^cascader$/i.test(p.type)?(e.openBlock(),e.createBlock(k,{key:4,item:p},null,8,["item"])):e.createCommentVNode("",!0),/^checkbox$/i.test(p.type)?(e.openBlock(),e.createBlock(g,{key:5,item:p},null,8,["item"])):e.createCommentVNode("",!0),/^date-picker$/i.test(p.type)?(e.openBlock(),e.createBlock(_,{key:6,item:p},null,8,["item"])):e.createCommentVNode("",!0),/^input-number$/i.test(p.type)?(e.openBlock(),e.createBlock(y,{key:7,item:p},null,8,["item"])):e.createCommentVNode("",!0),/^form-item-slot$/i.test(p.type)?e.renderSlot(t.$slots,p.name,{key:8}):e.createCommentVNode("",!0),/^input-mobile-verification$/i.test(p.type)?(e.openBlock(),e.createBlock(m,{key:9,item:p},null,8,["item"])):e.createCommentVNode("",!0),/^input-graphic-verification$/i.test(p.type)?(e.openBlock(),e.createBlock(b,{item:p,key:p.key},null,8,["item"])):e.createCommentVNode("",!0)]),_:2},1032,["label","prop","rules"]))),128)),e.renderSlot(t.$slots,"default"),t.formOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(C,{key:0},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(P,{type:"primary",size:t.size,onClick:t.handleQuery},{default:e.withCtx(()=>n[0]||(n[0]=[e.createTextVNode("查询")])),_:1},8,["size","onClick"])),[[f,t.formLoading]]),e.createVNode(P,{size:t.size,onClick:t.resetQuery},{default:e.withCtx(()=>n[1]||(n[1]=[e.createTextVNode("重置")])),_:1},8,["size","onClick"])]),_:1})),e.renderSlot(t.$slots,"behind-the-button")]),_:3},16,["model","label-width"])),[[e.vShow,t.showSearch]])}const le=B(oe,[["render",re]]),ie=["infinite-scroll-disabled"],se=["infinite-scroll-disabled"],ae={class:"checkbox"},ce=e.defineComponent({__name:"InfiniteScrollList",props:{search:{type:Function,required:!0},checkbox:{type:Boolean,required:!1},id:{type:String,required:!0},name:{type:String,required:!0},extra:{type:null,required:!1},defaultSelection:{type:Array,required:!1}},setup(t,{expose:n}){const o=t,{search:a,id:l,name:i,extra:c}=o,r=e.ref([]),s=e.ref(1),d=e.ref(!1),k=e.ref([]),g=e.ref(!1),_=(f,p)=>{const{i:I}=f;return c&&c!=="false"?c(I):""},y=f=>{k.value=f.map(p=>typeof p=="object"?p[l]:p)};e.watch(()=>o.defaultSelection,(f=[],p=[])=>{y(f)},{immediate:!0});const m=()=>{b(),k.value=[]},b=()=>{s.value=1,r.value=[],d.value=!1},C=async()=>{if(g.value||d.value)return;g.value=!0;const f=await a(s.value);f&&f.length>0?(r.value=[...r.value,...f],s.value+=1):d.value=!0,g.value=!1},P=()=>{b(),C()},w=e.computed(()=>r.value.filter(f=>k.value.includes(f[l])))||{};return n({reset:m,lowReset:b,loadList:C,selectInfo:w,list:r,ifbottom:d,refreshList:P}),(f,p)=>{const I=e.resolveComponent("el-checkbox"),ge=e.resolveComponent("el-checkbox-group"),E=e.resolveDirective("infinite-scroll"),_e=e.resolveDirective("loading");return o.checkbox?e.withDirectives((e.openBlock(),e.createBlock(ge,e.mergeProps({key:0,modelValue:k.value,"onUpdate:modelValue":p[0]||(p[0]=h=>k.value=h)},o),{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("ul",{class:"list","infinite-scroll-disabled":d.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,h=>(e.openBlock(),e.createElementBlock("li",{key:h[e.unref(l)],class:"list-item"},[e.createVNode(I,{value:h[e.unref(l)],class:"checkbox"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h[e.unref(i)])+" ",1),o.extra?(e.openBlock(),e.createBlock(_,{key:0,i:h},null,8,["i"])):e.createCommentVNode("",!0)]),_:2},1032,["value"])]))),128))],8,ie)),[[E,C]])]),_:1},16,["modelValue"])),[[_e,g.value]]):e.withDirectives((e.openBlock(),e.createElementBlock("ul",e.mergeProps({key:1,class:"list","infinite-scroll-disabled":d.value},o),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,h=>(e.openBlock(),e.createElementBlock("li",{key:h[e.unref(l)],class:"list-item"},[e.createElementVNode("div",ae,[e.createTextVNode(e.toDisplayString(h[e.unref(i)])+" ",1),o.extra?(e.openBlock(),e.createBlock(_,{key:0,i:h},null,8,["i"])):e.createCommentVNode("",!0)])]))),128))],16,se)),[[E,C]])}}}),be="",pe=B(ce,[["__scopeId","data-v-77737aab"]]),me={key:1},de=e.defineComponent({__name:"Descriptions",props:{formData:{type:Object,required:!0},formItem:{type:Array,required:!0}},setup(t){const n=t,o=(a,l)=>{const{i,render:c,formData:r}=a;return c({row:r,$index:i})};return(a,l)=>{const i=e.resolveComponent("el-descriptions-item"),c=e.resolveComponent("el-descriptions");return e.openBlock(),e.createBlock(c,e.mergeProps({column:1,border:"",class:"form-width"},n),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.formItem,(r,s)=>(e.openBlock(),e.createBlock(i,e.mergeProps({key:r.prop,label:r.label,ref_for:!0},r.descriptionsItemProps),{default:e.withCtx(()=>[r.render?(e.openBlock(),e.createBlock(o,{key:0,i:s,render:r.render,formData:t.formData},null,8,["i","render","formData"])):(e.openBlock(),e.createElementBlock("span",me,e.toDisplayString(t.formData[r.prop]),1))]),_:2},1040,["label"]))),128))]),_:1},16)}}}),fe=le,ue=pe,ke=de,ye=x,he=N;u.VDescriptions=ke,u.VGeneralBasicForm=fe,u.VInfiniteScrollList=ue,u.VInputGraphicVerification=ye,u.VInputMobilecVerification=he,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.input-graphic-verification[data-v-
|
|
1
|
+
.input-graphic-verification[data-v-f76fdd37]{display:flex;gap:12px;width:100%}.input-graphic-verification .input[data-v-f76fdd37]{flex:auto}.input-graphic-verification .graphic[data-v-f76fdd37]{width:108px;height:43px;object-fit:fill;flex:none}.verifiaction-button[data-v-2477efb7]{width:109px}.list[data-v-77737aab]{height:272px;overflow:auto;padding:8px 0}.list .checkbox[data-v-77737aab]{width:calc(100% - 32px);padding:0 16px}
|