general-basic-form 2.0.44 → 2.0.45
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 +18 -12
- package/dist/index.js +283 -275
- package/dist/index.umd.cjs +1 -1
- package/package.json +61 -61
package/README.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
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 | | √ |
|
|
11
|
+
|
|
5
12
|
示例:
|
|
6
13
|
|
|
7
14
|
因为兼容性问题,目前只能使用完整引入
|
|
@@ -132,7 +139,7 @@ getList会传出默认的参数,首次请求时会有页数和分页大小,重
|
|
|
132
139
|
label: '',
|
|
133
140
|
prop: 'bsName35',
|
|
134
141
|
type: 'divider',
|
|
135
|
-
|
|
142
|
+
setting: {
|
|
136
143
|
},
|
|
137
144
|
template: {
|
|
138
145
|
default: () => {
|
|
@@ -143,7 +150,7 @@ getList会传出默认的参数,首次请求时会有页数和分页大小,重
|
|
|
143
150
|
{ label: "款式名称",
|
|
144
151
|
prop: "bsName",
|
|
145
152
|
type: "input",
|
|
146
|
-
|
|
153
|
+
setting: {
|
|
147
154
|
placeholder: '请输入手机验证码',
|
|
148
155
|
style: 'width: 100%'
|
|
149
156
|
},
|
|
@@ -166,8 +173,7 @@ getList会传出默认的参数,首次请求时会有页数和分页大小,重
|
|
|
166
173
|
label: "二次工艺",
|
|
167
174
|
prop: "spName",
|
|
168
175
|
type: "select",
|
|
169
|
-
multiple:true, //多选
|
|
170
|
-
selectSetting:{},
|
|
176
|
+
setting:{ multiple:true, //多选},
|
|
171
177
|
option: [
|
|
172
178
|
{ value: "3", label: "满印" },
|
|
173
179
|
{ value: "1", label: "区域印花" },
|
|
@@ -178,7 +184,7 @@ getList会传出默认的参数,首次请求时会有页数和分页大小,重
|
|
|
178
184
|
label: "创建时间",
|
|
179
185
|
prop: "create_time",
|
|
180
186
|
type: "date-picker",
|
|
181
|
-
|
|
187
|
+
setting: {
|
|
182
188
|
"range-separator": "至",
|
|
183
189
|
}
|
|
184
190
|
},
|
|
@@ -200,7 +206,7 @@ getList会传出默认的参数,首次请求时会有页数和分页大小,重
|
|
|
200
206
|
label: '',
|
|
201
207
|
prop: 'bsName2',
|
|
202
208
|
type: 'input-graphic-verification',
|
|
203
|
-
|
|
209
|
+
setting: {
|
|
204
210
|
placeholder: '请输入图形验证码',
|
|
205
211
|
style: 'width: 100%'
|
|
206
212
|
},
|
|
@@ -218,7 +224,7 @@ getList会传出默认的参数,首次请求时会有页数和分页大小,重
|
|
|
218
224
|
label: '',
|
|
219
225
|
prop: 'bsName3',
|
|
220
226
|
type: 'input-mobile-verification',
|
|
221
|
-
|
|
227
|
+
setting: {
|
|
222
228
|
placeholder: '请输入手机验证码',
|
|
223
229
|
style: 'width: 100%'
|
|
224
230
|
},
|
|
@@ -234,7 +240,7 @@ getList会传出默认的参数,首次请求时会有页数和分页大小,重
|
|
|
234
240
|
label: '是否必填',
|
|
235
241
|
prop: 'is_optional',
|
|
236
242
|
type: 'radio',
|
|
237
|
-
|
|
243
|
+
setting: {
|
|
238
244
|
disabled: true
|
|
239
245
|
},
|
|
240
246
|
option: [
|
|
@@ -253,7 +259,7 @@ getList会传出默认的参数,首次请求时会有页数和分页大小,重
|
|
|
253
259
|
label: '多选',
|
|
254
260
|
prop: 'is_multi',
|
|
255
261
|
type: 'checkbox',
|
|
256
|
-
|
|
262
|
+
setting: {
|
|
257
263
|
},
|
|
258
264
|
option: [
|
|
259
265
|
{ value: '是', label: 'true' },
|
|
@@ -280,7 +286,7 @@ getList会传出默认的参数,首次请求时会有页数和分页大小,重
|
|
|
280
286
|
label: "分类",
|
|
281
287
|
prop: "分类",
|
|
282
288
|
type: "cascader",
|
|
283
|
-
|
|
289
|
+
setting:{},
|
|
284
290
|
options: [
|
|
285
291
|
{
|
|
286
292
|
value: "zhinan",
|
|
@@ -448,7 +454,7 @@ getList会传出默认的参数,首次请求时会有页数和分页大小,重
|
|
|
448
454
|
|
|
449
455
|
|
|
450
456
|
|
|
451
|
-
|
|
457
|
+
# VInfiniteScrollList对虚拟滚动列表+接口的封装
|
|
452
458
|
|
|
453
459
|
|
|
454
460
|
|
|
@@ -494,7 +500,7 @@ defaultSelection:包含数据key值的对象数组或者直接传入key值数
|
|
|
494
500
|
InfiniteScrollListRef?.value?.ifbottom:是否到底部
|
|
495
501
|
```
|
|
496
502
|
|
|
497
|
-
|
|
503
|
+
# VDescriptions对展示描述列表的封装
|
|
498
504
|
|
|
499
505
|

|
|
500
506
|
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as b, inject as y, resolveComponent as m, openBlock as n, createBlock as u, mergeProps as h, withKeys as ne, createSlots as J, renderList as P, withCtx as f, resolveDynamicComponent as W, createCommentVNode as _, ref as v, unref as p, resolveDirective as U, withDirectives as C, createElementBlock as k, createVNode as T, createElementVNode as H, computed as j, onBeforeUnmount as oe, normalizeStyle as re, createTextVNode as V, toDisplayString as D, h as se, normalizeProps as ie, guardReactiveProps as ae, Fragment as I, provide as O, renderSlot as Q, vShow as le, watch as ue } from "vue";
|
|
2
2
|
import { useRoute as ce } from "vue-router";
|
|
3
3
|
const X = {
|
|
4
4
|
placeholder: "请输入",
|
|
@@ -14,11 +14,11 @@ const X = {
|
|
|
14
14
|
filterable: !0,
|
|
15
15
|
clearable: !0,
|
|
16
16
|
style: "width: 200px"
|
|
17
|
-
}, me =
|
|
17
|
+
}, me = b({
|
|
18
18
|
components: {
|
|
19
19
|
InputArchive: (e) => {
|
|
20
|
-
const { templateEle:
|
|
21
|
-
return
|
|
20
|
+
const { templateEle: t } = e;
|
|
21
|
+
return t();
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
props: {
|
|
@@ -26,14 +26,15 @@ const X = {
|
|
|
26
26
|
// null就是any
|
|
27
27
|
},
|
|
28
28
|
setup() {
|
|
29
|
-
const e =
|
|
30
|
-
return { queryParams: e, getList:
|
|
29
|
+
const e = y("queryParams", {}), t = y("getList"), o = y("size");
|
|
30
|
+
return { queryParams: e, getList: t, size: o };
|
|
31
31
|
},
|
|
32
32
|
data() {
|
|
33
33
|
return {
|
|
34
34
|
inputSetting: {
|
|
35
35
|
...X,
|
|
36
|
-
...this.item.inputSetting
|
|
36
|
+
...this.item.inputSetting,
|
|
37
|
+
...this.item.setting
|
|
37
38
|
}
|
|
38
39
|
};
|
|
39
40
|
},
|
|
@@ -54,146 +55,147 @@ const X = {
|
|
|
54
55
|
// console.log(val);
|
|
55
56
|
// },
|
|
56
57
|
// },
|
|
57
|
-
}), w = (e,
|
|
58
|
-
const
|
|
59
|
-
for (const [a,
|
|
60
|
-
|
|
61
|
-
return
|
|
58
|
+
}), w = (e, t) => {
|
|
59
|
+
const o = e.__vccOpts || e;
|
|
60
|
+
for (const [a, r] of t)
|
|
61
|
+
o[a] = r;
|
|
62
|
+
return o;
|
|
62
63
|
};
|
|
63
|
-
function de(e,
|
|
64
|
-
const
|
|
65
|
-
return
|
|
64
|
+
function de(e, t, o, a, r, l) {
|
|
65
|
+
const d = m("el-input");
|
|
66
|
+
return n(), u(d, h({
|
|
66
67
|
onKeydown: ne(e.getList, ["enter"]),
|
|
67
68
|
modelValue: e.queryParams[e.item.prop],
|
|
68
|
-
"onUpdate:modelValue":
|
|
69
|
+
"onUpdate:modelValue": t[0] || (t[0] = (s) => e.queryParams[e.item.prop] = s),
|
|
69
70
|
size: e.size
|
|
70
71
|
}, e.inputSetting), J({ _: 2 }, [
|
|
71
|
-
|
|
72
|
-
name:
|
|
72
|
+
P(e.item.template, (s, c) => ({
|
|
73
|
+
name: c,
|
|
73
74
|
fn: f(() => [
|
|
74
|
-
|
|
75
|
-
key:
|
|
76
|
-
templateEle:
|
|
77
|
-
}, null, 8, ["templateEle"])) :
|
|
75
|
+
s ? (n(), u(W(e.currentInputComponent()), {
|
|
76
|
+
key: c,
|
|
77
|
+
templateEle: s
|
|
78
|
+
}, null, 8, ["templateEle"])) : _("", !0)
|
|
78
79
|
])
|
|
79
80
|
}))
|
|
80
81
|
]), 1040, ["onKeydown", "modelValue", "size"]);
|
|
81
82
|
}
|
|
82
|
-
const K = /* @__PURE__ */ w(me, [["render", de]]),
|
|
83
|
+
const K = /* @__PURE__ */ w(me, [["render", de]]), fe = /* @__PURE__ */ b({
|
|
83
84
|
__name: "index",
|
|
84
85
|
props: {
|
|
85
86
|
item: {}
|
|
86
87
|
},
|
|
87
88
|
setup(e) {
|
|
88
|
-
const
|
|
89
|
+
const t = y("queryParams", {}), o = y("size"), a = v({
|
|
89
90
|
...X,
|
|
90
|
-
...
|
|
91
|
+
...e.item.inputSetting,
|
|
92
|
+
...e.item.setting
|
|
91
93
|
});
|
|
92
|
-
return (
|
|
93
|
-
const
|
|
94
|
-
return
|
|
95
|
-
modelValue: p(t)[
|
|
96
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
97
|
-
size: p(
|
|
98
|
-
},
|
|
94
|
+
return (r, l) => {
|
|
95
|
+
const d = m("el-input-number");
|
|
96
|
+
return n(), u(d, h({
|
|
97
|
+
modelValue: p(t)[r.item.prop],
|
|
98
|
+
"onUpdate:modelValue": l[0] || (l[0] = (s) => p(t)[r.item.prop] = s),
|
|
99
|
+
size: p(o)
|
|
100
|
+
}, a.value), null, 16, ["modelValue", "size"]);
|
|
99
101
|
};
|
|
100
102
|
}
|
|
101
|
-
}), Z = Symbol(),
|
|
103
|
+
}), Z = Symbol(), _e = { class: "input-graphic-verification" }, ye = ["src", "alt"], he = /* @__PURE__ */ b({
|
|
102
104
|
__name: "index",
|
|
103
105
|
props: {
|
|
104
106
|
item: {}
|
|
105
107
|
},
|
|
106
108
|
setup(e) {
|
|
107
|
-
const {
|
|
109
|
+
const {
|
|
108
110
|
graphicSrc: t = "",
|
|
109
|
-
graphicAlt:
|
|
110
|
-
getGraphic:
|
|
111
|
+
graphicAlt: o = "",
|
|
112
|
+
getGraphic: a = () => {
|
|
111
113
|
},
|
|
112
|
-
key:
|
|
113
|
-
} =
|
|
114
|
-
|
|
114
|
+
key: r
|
|
115
|
+
} = e.item, { formLoading: l, updateFormLoading: d } = y(Z), s = async () => {
|
|
116
|
+
a && !l.value && await a();
|
|
115
117
|
};
|
|
116
|
-
return (
|
|
117
|
-
const
|
|
118
|
-
return C((
|
|
118
|
+
return (c, z) => {
|
|
119
|
+
const $ = U("loading");
|
|
120
|
+
return C((n(), k("div", _e, [
|
|
119
121
|
T(K, {
|
|
120
|
-
item:
|
|
122
|
+
item: c.item,
|
|
121
123
|
class: "input"
|
|
122
124
|
}, null, 8, ["item"]),
|
|
123
125
|
H("img", {
|
|
124
126
|
class: "graphic",
|
|
125
|
-
onClick:
|
|
127
|
+
onClick: s,
|
|
126
128
|
src: p(t),
|
|
127
|
-
alt: p(
|
|
129
|
+
alt: p(o) || `${p(r)}`
|
|
128
130
|
}, null, 8, ye)
|
|
129
131
|
])), [
|
|
130
|
-
[
|
|
132
|
+
[$, p(l)]
|
|
131
133
|
]);
|
|
132
134
|
};
|
|
133
135
|
}
|
|
134
136
|
});
|
|
135
|
-
const ge = /* @__PURE__ */ w(he, [["__scopeId", "data-v-006751c3"]]), B = "获取验证码", ve = 60, be = /* @__PURE__ */
|
|
137
|
+
const ge = /* @__PURE__ */ w(he, [["__scopeId", "data-v-006751c3"]]), B = "获取验证码", ve = 60, be = /* @__PURE__ */ b({
|
|
136
138
|
__name: "verification-button",
|
|
137
139
|
props: {
|
|
138
140
|
getSmscode: { type: Function }
|
|
139
141
|
},
|
|
140
142
|
setup(e) {
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
+
const t = v(B), o = v(null), a = j(() => t.value === B), r = () => {
|
|
144
|
+
o && (clearInterval(o.value), o.value = null, t.value = B);
|
|
143
145
|
}, l = async () => {
|
|
144
146
|
if (t.value === B)
|
|
145
|
-
if (t.value = ve,
|
|
147
|
+
if (t.value = ve, o.value = setInterval(() => {
|
|
146
148
|
if (Number(t.value) <= 0 || !t.value) {
|
|
147
|
-
|
|
149
|
+
r();
|
|
148
150
|
return;
|
|
149
151
|
} else
|
|
150
152
|
t.value = Number(t.value) - 1;
|
|
151
|
-
}, 1e3),
|
|
152
|
-
await
|
|
153
|
+
}, 1e3), e.getSmscode)
|
|
154
|
+
await e.getSmscode() === !1 && r();
|
|
153
155
|
else
|
|
154
156
|
return;
|
|
155
157
|
};
|
|
156
158
|
return oe(() => {
|
|
157
|
-
|
|
158
|
-
}), (
|
|
159
|
-
const
|
|
160
|
-
return
|
|
159
|
+
r();
|
|
160
|
+
}), (d, s) => {
|
|
161
|
+
const c = m("el-button");
|
|
162
|
+
return n(), u(c, {
|
|
161
163
|
class: "verifiaction-button",
|
|
162
164
|
style: re({
|
|
163
|
-
color:
|
|
164
|
-
cursor:
|
|
165
|
+
color: a.value ? "var(--color-primary, #409EFF)" : "var(--text-color-placeholder, #A8ABB2)",
|
|
166
|
+
cursor: a.value ? "pointer" : "default"
|
|
165
167
|
}),
|
|
166
168
|
onClick: l
|
|
167
169
|
}, {
|
|
168
170
|
default: f(() => [
|
|
169
|
-
|
|
171
|
+
V(D(a.value ? B : t.value + "s"), 1)
|
|
170
172
|
]),
|
|
171
173
|
_: 1
|
|
172
174
|
}, 8, ["style"]);
|
|
173
175
|
};
|
|
174
176
|
}
|
|
175
177
|
});
|
|
176
|
-
const ke = /* @__PURE__ */ w(be, [["__scopeId", "data-v-4074e137"]]), Se = /* @__PURE__ */
|
|
178
|
+
const ke = /* @__PURE__ */ w(be, [["__scopeId", "data-v-4074e137"]]), Se = /* @__PURE__ */ b({
|
|
177
179
|
__name: "index",
|
|
178
180
|
props: {
|
|
179
181
|
item: {}
|
|
180
182
|
},
|
|
181
183
|
setup(e) {
|
|
182
|
-
const
|
|
184
|
+
const t = e.item;
|
|
183
185
|
return t.template = {
|
|
184
186
|
append: () => se(ke, {
|
|
185
187
|
getSmscode: t.getSmscode
|
|
186
188
|
})
|
|
187
|
-
}, (
|
|
189
|
+
}, (o, a) => (n(), u(K, {
|
|
188
190
|
item: p(t),
|
|
189
191
|
class: "input"
|
|
190
192
|
}, null, 8, ["item"]));
|
|
191
193
|
}
|
|
192
|
-
}), ze =
|
|
194
|
+
}), ze = b({
|
|
193
195
|
components: {
|
|
194
196
|
slotArchive: (e) => {
|
|
195
|
-
const { templateEle:
|
|
196
|
-
return
|
|
197
|
+
const { templateEle: t } = e;
|
|
198
|
+
return t();
|
|
197
199
|
}
|
|
198
200
|
},
|
|
199
201
|
props: {
|
|
@@ -205,7 +207,8 @@ const ke = /* @__PURE__ */ w(be, [["__scopeId", "data-v-4074e137"]]), Se = /* @_
|
|
|
205
207
|
data() {
|
|
206
208
|
return {
|
|
207
209
|
dividerSetting: {
|
|
208
|
-
...this.item.dividerSetting
|
|
210
|
+
...this.item.dividerSetting,
|
|
211
|
+
...this.item.setting
|
|
209
212
|
}
|
|
210
213
|
};
|
|
211
214
|
},
|
|
@@ -215,44 +218,45 @@ const ke = /* @__PURE__ */ w(be, [["__scopeId", "data-v-4074e137"]]), Se = /* @_
|
|
|
215
218
|
}
|
|
216
219
|
}
|
|
217
220
|
});
|
|
218
|
-
function $e(e,
|
|
219
|
-
const
|
|
220
|
-
return
|
|
221
|
-
|
|
222
|
-
name:
|
|
221
|
+
function $e(e, t, o, a, r, l) {
|
|
222
|
+
const d = m("el-divider");
|
|
223
|
+
return n(), u(d, ie(ae(e.dividerSetting)), J({ _: 2 }, [
|
|
224
|
+
P(e.item.template, (s, c) => ({
|
|
225
|
+
name: c,
|
|
223
226
|
fn: f(() => [
|
|
224
|
-
|
|
225
|
-
key:
|
|
226
|
-
templateEle:
|
|
227
|
-
}, null, 8, ["templateEle"])) :
|
|
227
|
+
s ? (n(), u(W(e.currentInputComponent()), {
|
|
228
|
+
key: c,
|
|
229
|
+
templateEle: s
|
|
230
|
+
}, null, 8, ["templateEle"])) : _("", !0)
|
|
228
231
|
])
|
|
229
232
|
}))
|
|
230
233
|
]), 1040);
|
|
231
234
|
}
|
|
232
|
-
const Pe = /* @__PURE__ */ w(ze, [["render", $e]]), qe = /* @__PURE__ */
|
|
235
|
+
const Pe = /* @__PURE__ */ w(ze, [["render", $e]]), qe = /* @__PURE__ */ b({
|
|
233
236
|
__name: "index",
|
|
234
237
|
props: {
|
|
235
238
|
item: {}
|
|
236
239
|
},
|
|
237
240
|
setup(e) {
|
|
238
|
-
const
|
|
239
|
-
...
|
|
241
|
+
const t = y("queryParams", {}), o = y("size"), a = v({
|
|
242
|
+
...e.item.radioGroupSetting,
|
|
243
|
+
...e.item.setting
|
|
240
244
|
});
|
|
241
|
-
return (
|
|
242
|
-
const
|
|
243
|
-
return
|
|
244
|
-
modelValue: p(t)[
|
|
245
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
246
|
-
size: p(
|
|
247
|
-
},
|
|
245
|
+
return (r, l) => {
|
|
246
|
+
const d = m("el-radio"), s = m("el-radio-group");
|
|
247
|
+
return n(), u(s, h({
|
|
248
|
+
modelValue: p(t)[r.item.prop],
|
|
249
|
+
"onUpdate:modelValue": l[0] || (l[0] = (c) => p(t)[r.item.prop] = c),
|
|
250
|
+
size: p(o)
|
|
251
|
+
}, a.value), {
|
|
248
252
|
default: f(() => [
|
|
249
|
-
(
|
|
250
|
-
size: p(
|
|
251
|
-
key:
|
|
253
|
+
(n(!0), k(I, null, P(r.item.option || [], (c) => (n(), u(d, h({
|
|
254
|
+
size: p(o),
|
|
255
|
+
key: c.value,
|
|
252
256
|
ref_for: !0
|
|
253
|
-
},
|
|
257
|
+
}, c), {
|
|
254
258
|
default: f(() => [
|
|
255
|
-
|
|
259
|
+
V(D(c.label), 1)
|
|
256
260
|
]),
|
|
257
261
|
_: 2
|
|
258
262
|
}, 1040, ["size"]))), 128))
|
|
@@ -261,30 +265,31 @@ const Pe = /* @__PURE__ */ w(ze, [["render", $e]]), qe = /* @__PURE__ */ k({
|
|
|
261
265
|
}, 16, ["modelValue", "size"]);
|
|
262
266
|
};
|
|
263
267
|
}
|
|
264
|
-
}), Ve = /* @__PURE__ */
|
|
268
|
+
}), Ve = /* @__PURE__ */ b({
|
|
265
269
|
__name: "index",
|
|
266
270
|
props: {
|
|
267
271
|
item: {}
|
|
268
272
|
},
|
|
269
273
|
setup(e) {
|
|
270
|
-
const
|
|
271
|
-
...
|
|
274
|
+
const t = y("queryParams", {}), o = y("size"), a = v({
|
|
275
|
+
...e.item.checkboxGroupSetting,
|
|
276
|
+
...e.item.setting
|
|
272
277
|
});
|
|
273
|
-
return (
|
|
274
|
-
const
|
|
275
|
-
return
|
|
276
|
-
modelValue: p(t)[
|
|
277
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
278
|
-
size: p(
|
|
279
|
-
},
|
|
278
|
+
return (r, l) => {
|
|
279
|
+
const d = m("el-checkbox"), s = m("el-checkbox-group");
|
|
280
|
+
return n(), u(s, h({
|
|
281
|
+
modelValue: p(t)[r.item.prop],
|
|
282
|
+
"onUpdate:modelValue": l[0] || (l[0] = (c) => p(t)[r.item.prop] = c),
|
|
283
|
+
size: p(o)
|
|
284
|
+
}, a.value), {
|
|
280
285
|
default: f(() => [
|
|
281
|
-
(
|
|
282
|
-
size: p(
|
|
283
|
-
key:
|
|
286
|
+
(n(!0), k(I, null, P(r.item.option || [], (c) => (n(), u(d, h({
|
|
287
|
+
size: p(o),
|
|
288
|
+
key: c.value,
|
|
284
289
|
ref_for: !0
|
|
285
|
-
},
|
|
290
|
+
}, c), {
|
|
286
291
|
default: f(() => [
|
|
287
|
-
|
|
292
|
+
V(D(c.label), 1)
|
|
288
293
|
]),
|
|
289
294
|
_: 2
|
|
290
295
|
}, 1040, ["size"]))), 128))
|
|
@@ -293,77 +298,80 @@ const Pe = /* @__PURE__ */ w(ze, [["render", $e]]), qe = /* @__PURE__ */ k({
|
|
|
293
298
|
}, 16, ["modelValue", "size"]);
|
|
294
299
|
};
|
|
295
300
|
}
|
|
296
|
-
}), Ie = /* @__PURE__ */
|
|
301
|
+
}), Ie = /* @__PURE__ */ b({
|
|
297
302
|
__name: "index",
|
|
298
303
|
props: {
|
|
299
304
|
item: {}
|
|
300
305
|
},
|
|
301
306
|
setup(e) {
|
|
302
|
-
const
|
|
307
|
+
const t = y("queryParams", {}), o = y("size"), a = v({
|
|
303
308
|
...pe,
|
|
304
|
-
...
|
|
309
|
+
...e.item.datePackerSetting,
|
|
310
|
+
...e.item.setting
|
|
305
311
|
});
|
|
306
|
-
return (
|
|
307
|
-
const
|
|
308
|
-
return
|
|
309
|
-
modelValue: p(t)[
|
|
310
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
311
|
-
size: p(
|
|
312
|
-
},
|
|
312
|
+
return (r, l) => {
|
|
313
|
+
const d = m("el-date-picker");
|
|
314
|
+
return n(), u(d, h({
|
|
315
|
+
modelValue: p(t)[r.item.prop],
|
|
316
|
+
"onUpdate:modelValue": l[0] || (l[0] = (s) => p(t)[r.item.prop] = s),
|
|
317
|
+
size: p(o)
|
|
318
|
+
}, a.value), null, 16, ["modelValue", "size"]);
|
|
313
319
|
};
|
|
314
320
|
}
|
|
315
|
-
}), Le = /* @__PURE__ */
|
|
321
|
+
}), Le = /* @__PURE__ */ b({
|
|
316
322
|
__name: "index",
|
|
317
323
|
props: {
|
|
318
324
|
item: {}
|
|
319
325
|
},
|
|
320
326
|
setup(e) {
|
|
321
|
-
const
|
|
327
|
+
const t = y("queryParams", {}), o = y("size"), a = v({
|
|
322
328
|
...Y,
|
|
323
|
-
...
|
|
329
|
+
...e.item.selectSetting,
|
|
330
|
+
...e.item.setting
|
|
324
331
|
});
|
|
325
|
-
return (
|
|
326
|
-
const
|
|
327
|
-
return
|
|
328
|
-
modelValue: p(t)[
|
|
329
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
330
|
-
size: p(
|
|
331
|
-
},
|
|
332
|
+
return (r, l) => {
|
|
333
|
+
const d = m("el-option"), s = m("el-select");
|
|
334
|
+
return n(), u(s, h({
|
|
335
|
+
modelValue: p(t)[r.item.prop],
|
|
336
|
+
"onUpdate:modelValue": l[0] || (l[0] = (c) => p(t)[r.item.prop] = c),
|
|
337
|
+
size: p(o)
|
|
338
|
+
}, a.value), {
|
|
332
339
|
default: f(() => [
|
|
333
|
-
(
|
|
334
|
-
key:
|
|
340
|
+
(n(!0), k(I, null, P(r.item.option || [], (c) => (n(), u(d, h({
|
|
341
|
+
key: c.value,
|
|
335
342
|
ref_for: !0
|
|
336
|
-
},
|
|
343
|
+
}, c), null, 16))), 128))
|
|
337
344
|
]),
|
|
338
345
|
_: 1
|
|
339
346
|
}, 16, ["modelValue", "size"]);
|
|
340
347
|
};
|
|
341
348
|
}
|
|
342
|
-
}), Ce = /* @__PURE__ */
|
|
349
|
+
}), Ce = /* @__PURE__ */ b({
|
|
343
350
|
__name: "index",
|
|
344
351
|
props: {
|
|
345
352
|
item: {}
|
|
346
353
|
},
|
|
347
354
|
setup(e) {
|
|
348
|
-
const
|
|
355
|
+
const t = y("queryParams", {}), o = y("size"), a = v({
|
|
349
356
|
...Y,
|
|
350
|
-
...
|
|
357
|
+
...e.item.selectSetting,
|
|
358
|
+
...e.item.setting
|
|
351
359
|
});
|
|
352
|
-
return (
|
|
353
|
-
const
|
|
354
|
-
return
|
|
355
|
-
modelValue: p(t)[
|
|
356
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
357
|
-
size: p(
|
|
358
|
-
options:
|
|
359
|
-
},
|
|
360
|
+
return (r, l) => {
|
|
361
|
+
const d = m("el-cascader");
|
|
362
|
+
return n(), u(d, h({
|
|
363
|
+
modelValue: p(t)[r.item.prop],
|
|
364
|
+
"onUpdate:modelValue": l[0] || (l[0] = (s) => p(t)[r.item.prop] = s),
|
|
365
|
+
size: p(o),
|
|
366
|
+
options: r.item.options || []
|
|
367
|
+
}, a.value), null, 16, ["modelValue", "size", "options"]);
|
|
360
368
|
};
|
|
361
369
|
}
|
|
362
|
-
}), De =
|
|
370
|
+
}), De = b({
|
|
363
371
|
name: "GeneralBasicForm",
|
|
364
372
|
components: {
|
|
365
373
|
Input: K,
|
|
366
|
-
InputNumber:
|
|
374
|
+
InputNumber: fe,
|
|
367
375
|
InputGraphicVerification: ge,
|
|
368
376
|
InputMobileVerification: Se,
|
|
369
377
|
Divider: Pe,
|
|
@@ -440,32 +448,32 @@ const Pe = /* @__PURE__ */ w(ze, [["render", $e]]), qe = /* @__PURE__ */ k({
|
|
|
440
448
|
};
|
|
441
449
|
},
|
|
442
450
|
setup(e) {
|
|
443
|
-
const { size:
|
|
444
|
-
...
|
|
451
|
+
const { size: t, noUrlParameters: o, getList: a } = e, r = ce(), l = v({
|
|
452
|
+
...o ? {} : r == null ? void 0 : r.query
|
|
445
453
|
});
|
|
446
454
|
return O(
|
|
447
455
|
/* 注入名 */
|
|
448
456
|
"queryParams",
|
|
449
457
|
/* 值 */
|
|
450
|
-
|
|
458
|
+
l
|
|
451
459
|
), O(
|
|
452
460
|
/* 注入名 */
|
|
453
461
|
"size",
|
|
454
462
|
/* 值 */
|
|
455
|
-
|
|
463
|
+
t
|
|
456
464
|
), O(
|
|
457
465
|
/* 注入名 */
|
|
458
466
|
"getList",
|
|
459
467
|
/* 值 */
|
|
460
468
|
a
|
|
461
469
|
), {
|
|
462
|
-
queryParams:
|
|
470
|
+
queryParams: l
|
|
463
471
|
};
|
|
464
472
|
},
|
|
465
473
|
watch: {
|
|
466
474
|
formData: {
|
|
467
|
-
handler(e,
|
|
468
|
-
JSON.stringify(e) !== JSON.stringify(
|
|
475
|
+
handler(e, t) {
|
|
476
|
+
JSON.stringify(e) !== JSON.stringify(t) && (this.queryParams = {
|
|
469
477
|
...this.noUrlParameters ? {} : this.queryParams,
|
|
470
478
|
...e
|
|
471
479
|
});
|
|
@@ -502,32 +510,32 @@ const Pe = /* @__PURE__ */ w(ze, [["render", $e]]), qe = /* @__PURE__ */ k({
|
|
|
502
510
|
methods: {
|
|
503
511
|
/** 搜索按钮操作 */
|
|
504
512
|
handleQuery() {
|
|
505
|
-
var
|
|
506
|
-
const e = { page: 1, limit: 10 },
|
|
507
|
-
...(
|
|
513
|
+
var o;
|
|
514
|
+
const e = { page: 1, limit: 10 }, t = {
|
|
515
|
+
...(o = this.$route) == null ? void 0 : o.query,
|
|
508
516
|
...this.queryParams,
|
|
509
517
|
...e
|
|
510
518
|
};
|
|
511
519
|
this.noUrlParameters || this.$router.push({
|
|
512
|
-
query: { ...
|
|
520
|
+
query: { ...t }
|
|
513
521
|
}), this.getList({
|
|
514
|
-
...
|
|
522
|
+
...t
|
|
515
523
|
});
|
|
516
524
|
},
|
|
517
525
|
/** 重置按钮操作 */
|
|
518
526
|
async resetQuery() {
|
|
519
|
-
var
|
|
527
|
+
var t;
|
|
520
528
|
this.$refs.queryFormRef.resetFields();
|
|
521
529
|
const e = { page: 1 };
|
|
522
530
|
this.noUrlParameters || await this.$router.push({
|
|
523
531
|
query: { ...e }
|
|
524
532
|
}), this.queryParams = {
|
|
525
|
-
...this.noUrlParameters ? {} : (
|
|
533
|
+
...this.noUrlParameters ? {} : (t = this.$route) == null ? void 0 : t.query
|
|
526
534
|
}, this.afterReset(), this.handleQuery();
|
|
527
535
|
},
|
|
528
536
|
getItemRules(e) {
|
|
529
|
-
const { type:
|
|
530
|
-
return this.noInputBlank &&
|
|
537
|
+
const { type: t, rules: o = [] } = e, a = [...o];
|
|
538
|
+
return this.noInputBlank && t === "input" && a.push({
|
|
531
539
|
pattern: this.trimRegex,
|
|
532
540
|
message: "请输入(不能仅输入空格)",
|
|
533
541
|
trigger: "blur"
|
|
@@ -535,9 +543,9 @@ const Pe = /* @__PURE__ */ w(ze, [["render", $e]]), qe = /* @__PURE__ */ k({
|
|
|
535
543
|
}
|
|
536
544
|
}
|
|
537
545
|
});
|
|
538
|
-
function we(e,
|
|
539
|
-
const
|
|
540
|
-
return C((
|
|
546
|
+
function we(e, t, o, a, r, l) {
|
|
547
|
+
const d = m("Input"), s = m("Radio"), c = m("Select"), z = m("Divider"), $ = m("Cascader"), L = m("Checkbox"), F = m("DatePicker"), G = m("InputNumber"), N = m("InputMobileVerification"), x = m("InputGraphicVerification"), q = m("el-form-item"), R = m("el-button"), E = m("el-form"), g = U("loading");
|
|
548
|
+
return C((n(), u(E, h({
|
|
541
549
|
model: e.queryParams,
|
|
542
550
|
ref: "queryFormRef",
|
|
543
551
|
inline: "",
|
|
@@ -545,79 +553,79 @@ function we(e, n, t, a, i, s) {
|
|
|
545
553
|
"label-width": e.labelWidth
|
|
546
554
|
}, e.$attrs), {
|
|
547
555
|
default: f(() => [
|
|
548
|
-
(
|
|
549
|
-
label:
|
|
550
|
-
prop:
|
|
551
|
-
key:
|
|
552
|
-
rules: e.getItemRules(
|
|
556
|
+
(n(!0), k(I, null, P(e.formItem, (i) => (n(), u(q, {
|
|
557
|
+
label: i.label,
|
|
558
|
+
prop: i.prop,
|
|
559
|
+
key: i.prop,
|
|
560
|
+
rules: e.getItemRules(i)
|
|
553
561
|
}, {
|
|
554
562
|
default: f(() => [
|
|
555
|
-
|
|
563
|
+
i.type === "input" ? (n(), u(d, {
|
|
556
564
|
key: 0,
|
|
557
|
-
item:
|
|
558
|
-
}, null, 8, ["item"])) :
|
|
559
|
-
|
|
565
|
+
item: i
|
|
566
|
+
}, null, 8, ["item"])) : _("", !0),
|
|
567
|
+
i.type === "radio" ? (n(), u(s, {
|
|
560
568
|
key: 1,
|
|
561
|
-
item:
|
|
562
|
-
}, null, 8, ["item"])) :
|
|
563
|
-
|
|
569
|
+
item: i
|
|
570
|
+
}, null, 8, ["item"])) : _("", !0),
|
|
571
|
+
i.type === "select" ? (n(), u(c, {
|
|
564
572
|
key: 2,
|
|
565
|
-
item:
|
|
566
|
-
}, null, 8, ["item"])) :
|
|
567
|
-
|
|
573
|
+
item: i
|
|
574
|
+
}, null, 8, ["item"])) : _("", !0),
|
|
575
|
+
i.type === "divider" ? (n(), u(z, {
|
|
568
576
|
key: 3,
|
|
569
|
-
item:
|
|
570
|
-
}, null, 8, ["item"])) :
|
|
571
|
-
|
|
577
|
+
item: i
|
|
578
|
+
}, null, 8, ["item"])) : _("", !0),
|
|
579
|
+
i.type === "cascader" ? (n(), u($, {
|
|
572
580
|
key: 4,
|
|
573
|
-
item:
|
|
574
|
-
}, null, 8, ["item"])) :
|
|
575
|
-
|
|
581
|
+
item: i
|
|
582
|
+
}, null, 8, ["item"])) : _("", !0),
|
|
583
|
+
i.type === "checkbox" ? (n(), u(L, {
|
|
576
584
|
key: 5,
|
|
577
|
-
item:
|
|
578
|
-
}, null, 8, ["item"])) :
|
|
579
|
-
|
|
585
|
+
item: i
|
|
586
|
+
}, null, 8, ["item"])) : _("", !0),
|
|
587
|
+
i.type === "date-picker" ? (n(), u(F, {
|
|
580
588
|
key: 6,
|
|
581
|
-
item:
|
|
582
|
-
}, null, 8, ["item"])) :
|
|
583
|
-
|
|
589
|
+
item: i
|
|
590
|
+
}, null, 8, ["item"])) : _("", !0),
|
|
591
|
+
i.type === "input-number" ? (n(), u(G, {
|
|
584
592
|
key: 7,
|
|
585
|
-
item:
|
|
586
|
-
}, null, 8, ["item"])) :
|
|
587
|
-
|
|
588
|
-
|
|
593
|
+
item: i
|
|
594
|
+
}, null, 8, ["item"])) : _("", !0),
|
|
595
|
+
i.type === "form-item-slot" ? Q(e.$slots, i.name, { key: 8 }) : _("", !0),
|
|
596
|
+
i.type === "input-mobile-verification" ? (n(), u(N, {
|
|
589
597
|
key: 9,
|
|
590
|
-
item:
|
|
591
|
-
}, null, 8, ["item"])) :
|
|
592
|
-
|
|
593
|
-
item:
|
|
594
|
-
key:
|
|
595
|
-
}, null, 8, ["item"])) :
|
|
598
|
+
item: i
|
|
599
|
+
}, null, 8, ["item"])) : _("", !0),
|
|
600
|
+
i.type === "input-graphic-verification" ? (n(), u(x, {
|
|
601
|
+
item: i,
|
|
602
|
+
key: i.key
|
|
603
|
+
}, null, 8, ["item"])) : _("", !0)
|
|
596
604
|
]),
|
|
597
605
|
_: 2
|
|
598
606
|
}, 1032, ["label", "prop", "rules"]))), 128)),
|
|
599
607
|
Q(e.$slots, "default"),
|
|
600
|
-
e.formOnly ?
|
|
608
|
+
e.formOnly ? _("", !0) : (n(), u(q, { key: 0 }, {
|
|
601
609
|
default: f(() => [
|
|
602
|
-
C((
|
|
610
|
+
C((n(), u(R, {
|
|
603
611
|
type: "primary",
|
|
604
612
|
size: e.size,
|
|
605
613
|
onClick: e.handleQuery
|
|
606
614
|
}, {
|
|
607
|
-
default: f(() => [
|
|
608
|
-
|
|
609
|
-
]),
|
|
615
|
+
default: f(() => t[0] || (t[0] = [
|
|
616
|
+
V("查询")
|
|
617
|
+
])),
|
|
610
618
|
_: 1
|
|
611
619
|
}, 8, ["size", "onClick"])), [
|
|
612
|
-
[
|
|
620
|
+
[g, e.formLoading]
|
|
613
621
|
]),
|
|
614
622
|
T(R, {
|
|
615
623
|
size: e.size,
|
|
616
624
|
onClick: e.resetQuery
|
|
617
625
|
}, {
|
|
618
|
-
default: f(() => [
|
|
619
|
-
|
|
620
|
-
]),
|
|
626
|
+
default: f(() => t[1] || (t[1] = [
|
|
627
|
+
V("重置")
|
|
628
|
+
])),
|
|
621
629
|
_: 1
|
|
622
630
|
}, 8, ["size", "onClick"])
|
|
623
631
|
]),
|
|
@@ -630,7 +638,7 @@ function we(e, n, t, a, i, s) {
|
|
|
630
638
|
[le, e.showSearch]
|
|
631
639
|
]);
|
|
632
640
|
}
|
|
633
|
-
const xe = /* @__PURE__ */ w(De, [["render", we]]), Be = ["infinite-scroll-disabled"], Fe = ["infinite-scroll-disabled"], Re = { class: "checkbox" }, Ue = /* @__PURE__ */
|
|
641
|
+
const xe = /* @__PURE__ */ w(De, [["render", we]]), Be = ["infinite-scroll-disabled"], Fe = ["infinite-scroll-disabled"], Re = { class: "checkbox" }, Ue = /* @__PURE__ */ b({
|
|
634
642
|
__name: "InfiniteScrollList",
|
|
635
643
|
props: {
|
|
636
644
|
search: {
|
|
@@ -658,104 +666,104 @@ const xe = /* @__PURE__ */ w(De, [["render", we]]), Be = ["infinite-scroll-disab
|
|
|
658
666
|
required: !1
|
|
659
667
|
}
|
|
660
668
|
},
|
|
661
|
-
setup(e, { expose:
|
|
662
|
-
const
|
|
663
|
-
const { i: A } =
|
|
664
|
-
return
|
|
665
|
-
}, G = (
|
|
666
|
-
|
|
669
|
+
setup(e, { expose: t }) {
|
|
670
|
+
const o = e, { search: a, id: r, name: l, extra: d } = o, s = v([]), c = v(1), z = v(!1), $ = v([]), L = v(!1), F = (g, i) => {
|
|
671
|
+
const { i: A } = g;
|
|
672
|
+
return d && d !== "false" ? d(A) : "";
|
|
673
|
+
}, G = (g) => {
|
|
674
|
+
$.value = g.map((i) => typeof i == "object" ? i[r] : i);
|
|
667
675
|
};
|
|
668
676
|
ue(
|
|
669
|
-
() =>
|
|
670
|
-
(
|
|
671
|
-
G(
|
|
677
|
+
() => o.defaultSelection,
|
|
678
|
+
(g = [], i = []) => {
|
|
679
|
+
G(g);
|
|
672
680
|
},
|
|
673
681
|
{ immediate: !0 }
|
|
674
682
|
);
|
|
675
683
|
const N = () => {
|
|
676
|
-
x(),
|
|
684
|
+
x(), $.value = [];
|
|
677
685
|
}, x = () => {
|
|
678
|
-
|
|
679
|
-
},
|
|
680
|
-
if (
|
|
686
|
+
c.value = 1, s.value = [], z.value = !1;
|
|
687
|
+
}, q = async () => {
|
|
688
|
+
if (L.value || z.value)
|
|
681
689
|
return;
|
|
682
|
-
|
|
683
|
-
const
|
|
684
|
-
|
|
690
|
+
L.value = !0;
|
|
691
|
+
const g = await a(c.value);
|
|
692
|
+
g && g.length > 0 ? (s.value = [...s.value, ...g], c.value += 1) : z.value = !0, L.value = !1;
|
|
685
693
|
}, R = () => {
|
|
686
|
-
x(),
|
|
694
|
+
x(), q();
|
|
687
695
|
}, E = j(
|
|
688
|
-
() =>
|
|
696
|
+
() => s.value.filter((g) => $.value.includes(g[r]))
|
|
689
697
|
) || {};
|
|
690
|
-
return
|
|
698
|
+
return t({
|
|
691
699
|
reset: N,
|
|
692
700
|
lowReset: x,
|
|
693
|
-
loadList:
|
|
701
|
+
loadList: q,
|
|
694
702
|
selectInfo: E,
|
|
695
|
-
list:
|
|
696
|
-
ifbottom:
|
|
703
|
+
list: s,
|
|
704
|
+
ifbottom: z,
|
|
697
705
|
refreshList: R
|
|
698
|
-
}), (
|
|
699
|
-
const A =
|
|
700
|
-
return
|
|
706
|
+
}), (g, i) => {
|
|
707
|
+
const A = m("el-checkbox"), ee = m("el-checkbox-group"), M = U("infinite-scroll"), te = U("loading");
|
|
708
|
+
return o.checkbox ? C((n(), u(ee, h({
|
|
701
709
|
key: 0,
|
|
702
|
-
modelValue:
|
|
703
|
-
"onUpdate:modelValue":
|
|
704
|
-
},
|
|
710
|
+
modelValue: $.value,
|
|
711
|
+
"onUpdate:modelValue": i[0] || (i[0] = (S) => $.value = S)
|
|
712
|
+
}, o), {
|
|
705
713
|
default: f(() => [
|
|
706
|
-
C((
|
|
714
|
+
C((n(), k("ul", {
|
|
707
715
|
class: "list",
|
|
708
|
-
"infinite-scroll-disabled":
|
|
716
|
+
"infinite-scroll-disabled": z.value
|
|
709
717
|
}, [
|
|
710
|
-
(
|
|
711
|
-
key:
|
|
718
|
+
(n(!0), k(I, null, P(s.value, (S) => (n(), k("li", {
|
|
719
|
+
key: S[p(r)],
|
|
712
720
|
class: "list-item"
|
|
713
721
|
}, [
|
|
714
722
|
T(A, {
|
|
715
|
-
value:
|
|
723
|
+
value: S[p(r)],
|
|
716
724
|
class: "checkbox"
|
|
717
725
|
}, {
|
|
718
726
|
default: f(() => [
|
|
719
|
-
|
|
720
|
-
|
|
727
|
+
V(D(S[p(l)]) + " ", 1),
|
|
728
|
+
o.extra ? (n(), u(F, {
|
|
721
729
|
key: 0,
|
|
722
|
-
i:
|
|
723
|
-
}, null, 8, ["i"])) :
|
|
730
|
+
i: S
|
|
731
|
+
}, null, 8, ["i"])) : _("", !0)
|
|
724
732
|
]),
|
|
725
733
|
_: 2
|
|
726
734
|
}, 1032, ["value"])
|
|
727
735
|
]))), 128))
|
|
728
736
|
], 8, Be)), [
|
|
729
|
-
[M,
|
|
737
|
+
[M, q]
|
|
730
738
|
])
|
|
731
739
|
]),
|
|
732
740
|
_: 1
|
|
733
741
|
}, 16, ["modelValue"])), [
|
|
734
|
-
[te,
|
|
735
|
-
]) : C((
|
|
742
|
+
[te, L.value]
|
|
743
|
+
]) : C((n(), k("ul", h({
|
|
736
744
|
key: 1,
|
|
737
745
|
class: "list",
|
|
738
|
-
"infinite-scroll-disabled":
|
|
739
|
-
},
|
|
740
|
-
(
|
|
741
|
-
key:
|
|
746
|
+
"infinite-scroll-disabled": z.value
|
|
747
|
+
}, o), [
|
|
748
|
+
(n(!0), k(I, null, P(s.value, (S) => (n(), k("li", {
|
|
749
|
+
key: S[p(r)],
|
|
742
750
|
class: "list-item"
|
|
743
751
|
}, [
|
|
744
752
|
H("div", Re, [
|
|
745
|
-
|
|
746
|
-
|
|
753
|
+
V(D(S[p(l)]) + " ", 1),
|
|
754
|
+
o.extra ? (n(), u(F, {
|
|
747
755
|
key: 0,
|
|
748
|
-
i:
|
|
749
|
-
}, null, 8, ["i"])) :
|
|
756
|
+
i: S
|
|
757
|
+
}, null, 8, ["i"])) : _("", !0)
|
|
750
758
|
])
|
|
751
759
|
]))), 128))
|
|
752
760
|
], 16, Fe)), [
|
|
753
|
-
[M,
|
|
761
|
+
[M, q]
|
|
754
762
|
]);
|
|
755
763
|
};
|
|
756
764
|
}
|
|
757
765
|
});
|
|
758
|
-
const Ge = /* @__PURE__ */ w(Ue, [["__scopeId", "data-v-77737aab"]]), Ne = { key: 1 }, Ee = /* @__PURE__ */
|
|
766
|
+
const Ge = /* @__PURE__ */ w(Ue, [["__scopeId", "data-v-77737aab"]]), Ne = { key: 1 }, Ee = /* @__PURE__ */ b({
|
|
759
767
|
__name: "Descriptions",
|
|
760
768
|
props: {
|
|
761
769
|
formData: {
|
|
@@ -768,33 +776,33 @@ const Ge = /* @__PURE__ */ w(Ue, [["__scopeId", "data-v-77737aab"]]), Ne = { key
|
|
|
768
776
|
}
|
|
769
777
|
},
|
|
770
778
|
setup(e) {
|
|
771
|
-
const
|
|
772
|
-
const { i:
|
|
773
|
-
return
|
|
774
|
-
row:
|
|
775
|
-
$index:
|
|
779
|
+
const t = e, o = (a, r) => {
|
|
780
|
+
const { i: l, render: d, formData: s } = a;
|
|
781
|
+
return d({
|
|
782
|
+
row: s,
|
|
783
|
+
$index: l
|
|
776
784
|
});
|
|
777
785
|
};
|
|
778
|
-
return (a,
|
|
779
|
-
const
|
|
780
|
-
return
|
|
786
|
+
return (a, r) => {
|
|
787
|
+
const l = m("el-descriptions-item"), d = m("el-descriptions");
|
|
788
|
+
return n(), u(d, h({
|
|
781
789
|
column: 1,
|
|
782
790
|
border: "",
|
|
783
791
|
class: "form-width"
|
|
784
|
-
},
|
|
792
|
+
}, t), {
|
|
785
793
|
default: f(() => [
|
|
786
|
-
(
|
|
787
|
-
key:
|
|
788
|
-
label:
|
|
794
|
+
(n(!0), k(I, null, P(t.formItem, (s, c) => (n(), u(l, h({
|
|
795
|
+
key: s.prop,
|
|
796
|
+
label: s.label,
|
|
789
797
|
ref_for: !0
|
|
790
|
-
},
|
|
798
|
+
}, s.descriptionsItemProps), {
|
|
791
799
|
default: f(() => [
|
|
792
|
-
|
|
800
|
+
s.render ? (n(), u(o, {
|
|
793
801
|
key: 0,
|
|
794
|
-
i:
|
|
795
|
-
render:
|
|
802
|
+
i: c,
|
|
803
|
+
render: s.render,
|
|
796
804
|
formData: e.formData
|
|
797
|
-
}, null, 8, ["i", "render", "formData"])) : (
|
|
805
|
+
}, null, 8, ["i", "render", "formData"])) : (n(), k("span", Ne, D(e.formData[s.prop]), 1))
|
|
798
806
|
]),
|
|
799
807
|
_: 2
|
|
800
808
|
}, 1040, ["label"]))), 128))
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(f,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):(f=typeof globalThis<"u"?globalThis:f||self,e(f.Index={},f.Vue,f["vue-router"]))})(this,function(f,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: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:{...z,...this.item.inputSetting}}},methods:{currentInputComponent(){return"input-archive"}}}),h=(t,n)=>{const o=t.__vccOpts||t;for(const[i,s]of n)o[i]=s;return o};function F(t,n,o,i,s,l){const a=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(a,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,m)=>({name:m,fn:e.withCtx(()=>[r?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.currentInputComponent()),{key:m,templateEle:r},null,8,["templateEle"])):e.createCommentVNode("",!0)])}))]),1040,["onKeydown","modelValue","size"])}const V=h(N,[["render",F]]),E=e.defineComponent({__name:"index",props:{item:{}},setup(t){const{item:n}=t,o=e.inject("queryParams",{}),i=e.inject("size"),s=e.ref({...z,...n.inputSetting});return(l,a)=>{const r=e.resolveComponent("el-input-number");return e.openBlock(),e.createBlock(r,e.mergeProps({modelValue:e.unref(o)[l.item.prop],"onUpdate:modelValue":a[0]||(a[0]=m=>e.unref(o)[l.item.prop]=m),size:e.unref(i)},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{item:n}=t,{graphicSrc:o="",graphicAlt:i="",getGraphic:s=()=>{},key:l}=n,{formLoading:a,updateFormLoading:r}=e.inject(q),m=async()=>{s&&!a.value&&await s()};return(p,k)=>{const u=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createElementBlock("div",j,[e.createVNode(V,{item:p.item,class:"input"},null,8,["item"]),e.createElementVNode("img",{class:"graphic",onClick:m,src:e.unref(o),alt:e.unref(i)||`${e.unref(l)}`},null,8,R)])),[[u,e.unref(a)]])}}}),_e="",T=h(U,[["__scopeId","data-v-006751c3"]]),g="获取验证码",G=60,A=e.defineComponent({__name:"verification-button",props:{getSmscode:{type:Function}},setup(t){const{getSmscode:n}=t,o=e.ref(g),i=e.ref(null),s=e.computed(()=>o.value===g),l=()=>{i&&(clearInterval(i.value),i.value=null,o.value=g)},a=async()=>{if(o.value===g)if(o.value=G,i.value=setInterval(()=>{if(Number(o.value)<=0||!o.value){l();return}else o.value=Number(o.value)-1},1e3),n)await n()===!1&&l();else return};return e.onBeforeUnmount(()=>{l()}),(r,m)=>{const p=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(p,{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?g:o.value+"s"),1)]),_:1},8,["style"])}}}),ke="",O=h(A,[["__scopeId","data-v-4074e137"]]),Q=e.defineComponent({__name:"index",props:{item:{}},setup(t){const{item:n}=t,o=n;return o.template={append:()=>e.h(O,{getSmscode:o.getSmscode})},(i,s)=>(e.openBlock(),e.createBlock(V,{item:e.unref(o),class:"input"},null,8,["item"]))}}),K=e.defineComponent({components:{slotArchive:t=>{const{templateEle:n}=t;return n()}},props:{item:null},setup(){},data(){return{dividerSetting:{...this.item.dividerSetting}}},methods:{currentInputComponent(){return"slot-archive"}}});function M(t,n,o,i,s,l){const a=e.resolveComponent("el-divider");return e.openBlock(),e.createBlock(a,e.normalizeProps(e.guardReactiveProps(t.dividerSetting)),e.createSlots({_:2},[e.renderList(t.item.template,(r,m)=>({name:m,fn:e.withCtx(()=>[r?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.currentInputComponent()),{key:m,templateEle:r},null,8,["templateEle"])):e.createCommentVNode("",!0)])}))]),1040)}const J=h(K,[["render",M]]),W=e.defineComponent({__name:"index",props:{item:{}},setup(t){const{item:n}=t,o=e.inject("queryParams",{}),i=e.inject("size"),s=e.ref({...n.radioGroupSetting});return(l,a)=>{const r=e.resolveComponent("el-radio"),m=e.resolveComponent("el-radio-group");return e.openBlock(),e.createBlock(m,e.mergeProps({modelValue:e.unref(o)[l.item.prop],"onUpdate:modelValue":a[0]||(a[0]=p=>e.unref(o)[l.item.prop]=p),size:e.unref(i)},s.value),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.item.option||[],p=>(e.openBlock(),e.createBlock(r,e.mergeProps({size:e.unref(i),key:p.value,ref_for:!0},p),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.label),1)]),_:2},1040,["size"]))),128))]),_:1},16,["modelValue","size"])}}}),H=e.defineComponent({__name:"index",props:{item:{}},setup(t){const{item:n}=t,o=e.inject("queryParams",{}),i=e.inject("size"),s=e.ref({...n.checkboxGroupSetting});return(l,a)=>{const r=e.resolveComponent("el-checkbox"),m=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createBlock(m,e.mergeProps({modelValue:e.unref(o)[l.item.prop],"onUpdate:modelValue":a[0]||(a[0]=p=>e.unref(o)[l.item.prop]=p),size:e.unref(i)},s.value),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.item.option||[],p=>(e.openBlock(),e.createBlock(r,e.mergeProps({size:e.unref(i),key:p.value,ref_for:!0},p),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.label),1)]),_:2},1040,["size"]))),128))]),_:1},16,["modelValue","size"])}}}),X=e.defineComponent({__name:"index",props:{item:{}},setup(t){const{item:n}=t,o=e.inject("queryParams",{}),i=e.inject("size"),s=e.ref({...L,...n.datePackerSetting});return(l,a)=>{const r=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(r,e.mergeProps({modelValue:e.unref(o)[l.item.prop],"onUpdate:modelValue":a[0]||(a[0]=m=>e.unref(o)[l.item.prop]=m),size:e.unref(i)},s.value),null,16,["modelValue","size"])}}}),Y=e.defineComponent({__name:"index",props:{item:{}},setup(t){const{item:n}=t,o=e.inject("queryParams",{}),i=e.inject("size"),s=e.ref({...$,...n.selectSetting});return(l,a)=>{const r=e.resolveComponent("el-option"),m=e.resolveComponent("el-select");return e.openBlock(),e.createBlock(m,e.mergeProps({modelValue:e.unref(o)[l.item.prop],"onUpdate:modelValue":a[0]||(a[0]=p=>e.unref(o)[l.item.prop]=p),size:e.unref(i)},s.value),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.item.option||[],p=>(e.openBlock(),e.createBlock(r,e.mergeProps({key:p.value,ref_for:!0},p),null,16))),128))]),_:1},16,["modelValue","size"])}}}),Z=e.defineComponent({__name:"index",props:{item:{}},setup(t){const{item:n}=t,o=e.inject("queryParams",{}),i=e.inject("size"),s=e.ref({...$,...n.selectSetting});return(l,a)=>{const r=e.resolveComponent("el-cascader");return e.openBlock(),e.createBlock(r,e.mergeProps({modelValue:e.unref(o)[l.item.prop],"onUpdate:modelValue":a[0]||(a[0]=m=>e.unref(o)[l.item.prop]=m),size:e.unref(i),options:l.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:n,noUrlParameters:o,getList:i}=t,s=I.useRoute(),l=e.ref({...o?{}:s==null?void 0:s.query});return e.provide("queryParams",l),e.provide("size",n),e.provide("getList",i),{queryParams:l}},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{[q]:{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,i=[...o];return this.noInputBlank&&n==="input"&&i.push({pattern:this.trimRegex,message:"请输入(不能仅输入空格)",trigger:"blur"}),i}}});function ee(t,n,o,i,s,l){const a=e.resolveComponent("Input"),r=e.resolveComponent("Radio"),m=e.resolveComponent("Select"),p=e.resolveComponent("Divider"),k=e.resolveComponent("Cascader"),u=e.resolveComponent("Checkbox"),C=e.resolveComponent("DatePicker"),S=e.resolveComponent("InputNumber"),P=e.resolveComponent("InputMobileVerification"),B=e.resolveComponent("InputGraphicVerification"),y=e.resolveComponent("el-form-item"),b=e.resolveComponent("el-button"),w=e.resolveComponent("el-form"),d=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,c=>(e.openBlock(),e.createBlock(y,{label:c.label,prop:c.prop,key:c.prop,rules:t.getItemRules(c)},{default:e.withCtx(()=>[c.type==="input"?(e.openBlock(),e.createBlock(a,{key:0,item:c},null,8,["item"])):e.createCommentVNode("",!0),c.type==="radio"?(e.openBlock(),e.createBlock(r,{key:1,item:c},null,8,["item"])):e.createCommentVNode("",!0),c.type==="select"?(e.openBlock(),e.createBlock(m,{key:2,item:c},null,8,["item"])):e.createCommentVNode("",!0),c.type==="divider"?(e.openBlock(),e.createBlock(p,{key:3,item:c},null,8,["item"])):e.createCommentVNode("",!0),c.type==="cascader"?(e.openBlock(),e.createBlock(k,{key:4,item:c},null,8,["item"])):e.createCommentVNode("",!0),c.type==="checkbox"?(e.openBlock(),e.createBlock(u,{key:5,item:c},null,8,["item"])):e.createCommentVNode("",!0),c.type==="date-picker"?(e.openBlock(),e.createBlock(C,{key:6,item:c},null,8,["item"])):e.createCommentVNode("",!0),c.type==="input-number"?(e.openBlock(),e.createBlock(S,{key:7,item:c},null,8,["item"])):e.createCommentVNode("",!0),c.type==="form-item-slot"?e.renderSlot(t.$slots,c.name,{key:8}):e.createCommentVNode("",!0),c.type==="input-mobile-verification"?(e.openBlock(),e.createBlock(P,{key:9,item:c},null,8,["item"])):e.createCommentVNode("",!0),c.type==="input-graphic-verification"?(e.openBlock(),e.createBlock(B,{item:c,key:c.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(y,{key:0},{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(b,{type:"primary",size:t.size,onClick:t.handleQuery},{default:e.withCtx(()=>[e.createTextVNode("查询")]),_:1},8,["size","onClick"])),[[d,t.formLoading]]),e.createVNode(b,{size:t.size,onClick:t.resetQuery},{default:e.withCtx(()=>[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=h(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:n}){const o=t,{search:i,id:s,name:l,extra:a}=o,r=e.ref([]),m=e.ref(1),p=e.ref(!1),k=e.ref([]),u=e.ref(!1),C=(d,c)=>{const{i:x}=d;return a&&a!=="false"?a(x):""},S=d=>{k.value=d.map(c=>typeof c=="object"?c[s]:c)};e.watch(()=>o.defaultSelection,(d=[],c=[])=>{S(d)},{immediate:!0});const P=()=>{B(),k.value=[]},B=()=>{m.value=1,r.value=[],p.value=!1},y=async()=>{if(u.value||p.value)return;u.value=!0;const d=await i(m.value);d&&d.length>0?(r.value=[...r.value,...d],m.value+=1):p.value=!0,u.value=!1},b=()=>{B(),y()},w=e.computed(()=>r.value.filter(d=>k.value.includes(d[s])))||{};return n({reset:P,lowReset:B,loadList:y,selectInfo:w,list:r,ifbottom:p,refreshList:b}),(d,c)=>{const x=e.resolveComponent("el-checkbox"),de=e.resolveComponent("el-checkbox-group"),D=e.resolveDirective("infinite-scroll"),fe=e.resolveDirective("loading");return o.checkbox?e.withDirectives((e.openBlock(),e.createBlock(de,e.mergeProps({key:0,modelValue:k.value,"onUpdate:modelValue":c[0]||(c[0]=_=>k.value=_)},o),{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("ul",{class:"list","infinite-scroll-disabled":p.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,_=>(e.openBlock(),e.createElementBlock("li",{key:_[e.unref(s)],class:"list-item"},[e.createVNode(x,{value:_[e.unref(s)],class:"checkbox"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_[e.unref(l)])+" ",1),o.extra?(e.openBlock(),e.createBlock(C,{key:0,i:_},null,8,["i"])):e.createCommentVNode("",!0)]),_:2},1032,["value"])]))),128))],8,oe)),[[D,y]])]),_:1},16,["modelValue"])),[[fe,u.value]]):e.withDirectives((e.openBlock(),e.createElementBlock("ul",e.mergeProps({key:1,class:"list","infinite-scroll-disabled":p.value},o),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,_=>(e.openBlock(),e.createElementBlock("li",{key:_[e.unref(s)],class:"list-item"},[e.createElementVNode("div",re,[e.createTextVNode(e.toDisplayString(_[e.unref(l)])+" ",1),o.extra?(e.openBlock(),e.createBlock(C,{key:0,i:_},null,8,["i"])):e.createCommentVNode("",!0)])]))),128))],16,ne)),[[D,y]])}}}),ue="",ie=h(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 n=t,o=(i,s)=>{const{i:l,render:a,formData:r}=i;return a({row:r,$index:l})};return(i,s)=>{const l=e.resolveComponent("el-descriptions-item"),a=e.resolveComponent("el-descriptions");return e.openBlock(),e.createBlock(a,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,m)=>(e.openBlock(),e.createBlock(l,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:m,render:r.render,formData:t.formData},null,8,["i","render","formData"])):(e.openBlock(),e.createElementBlock("span",se,e.toDisplayString(t.formData[r.prop]),1))]),_:2},1040,["label"]))),128))]),_:1},16)}}}),ce=te,pe=ie,me=ae;f.VDescriptions=me,f.VGeneralBasicForm=ce,f.VInfiniteScrollList=pe,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|
|
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"})});
|
package/package.json
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "general-basic-form",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "./dist/index.umd.cjs",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"build": "cross-env CURRENT_ENV=prod run-p type-check build-only",
|
|
9
|
-
"test:e2e": "playwright test",
|
|
10
|
-
"build-only": "vite build",
|
|
11
|
-
"type-check": "tsc --noEmit -p tsconfig.json --composite false",
|
|
12
|
-
"link": "tsx script/link.ts && yarn link",
|
|
13
|
-
"unlink": "tsx script/unlink.ts && yarn unlink && run-p build",
|
|
14
|
-
"unlinkSetting": "tsx script/unlink.ts"
|
|
15
|
-
},
|
|
16
|
-
"keywords": [
|
|
17
|
-
"general-basic-form",
|
|
18
|
-
"form",
|
|
19
|
-
"vue",
|
|
20
|
-
"vue2",
|
|
21
|
-
"vue3",
|
|
22
|
-
"element-plus"
|
|
23
|
-
],
|
|
24
|
-
"author": "chendeli419287484@qq.com",
|
|
25
|
-
"license": "ISC",
|
|
26
|
-
"repository": {
|
|
27
|
-
"type": "git",
|
|
28
|
-
"url": "git+https://github.com/Alan1034/GeneralBasicForm.git"
|
|
29
|
-
},
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"@playwright/test": "^1.36.1",
|
|
32
|
-
"@types/node": "^20.8.10",
|
|
33
|
-
"@vitejs/plugin-legacy": "^4.1.1",
|
|
34
|
-
"@vitejs/plugin-vue": "^4.2.3",
|
|
35
|
-
"@vitejs/plugin-vue-jsx": "^3.0.1",
|
|
36
|
-
"chalk": "^2.4.2",
|
|
37
|
-
"cross-env": "^7.0.3",
|
|
38
|
-
"less": "^4.2.0",
|
|
39
|
-
"npm-run-all": "^4.1.5",
|
|
40
|
-
"tsx": "^4.0.0",
|
|
41
|
-
"typescript": "^5.2.2",
|
|
42
|
-
"vite-plugin-image-optimizer": "^1.1.6"
|
|
43
|
-
},
|
|
44
|
-
"peerDependencies": {
|
|
45
|
-
"element-plus": ">=2.6.0",
|
|
46
|
-
"vue": ">=3.3.4",
|
|
47
|
-
"vue-router": ">=4.2.4"
|
|
48
|
-
},
|
|
49
|
-
"typings": "./dist/index.d.ts",
|
|
50
|
-
"module": "./dist/index.js",
|
|
51
|
-
"exports": {
|
|
52
|
-
".": {
|
|
53
|
-
"import": "./dist/index.js",
|
|
54
|
-
"require": "./dist/index.umd.cjs"
|
|
55
|
-
},
|
|
56
|
-
"./style": "./dist/style.css"
|
|
57
|
-
},
|
|
58
|
-
"files": [
|
|
59
|
-
"/dist"
|
|
60
|
-
]
|
|
61
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "general-basic-form",
|
|
3
|
+
"version": "2.0.45",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "./dist/index.umd.cjs",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "cross-env CURRENT_ENV=prod run-p type-check build-only",
|
|
9
|
+
"test:e2e": "playwright test",
|
|
10
|
+
"build-only": "vite build",
|
|
11
|
+
"type-check": "tsc --noEmit -p tsconfig.json --composite false",
|
|
12
|
+
"link": "tsx script/link.ts && yarn link",
|
|
13
|
+
"unlink": "tsx script/unlink.ts && yarn unlink && run-p build",
|
|
14
|
+
"unlinkSetting": "tsx script/unlink.ts"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"general-basic-form",
|
|
18
|
+
"form",
|
|
19
|
+
"vue",
|
|
20
|
+
"vue2",
|
|
21
|
+
"vue3",
|
|
22
|
+
"element-plus"
|
|
23
|
+
],
|
|
24
|
+
"author": "chendeli419287484@qq.com",
|
|
25
|
+
"license": "ISC",
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/Alan1034/GeneralBasicForm.git"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@playwright/test": "^1.36.1",
|
|
32
|
+
"@types/node": "^20.8.10",
|
|
33
|
+
"@vitejs/plugin-legacy": "^4.1.1",
|
|
34
|
+
"@vitejs/plugin-vue": "^4.2.3",
|
|
35
|
+
"@vitejs/plugin-vue-jsx": "^3.0.1",
|
|
36
|
+
"chalk": "^2.4.2",
|
|
37
|
+
"cross-env": "^7.0.3",
|
|
38
|
+
"less": "^4.2.0",
|
|
39
|
+
"npm-run-all": "^4.1.5",
|
|
40
|
+
"tsx": "^4.0.0",
|
|
41
|
+
"typescript": "^5.2.2",
|
|
42
|
+
"vite-plugin-image-optimizer": "^1.1.6"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"element-plus": ">=2.6.0",
|
|
46
|
+
"vue": ">=3.3.4",
|
|
47
|
+
"vue-router": ">=4.2.4"
|
|
48
|
+
},
|
|
49
|
+
"typings": "./dist/index.d.ts",
|
|
50
|
+
"module": "./dist/index.js",
|
|
51
|
+
"exports": {
|
|
52
|
+
".": {
|
|
53
|
+
"import": "./dist/index.js",
|
|
54
|
+
"require": "./dist/index.umd.cjs"
|
|
55
|
+
},
|
|
56
|
+
"./style": "./dist/style.css"
|
|
57
|
+
},
|
|
58
|
+
"files": [
|
|
59
|
+
"/dist"
|
|
60
|
+
]
|
|
61
|
+
}
|