general-basic-form 1.0.36 → 1.0.38
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 +16 -8
- package/dist/index.js +120 -91
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
# GeneralBasicForm 一个兼容 Vue2 和 Vue3 的表单组件,支持typescript,vue2请使用@1版本,Vue3请使用@2版本
|
|
2
2
|
|
|
3
|
-
| 组件\兼容性 | vue2 | vue3 |
|
|
4
|
-
| ------------------- | ---- | ---- |
|
|
5
|
-
| VGeneralBasicForm | √ | √ |
|
|
6
|
-
| VSearchBox | √ | |
|
|
7
|
-
| VInfiniteScrollList | | √ |
|
|
8
|
-
| VDescriptions | √ | √
|
|
3
|
+
| 组件\兼容性 | vue2 | vue3 | Ant Design Vue | Element Plus | Element(ui) |
|
|
4
|
+
| ------------------- | ---- | ---- | ---- | ---- | ---- |
|
|
5
|
+
| VGeneralBasicForm | √ | √ | | √ | √ |
|
|
6
|
+
| VSearchBox | √ | | | | √ |
|
|
7
|
+
| VInfiniteScrollList | | √ | | √ | |
|
|
8
|
+
| VDescriptions | | √ | √ | √ | |
|
|
9
|
+
| VInputMobilecVerification | | √ | √ | √ | |
|
|
10
|
+
| VInputGraphicVerification | | √ | √ | √ | |
|
|
9
11
|
|
|
10
12
|
示例:
|
|
11
13
|
|
|
@@ -50,8 +52,8 @@ import { VGeneralBasicForm } from "general-basic-form";
|
|
|
50
52
|
ref="VGeneralBasicFormRef"
|
|
51
53
|
:labelWidth="formLabelWidth"
|
|
52
54
|
v-bind:loading:sync="loading"
|
|
53
|
-
:formData: {
|
|
54
|
-
//
|
|
55
|
+
:formData.sync: {
|
|
56
|
+
// 外部传入的表单数据(可以是响应式数据),用于回填
|
|
55
57
|
}
|
|
56
58
|
noUrlParameters
|
|
57
59
|
:afterReset="afterReset"
|
|
@@ -156,6 +158,9 @@ getList会传出默认的参数,首次请求时会有页数和分页大小,重
|
|
|
156
158
|
message: "请输入正确的Invoice单号"
|
|
157
159
|
}
|
|
158
160
|
],
|
|
161
|
+
change: (value) => {
|
|
162
|
+
console.log(value)
|
|
163
|
+
}
|
|
159
164
|
},
|
|
160
165
|
{
|
|
161
166
|
label: "二次工艺",
|
|
@@ -167,6 +172,9 @@ getList会传出默认的参数,首次请求时会有页数和分页大小,重
|
|
|
167
172
|
{ value: "1", label: "区域印花" },
|
|
168
173
|
{ value: "2", label: "绣花" },
|
|
169
174
|
],
|
|
175
|
+
change: (value) => {
|
|
176
|
+
console.log(value)
|
|
177
|
+
}
|
|
170
178
|
},
|
|
171
179
|
{
|
|
172
180
|
label: "创建时间",
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
function u(
|
|
2
|
-
var a = typeof
|
|
3
|
-
e && (a.render = e, a.staticRenderFns = n, a._compiled = !0),
|
|
1
|
+
function u(t, e, n, r, s, o, c, d) {
|
|
2
|
+
var a = typeof t == "function" ? t.options : t;
|
|
3
|
+
e && (a.render = e, a.staticRenderFns = n, a._compiled = !0), r && (a.functional = !0), o && (a._scopeId = "data-v-" + o);
|
|
4
4
|
var l;
|
|
5
|
-
if (
|
|
5
|
+
if (c ? (l = function(i) {
|
|
6
6
|
i = i || // cached call
|
|
7
7
|
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
8
|
-
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !i && typeof __VUE_SSR_CONTEXT__ < "u" && (i = __VUE_SSR_CONTEXT__), s && s.call(this, i), i && i._registeredComponents && i._registeredComponents.add(
|
|
8
|
+
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !i && typeof __VUE_SSR_CONTEXT__ < "u" && (i = __VUE_SSR_CONTEXT__), s && s.call(this, i), i && i._registeredComponents && i._registeredComponents.add(c);
|
|
9
9
|
}, a._ssrRegister = l) : s && (l = d ? function() {
|
|
10
10
|
s.call(
|
|
11
11
|
this,
|
|
@@ -19,15 +19,15 @@ function u(r, e, n, t, s, o, p, d) {
|
|
|
19
19
|
return l.call(f), h(_, f);
|
|
20
20
|
};
|
|
21
21
|
} else {
|
|
22
|
-
var
|
|
23
|
-
a.beforeCreate =
|
|
22
|
+
var p = a.beforeCreate;
|
|
23
|
+
a.beforeCreate = p ? [].concat(p, l) : [l];
|
|
24
24
|
}
|
|
25
25
|
return {
|
|
26
|
-
exports:
|
|
26
|
+
exports: t,
|
|
27
27
|
options: a
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
const
|
|
30
|
+
const y = {
|
|
31
31
|
props: {
|
|
32
32
|
verificationSetting: {
|
|
33
33
|
type: Object,
|
|
@@ -75,12 +75,12 @@ const m = {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
|
-
var
|
|
78
|
+
var m = function() {
|
|
79
79
|
var e = this, n = e._self._c;
|
|
80
80
|
return n("el-button", { on: { click: e.buttonClick } }, [e._v(e._s(e.buttonType ? e.defaultText : e.buttonText + "s"))]);
|
|
81
81
|
}, g = [], b = /* @__PURE__ */ u(
|
|
82
|
-
m,
|
|
83
82
|
y,
|
|
83
|
+
m,
|
|
84
84
|
g,
|
|
85
85
|
!1,
|
|
86
86
|
null,
|
|
@@ -92,8 +92,8 @@ const v = b.exports;
|
|
|
92
92
|
const k = {
|
|
93
93
|
name: "GeneralBasicForm",
|
|
94
94
|
components: {
|
|
95
|
-
InputArchive: (
|
|
96
|
-
const { templateEle: e } =
|
|
95
|
+
InputArchive: (t) => {
|
|
96
|
+
const { templateEle: e } = t;
|
|
97
97
|
return e();
|
|
98
98
|
},
|
|
99
99
|
VerificationButton: v
|
|
@@ -159,10 +159,10 @@ const k = {
|
|
|
159
159
|
}
|
|
160
160
|
},
|
|
161
161
|
data() {
|
|
162
|
-
var
|
|
162
|
+
var t;
|
|
163
163
|
return {
|
|
164
164
|
queryParams: {
|
|
165
|
-
...this.noUrlParameters ? {} : (
|
|
165
|
+
...this.noUrlParameters ? {} : (t = this.$route) == null ? void 0 : t.query
|
|
166
166
|
},
|
|
167
167
|
// form表单数据
|
|
168
168
|
formLoading: this.loading || !1,
|
|
@@ -205,10 +205,10 @@ const k = {
|
|
|
205
205
|
// },
|
|
206
206
|
watch: {
|
|
207
207
|
formData: {
|
|
208
|
-
handler(
|
|
209
|
-
JSON.stringify(
|
|
208
|
+
handler(t, e) {
|
|
209
|
+
JSON.stringify(t) !== JSON.stringify(e) && (this.queryParams = {
|
|
210
210
|
...this.noUrlParameters ? {} : this.queryParams,
|
|
211
|
-
...
|
|
211
|
+
...t
|
|
212
212
|
});
|
|
213
213
|
},
|
|
214
214
|
// watch 默认是懒执行的:仅当数据源变化时,才会执行回调。但在某些场景中,我们希望在创建侦听器时,立即执行一遍回调。举例来说,我们想请求一些初始数据,然后在相关状态更改时重新请求数据。
|
|
@@ -217,36 +217,36 @@ const k = {
|
|
|
217
217
|
// deep: true,
|
|
218
218
|
},
|
|
219
219
|
queryParams: {
|
|
220
|
-
handler(
|
|
221
|
-
this.$emit("update:formData",
|
|
220
|
+
handler(t) {
|
|
221
|
+
this.$emit("update:formData", t);
|
|
222
222
|
},
|
|
223
223
|
deep: !0
|
|
224
224
|
},
|
|
225
225
|
$attrs: {
|
|
226
|
-
handler(
|
|
226
|
+
handler(t) {
|
|
227
227
|
this.attrs = {
|
|
228
228
|
...this.attrs,
|
|
229
|
-
...
|
|
229
|
+
...t
|
|
230
230
|
};
|
|
231
231
|
},
|
|
232
232
|
immediate: !0,
|
|
233
233
|
deep: !0
|
|
234
234
|
},
|
|
235
|
-
loading(
|
|
236
|
-
this.formLoading !==
|
|
235
|
+
loading(t) {
|
|
236
|
+
this.formLoading !== t && (this.formLoading = t);
|
|
237
237
|
},
|
|
238
|
-
formLoading(
|
|
239
|
-
this.loading !==
|
|
238
|
+
formLoading(t) {
|
|
239
|
+
this.loading !== t && this.$emit("update:loading", t);
|
|
240
240
|
}
|
|
241
241
|
},
|
|
242
242
|
methods: {
|
|
243
243
|
/** 搜索按钮操作 */
|
|
244
244
|
handleQuery() {
|
|
245
245
|
var n;
|
|
246
|
-
const
|
|
246
|
+
const t = { page: 1, limit: 10 }, e = {
|
|
247
247
|
...(n = this.$route) == null ? void 0 : n.query,
|
|
248
248
|
...this.queryParams,
|
|
249
|
-
...
|
|
249
|
+
...t
|
|
250
250
|
};
|
|
251
251
|
this.noUrlParameters || this.$router.push({
|
|
252
252
|
query: { ...e }
|
|
@@ -258,9 +258,9 @@ const k = {
|
|
|
258
258
|
async resetQuery() {
|
|
259
259
|
var e;
|
|
260
260
|
this.$refs.queryFormRef.resetFields();
|
|
261
|
-
const
|
|
261
|
+
const t = { page: 1 };
|
|
262
262
|
this.noUrlParameters || await this.$router.push({
|
|
263
|
-
query: { ...
|
|
263
|
+
query: { ...t }
|
|
264
264
|
}), this.queryParams = {
|
|
265
265
|
...this.noUrlParameters ? {} : (e = this.$route) == null ? void 0 : e.query
|
|
266
266
|
}, this.afterReset(), this.handleQuery();
|
|
@@ -268,70 +268,99 @@ const k = {
|
|
|
268
268
|
currentInputComponent() {
|
|
269
269
|
return "input-archive";
|
|
270
270
|
},
|
|
271
|
-
getItemRules(
|
|
272
|
-
const { type: e, rules: n = [] } =
|
|
273
|
-
return this.noInputBlank && e === "input" &&
|
|
271
|
+
getItemRules(t) {
|
|
272
|
+
const { type: e, rules: n = [] } = t, r = [...n];
|
|
273
|
+
return this.noInputBlank && e === "input" && r.push({
|
|
274
274
|
pattern: this.trimRegex,
|
|
275
275
|
message: "请输入(不能仅输入空格)",
|
|
276
276
|
trigger: "blur"
|
|
277
|
-
}),
|
|
277
|
+
}), r;
|
|
278
278
|
},
|
|
279
|
-
getInputSetting(
|
|
280
|
-
const { inputSetting: e, setting: n } =
|
|
279
|
+
getInputSetting(t) {
|
|
280
|
+
const { inputSetting: e, setting: n } = t;
|
|
281
281
|
return {
|
|
282
282
|
...this.inputSetting,
|
|
283
283
|
...e,
|
|
284
284
|
...n
|
|
285
285
|
};
|
|
286
286
|
},
|
|
287
|
-
|
|
288
|
-
|
|
287
|
+
defaultFunction() {
|
|
288
|
+
},
|
|
289
|
+
getInputEvents(t) {
|
|
290
|
+
return {
|
|
291
|
+
blur: t.blur || this.defaultFunction,
|
|
292
|
+
focus: t.focus || this.defaultFunction,
|
|
293
|
+
change: t.change || this.defaultFunction,
|
|
294
|
+
input: t.input || this.defaultFunction,
|
|
295
|
+
clear: t.clear || this.defaultFunction
|
|
296
|
+
};
|
|
297
|
+
},
|
|
298
|
+
getSelectSetting(t) {
|
|
299
|
+
const { selectSetting: e, setting: n } = t;
|
|
289
300
|
return {
|
|
290
301
|
...this.selectSetting,
|
|
291
302
|
...e,
|
|
292
303
|
...n
|
|
293
304
|
};
|
|
294
305
|
},
|
|
295
|
-
|
|
296
|
-
|
|
306
|
+
getSelectEvents(t) {
|
|
307
|
+
return {
|
|
308
|
+
change: t.change || this.defaultFunction,
|
|
309
|
+
"visible-change": t["visible-change"] || this.defaultFunction,
|
|
310
|
+
"remove-tag": t["remove-tag"] || this.defaultFunction,
|
|
311
|
+
"expand-change": t["expand-change"] || this.defaultFunction,
|
|
312
|
+
clear: t.clear || this.defaultFunction,
|
|
313
|
+
blur: t.blur || this.defaultFunction,
|
|
314
|
+
focus: t.focus || this.defaultFunction
|
|
315
|
+
};
|
|
316
|
+
},
|
|
317
|
+
getDatePackerSetting(t) {
|
|
318
|
+
const { datePackerSetting: e, setting: n } = t;
|
|
297
319
|
return {
|
|
298
320
|
...this.datePackerSetting,
|
|
299
321
|
...e,
|
|
300
322
|
...n
|
|
301
323
|
};
|
|
324
|
+
},
|
|
325
|
+
getDatePackerEvents(t) {
|
|
326
|
+
return {
|
|
327
|
+
change: t.change || this.defaultFunction,
|
|
328
|
+
blur: t.blur || this.defaultFunction,
|
|
329
|
+
focus: t.focus || this.defaultFunction
|
|
330
|
+
};
|
|
302
331
|
}
|
|
303
332
|
}
|
|
304
333
|
};
|
|
305
334
|
var S = function() {
|
|
306
335
|
var e = this, n = e._self._c;
|
|
307
|
-
return n("el-form", e._b({ directives: [{ name: "show", rawName: "v-show", value: e.showSearch, expression: "showSearch" }], ref: "queryFormRef", attrs: { model: e.queryParams, "label-width": e.labelWidth } }, "el-form", e.attrs, !1), [e._l(e.formItem, function(
|
|
308
|
-
return n("el-form-item", { key:
|
|
336
|
+
return n("el-form", e._b({ directives: [{ name: "show", rawName: "v-show", value: e.showSearch, expression: "showSearch" }], ref: "queryFormRef", attrs: { model: e.queryParams, "label-width": e.labelWidth } }, "el-form", e.attrs, !1), [e._l(e.formItem, function(r) {
|
|
337
|
+
return n("el-form-item", { key: r.prop, attrs: { label: r.label, prop: r.prop, rules: e.getItemRules(r) } }, [r.type === "input" ? n("el-input", e._g(e._b({ attrs: { size: e.size }, nativeOn: { keydown: function(s) {
|
|
309
338
|
return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : e.getList.apply(null, arguments);
|
|
310
|
-
} }, scopedSlots: e._u([e._l(
|
|
339
|
+
} }, scopedSlots: e._u([e._l(r.template, function(s, o) {
|
|
311
340
|
return { key: o, fn: function() {
|
|
312
341
|
return [s ? n(e.currentInputComponent(), { key: o, tag: "component", attrs: { templateEle: s } }) : e._e()];
|
|
313
342
|
}, proxy: !0 };
|
|
314
|
-
})], null, !0), model: { value: e.queryParams[
|
|
315
|
-
e.$set(e.queryParams,
|
|
316
|
-
}, expression: "queryParams[item.prop]" } }, "el-input", e.getInputSetting(
|
|
343
|
+
})], null, !0), model: { value: e.queryParams[r.prop], callback: function(s) {
|
|
344
|
+
e.$set(e.queryParams, r.prop, s);
|
|
345
|
+
}, expression: "queryParams[item.prop]" } }, "el-input", e.getInputSetting(r), !1), e.getInputEvents(r))) : r.type === "input-mobile-verification" ? n("el-input", e._g(e._b({ attrs: { size: e.size }, nativeOn: { keydown: function(s) {
|
|
317
346
|
return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : e.getList.apply(null, arguments);
|
|
318
|
-
} }, scopedSlots: e._u([e._l(
|
|
347
|
+
} }, scopedSlots: e._u([e._l(r.template, function(s, o) {
|
|
319
348
|
return { key: o, fn: function() {
|
|
320
349
|
return [s ? n(e.currentInputComponent(), { key: o, tag: "component", attrs: { templateEle: s } }) : e._e()];
|
|
321
350
|
}, proxy: !0 };
|
|
322
|
-
})], null, !0), model: { value: e.queryParams[
|
|
323
|
-
e.$set(e.queryParams,
|
|
324
|
-
}, expression: "queryParams[item.prop]" } }, "el-input", e.getInputSetting(
|
|
325
|
-
e.$set(e.queryParams,
|
|
326
|
-
}, expression: "queryParams[item.prop]" } }, "el-select", e.getSelectSetting(
|
|
351
|
+
})], null, !0), model: { value: e.queryParams[r.prop], callback: function(s) {
|
|
352
|
+
e.$set(e.queryParams, r.prop, s);
|
|
353
|
+
}, expression: "queryParams[item.prop]" } }, "el-input", e.getInputSetting(r), !1), e.getInputEvents(r)), [n("template", { slot: "append" }, [n("verification-button", { attrs: { verificationSetting: r.verificationSetting, getSmscode: r.getSmscode } })], 1)], 2) : r.type === "select" ? n("el-select", e._g(e._b({ attrs: { filterable: "", size: e.size }, model: { value: e.queryParams[r.prop], callback: function(s) {
|
|
354
|
+
e.$set(e.queryParams, r.prop, s);
|
|
355
|
+
}, expression: "queryParams[item.prop]" } }, "el-select", e.getSelectSetting(r), !1), e.getSelectEvents(r)), e._l(r.option || [], function(s) {
|
|
327
356
|
return n("el-option", { key: s.value, attrs: { label: s.label, value: s.value } });
|
|
328
|
-
}), 1) :
|
|
329
|
-
e.$set(e.queryParams,
|
|
330
|
-
}, expression: "queryParams[item.prop]" } }, "el-cascader", e.getSelectSetting(
|
|
331
|
-
e.$set(e.queryParams,
|
|
332
|
-
}, expression: "queryParams[item.prop]" } }, "el-date-picker", e.getDatePackerSetting(
|
|
333
|
-
e.$set(e.queryParams,
|
|
334
|
-
}, expression: "queryParams[item.prop]" } }, "el-input-number", e.getInputSetting(
|
|
357
|
+
}), 1) : r.type === "cascader" ? n("el-cascader", e._g(e._b({ attrs: { filterable: "", size: e.size, options: r.options || [] }, model: { value: e.queryParams[r.prop], callback: function(s) {
|
|
358
|
+
e.$set(e.queryParams, r.prop, s);
|
|
359
|
+
}, expression: "queryParams[item.prop]" } }, "el-cascader", e.getSelectSetting(r), !1), e.getSelectEvents(r))) : r.type === "date-picker" ? n("el-date-picker", e._g(e._b({ attrs: { size: e.size }, model: { value: e.queryParams[r.prop], callback: function(s) {
|
|
360
|
+
e.$set(e.queryParams, r.prop, s);
|
|
361
|
+
}, expression: "queryParams[item.prop]" } }, "el-date-picker", e.getDatePackerSetting(r), !1), e.getDatePackerEvents(r))) : e._e(), r.type === "input-number" ? n("el-input-number", e._g(e._b({ attrs: { size: e.size }, model: { value: e.queryParams[r.prop], callback: function(s) {
|
|
362
|
+
e.$set(e.queryParams, r.prop, s);
|
|
363
|
+
}, expression: "queryParams[item.prop]" } }, "el-input-number", e.getInputSetting(r), !1), e.getInputEvents(r))) : e._e()], 1);
|
|
335
364
|
}), e._t("default"), e.formOnly ? e._e() : n("el-form-item", [n("el-button", { attrs: { type: "primary", icon: "el-icon-search", size: e.size, loading: e.formLoading }, on: { click: e.handleQuery } }, [e._v("查询")]), n("el-button", { attrs: { icon: "el-icon-refresh", size: e.size }, on: { click: e.resetQuery } }, [e._v("重置")])], 1), e._t("behind-the-button")], 2);
|
|
336
365
|
}, x = [], P = /* @__PURE__ */ u(
|
|
337
366
|
k,
|
|
@@ -339,7 +368,7 @@ var S = function() {
|
|
|
339
368
|
x,
|
|
340
369
|
!1,
|
|
341
370
|
null,
|
|
342
|
-
"
|
|
371
|
+
"95d7c237",
|
|
343
372
|
null,
|
|
344
373
|
null
|
|
345
374
|
);
|
|
@@ -375,18 +404,18 @@ const C = {
|
|
|
375
404
|
}
|
|
376
405
|
},
|
|
377
406
|
data() {
|
|
378
|
-
var
|
|
407
|
+
var t, e;
|
|
379
408
|
return {
|
|
380
|
-
keyWord: ((e = (
|
|
409
|
+
keyWord: ((e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.keyWord) || "",
|
|
381
410
|
attrs: {}
|
|
382
411
|
};
|
|
383
412
|
},
|
|
384
413
|
watch: {
|
|
385
414
|
$attrs: {
|
|
386
|
-
handler(
|
|
415
|
+
handler(t) {
|
|
387
416
|
this.attrs = {
|
|
388
417
|
...this.attrs,
|
|
389
|
-
...
|
|
418
|
+
...t
|
|
390
419
|
};
|
|
391
420
|
},
|
|
392
421
|
immediate: !0,
|
|
@@ -395,33 +424,33 @@ const C = {
|
|
|
395
424
|
},
|
|
396
425
|
methods: {
|
|
397
426
|
search() {
|
|
398
|
-
const
|
|
427
|
+
const t = { path: this.routePath, query: { ...this.query, keyWord: this.keyWord } };
|
|
399
428
|
if (this.openHref) {
|
|
400
|
-
const e = this.$router.resolve(
|
|
429
|
+
const e = this.$router.resolve(t);
|
|
401
430
|
window.open(e.href, "_blank");
|
|
402
431
|
} else
|
|
403
|
-
this.$router.push(
|
|
432
|
+
this.$router.push(t);
|
|
404
433
|
}
|
|
405
434
|
}
|
|
406
435
|
};
|
|
407
|
-
var
|
|
436
|
+
var F = function() {
|
|
408
437
|
var e = this, n = e._self._c;
|
|
409
|
-
return n("div", { staticClass: "search-box" }, [n("el-input", e._b({ style: { ...e.inputstyle }, attrs: { size: e.size }, nativeOn: { keydown: function(
|
|
410
|
-
return !
|
|
411
|
-
} }, model: { value: e.keyWord, callback: function(
|
|
412
|
-
e.keyWord =
|
|
438
|
+
return n("div", { staticClass: "search-box" }, [n("el-input", e._b({ style: { ...e.inputstyle }, attrs: { size: e.size }, nativeOn: { keydown: function(r) {
|
|
439
|
+
return !r.type.indexOf("key") && e._k(r.keyCode, "enter", 13, r.key, "Enter") ? null : e.search.apply(null, arguments);
|
|
440
|
+
} }, model: { value: e.keyWord, callback: function(r) {
|
|
441
|
+
e.keyWord = r;
|
|
413
442
|
}, expression: "keyWord" } }, "el-input", e.attrs, !1), [n("svg", { staticClass: "el-input__icon", attrs: { slot: "prefix", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, slot: "prefix" }, [n("path", { attrs: { d: "M9.51033 10.2186C8.69189 10.8814 7.64943 11.2784 6.51424 11.2784C3.88302 11.2784 1.75 9.14541 1.75 6.51421C1.75 3.88301 3.88302 1.75 6.51424 1.75C9.14545 1.75 11.2785 3.88301 11.2785 6.51421C11.2785 7.64942 10.8814 8.69189 10.2186 9.51034L13.75 13.0417L13.0417 13.75L9.51033 10.2186ZM10.2768 6.51421C10.2768 4.43623 8.59224 2.75168 6.51424 2.75168C4.43623 2.75168 2.75168 4.43623 2.75168 6.51421C2.75168 8.59219 4.43623 10.2767 6.51424 10.2767C8.59224 10.2767 10.2768 8.59219 10.2768 6.51421Z", fill: "#959A9F" } })])])], 1);
|
|
414
|
-
},
|
|
443
|
+
}, $ = [], w = /* @__PURE__ */ u(
|
|
415
444
|
C,
|
|
445
|
+
F,
|
|
416
446
|
$,
|
|
417
|
-
w,
|
|
418
447
|
!1,
|
|
419
448
|
null,
|
|
420
449
|
"ef706e31",
|
|
421
450
|
null,
|
|
422
451
|
null
|
|
423
452
|
);
|
|
424
|
-
const
|
|
453
|
+
const T = w.exports, I = {
|
|
425
454
|
functional: !0,
|
|
426
455
|
props: {
|
|
427
456
|
column: {
|
|
@@ -434,11 +463,11 @@ const z = T.exports, I = {
|
|
|
434
463
|
type: Object
|
|
435
464
|
}
|
|
436
465
|
},
|
|
437
|
-
render(
|
|
438
|
-
const { props: n } = e, { column:
|
|
439
|
-
return
|
|
466
|
+
render(t, e) {
|
|
467
|
+
const { props: n } = e, { column: r, formData: s } = n;
|
|
468
|
+
return r.render(s);
|
|
440
469
|
}
|
|
441
|
-
},
|
|
470
|
+
}, z = {
|
|
442
471
|
name: "Descriptions",
|
|
443
472
|
components: {
|
|
444
473
|
DescriptionsColumn: I
|
|
@@ -466,10 +495,10 @@ const z = T.exports, I = {
|
|
|
466
495
|
},
|
|
467
496
|
watch: {
|
|
468
497
|
$attrs: {
|
|
469
|
-
handler(
|
|
498
|
+
handler(t) {
|
|
470
499
|
this.attrs = {
|
|
471
500
|
...this.attrs,
|
|
472
|
-
...
|
|
501
|
+
...t
|
|
473
502
|
};
|
|
474
503
|
},
|
|
475
504
|
immediate: !0,
|
|
@@ -477,24 +506,24 @@ const z = T.exports, I = {
|
|
|
477
506
|
}
|
|
478
507
|
}
|
|
479
508
|
};
|
|
480
|
-
var
|
|
509
|
+
var D = function() {
|
|
481
510
|
var e = this, n = e._self._c;
|
|
482
|
-
return n("el-descriptions", e._b({}, "el-descriptions", e.attrs, !1), e._l(e.formItem, function(
|
|
483
|
-
return n("el-descriptions-item", e._b({ key:
|
|
511
|
+
return n("el-descriptions", e._b({}, "el-descriptions", e.attrs, !1), e._l(e.formItem, function(r, s) {
|
|
512
|
+
return n("el-descriptions-item", e._b({ key: r.prop, attrs: { label: r.label } }, "el-descriptions-item", r.descriptionsItemProps, !1), [r.render ? n("DescriptionsColumn", { attrs: { column: r, formData: e.formData } }) : n("span", [e._v(e._s(e.formData[r.prop]))])], 1);
|
|
484
513
|
}), 1);
|
|
485
|
-
},
|
|
486
|
-
|
|
487
|
-
B,
|
|
514
|
+
}, O = [], B = /* @__PURE__ */ u(
|
|
515
|
+
z,
|
|
488
516
|
D,
|
|
517
|
+
O,
|
|
489
518
|
!1,
|
|
490
519
|
null,
|
|
491
520
|
null,
|
|
492
521
|
null,
|
|
493
522
|
null
|
|
494
523
|
);
|
|
495
|
-
const
|
|
524
|
+
const R = B.exports, E = q, L = T, W = R;
|
|
496
525
|
export {
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
526
|
+
W as VDescriptions,
|
|
527
|
+
E as VGeneralBasicForm,
|
|
528
|
+
L as VSearchBox
|
|
500
529
|
};
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(l,p){typeof exports=="object"&&typeof module<"u"?p(exports):typeof define=="function"&&define.amd?define(["exports"],p):(l=typeof globalThis<"u"?globalThis:l||self,p(l.Index={}))})(this,function(l){"use strict";const p="";function c(r,e,n,t,s,i,f,W){var a=typeof r=="function"?r.options:r;e&&(a.render=e,a.staticRenderFns=n,a._compiled=!0),t&&(a.functional=!0),i&&(a._scopeId="data-v-"+i);var u;if(f?(u=function(o){o=o||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!o&&typeof __VUE_SSR_CONTEXT__<"u"&&(o=__VUE_SSR_CONTEXT__),s&&s.call(this,o),o&&o._registeredComponents&&o._registeredComponents.add(f)},a._ssrRegister=u):s&&(u=W?function(){s.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:s),u)if(a.functional){a._injectStyles=u;var V=a.render;a.render=function(U,h){return u.call(h),V(U,h)}}else{var d=a.beforeCreate;a.beforeCreate=d?[].concat(d,u):[u]}return{exports:r,options:a}}const m={props:{verificationSetting:{type:Object,default:()=>{}},getSmscode:{type:Function,default:()=>{}}},data(){return{defaultText:this.verificationSetting.defaultText||"获取验证码",buttonText:this.verificationSetting.defaultText||"获取验证码",restTime:this.verificationSetting.restTime||60,timer:null}},computed:{buttonType(){return this.buttonText===this.defaultText}},destroyed(){this.reset()},methods:{reset(){this.timer&&(clearInterval(this.timer),this.timer=null,this.buttonText=this.defaultText)},async buttonClick(){if(this.buttonText===this.defaultText)if(this.buttonText=this.restTime,this.timer=setInterval(()=>{if(Number(this.buttonText)<=0||!this.buttonText){this.reset();return}else this.buttonText=Number(this.buttonText)-1},1e3),this.getSmscode)await this.getSmscode()===!1&&this.reset();else return}}};var _=function(){var e=this,n=e._self._c;return n("el-button",{on:{click:e.buttonClick}},[e._v(e._s(e.buttonType?e.defaultText:e.buttonText+"s"))])},y=[],g=c(m,_,y,!1,null,null,null,null);const b=g.exports,j="",v={name:"GeneralBasicForm",components:{InputArchive:r=>{const{templateEle:e}=r;return e()},VerificationButton:b},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:""},labelWidth:{type:String,default:"90px"},noUrlParameters:{type:Boolean,default:()=>!1},formData:{type:Object,default:()=>{}},noInputBlank:{type:Boolean,default:()=>!1}},data(){var r;return{queryParams:{...this.noUrlParameters?{}:(r=this.$route)==null?void 0:r.query},formLoading:this.loading||!1,selectSetting:{placeholder:"请选择",filterable:!0,clearable:!0,style:"width: 200px"},inputSetting:{placeholder:"请输入",style:"width: 200px",clearable:!0},datePackerSetting:{style:"width: 227px","start-placeholder":"开始日期","end-placeholder":"结束日期",type:"daterange"},attrs:{inline:!0,"label-position":"left"}}},watch:{formData:{handler(r,e){JSON.stringify(r)!==JSON.stringify(e)&&(this.queryParams={...this.noUrlParameters?{}:this.queryParams,...r})},immediate:!0},queryParams:{handler(r){this.$emit("update:formData",r)},deep:!0},$attrs:{handler(r){this.attrs={...this.attrs,...r}},immediate:!0,deep:!0},loading(r){this.formLoading!==r&&(this.formLoading=r)},formLoading(r){this.loading!==r&&this.$emit("update:loading",r)}},methods:{handleQuery(){var n;const r={page:1,limit:10},e={...(n=this.$route)==null?void 0:n.query,...this.queryParams,...r};this.noUrlParameters||this.$router.push({query:{...e}}),this.getList({...e})},async resetQuery(){var e;this.$refs.queryFormRef.resetFields();const r={page:1};this.noUrlParameters||await this.$router.push({query:{...r}}),this.queryParams={...this.noUrlParameters?{}:(e=this.$route)==null?void 0:e.query},this.afterReset(),this.handleQuery()},currentInputComponent(){return"input-archive"},getItemRules(r){const{type:e,rules:n=[]}=r,t=[...n];return this.noInputBlank&&e==="input"&&t.push({pattern:this.trimRegex,message:"请输入(不能仅输入空格)",trigger:"blur"}),t},getInputSetting(r){const{inputSetting:e,setting:n}=r;return{...this.inputSetting,...e,...n}},getSelectSetting(r){const{selectSetting:e,setting:n}=r;return{...this.selectSetting,...e,...n}},getDatePackerSetting(r){const{datePackerSetting:e,setting:n}=r;return{...this.datePackerSetting,...e,...n}}}};var k=function(){var e=this,n=e._self._c;return n("el-form",e._b({directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryFormRef",attrs:{model:e.queryParams,"label-width":e.labelWidth}},"el-form",e.attrs,!1),[e._l(e.formItem,function(t){return n("el-form-item",{key:t.prop,attrs:{label:t.label,prop:t.prop,rules:e.getItemRules(t)}},[t.type==="input"?n("el-input",e._b({attrs:{size:e.size},nativeOn:{keydown:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.getList.apply(null,arguments)}},scopedSlots:e._u([e._l(t.template,function(s,i){return{key:i,fn:function(){return[s?n(e.currentInputComponent(),{key:i,tag:"component",attrs:{templateEle:s}}):e._e()]},proxy:!0}})],null,!0),model:{value:e.queryParams[t.prop],callback:function(s){e.$set(e.queryParams,t.prop,s)},expression:"queryParams[item.prop]"}},"el-input",e.getInputSetting(t),!1)):t.type==="input-mobile-verification"?n("el-input",e._b({attrs:{size:e.size},nativeOn:{keydown:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.getList.apply(null,arguments)}},scopedSlots:e._u([e._l(t.template,function(s,i){return{key:i,fn:function(){return[s?n(e.currentInputComponent(),{key:i,tag:"component",attrs:{templateEle:s}}):e._e()]},proxy:!0}})],null,!0),model:{value:e.queryParams[t.prop],callback:function(s){e.$set(e.queryParams,t.prop,s)},expression:"queryParams[item.prop]"}},"el-input",e.getInputSetting(t),!1),[n("template",{slot:"append"},[n("verification-button",{attrs:{verificationSetting:t.verificationSetting,getSmscode:t.getSmscode}})],1)],2):t.type==="select"?n("el-select",e._b({attrs:{filterable:"",size:e.size},model:{value:e.queryParams[t.prop],callback:function(s){e.$set(e.queryParams,t.prop,s)},expression:"queryParams[item.prop]"}},"el-select",e.getSelectSetting(t),!1),e._l(t.option||[],function(s){return n("el-option",{key:s.value,attrs:{label:s.label,value:s.value}})}),1):t.type==="cascader"?n("el-cascader",e._b({attrs:{filterable:"",size:e.size,options:t.options||[]},model:{value:e.queryParams[t.prop],callback:function(s){e.$set(e.queryParams,t.prop,s)},expression:"queryParams[item.prop]"}},"el-cascader",e.getSelectSetting(t),!1)):t.type==="date-picker"?n("el-date-picker",e._b({attrs:{size:e.size},model:{value:e.queryParams[t.prop],callback:function(s){e.$set(e.queryParams,t.prop,s)},expression:"queryParams[item.prop]"}},"el-date-picker",e.getDatePackerSetting(t),!1)):e._e(),t.type==="input-number"?n("el-input-number",e._b({attrs:{size:e.size},model:{value:e.queryParams[t.prop],callback:function(s){e.$set(e.queryParams,t.prop,s)},expression:"queryParams[item.prop]"}},"el-input-number",e.getInputSetting(t),!1)):e._e()],1)}),e._t("default"),e.formOnly?e._e():n("el-form-item",[n("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:e.size,loading:e.formLoading},on:{click:e.handleQuery}},[e._v("查询")]),n("el-button",{attrs:{icon:"el-icon-refresh",size:e.size},on:{click:e.resetQuery}},[e._v("重置")])],1),e._t("behind-the-button")],2)},S=[],x=c(v,k,S,!1,null,"7fc8eb2b",null,null);const P=x.exports,N="",q={components:{},props:{query:{type:Object,default:()=>({prefCode:sessionStorage.getItem("prefCode")})},routePath:{type:String,default:()=>"/search/searchDetail"},inputstyle:{type:Object,default:()=>({width:"1280px"})},openHref:{type:Boolean,default:()=>!1},size:{type:String,default:()=>"medium"}},data(){var r,e;return{keyWord:((e=(r=this.$route)==null?void 0:r.query)==null?void 0:e.keyWord)||"",attrs:{}}},watch:{$attrs:{handler(r){this.attrs={...this.attrs,...r}},immediate:!0,deep:!0}},methods:{search(){const r={path:this.routePath,query:{...this.query,keyWord:this.keyWord}};if(this.openHref){const e=this.$router.resolve(r);window.open(e.href,"_blank")}else this.$router.push(r)}}};var C=function(){var e=this,n=e._self._c;return n("div",{staticClass:"search-box"},[n("el-input",e._b({style:{...e.inputstyle},attrs:{size:e.size},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.search.apply(null,arguments)}},model:{value:e.keyWord,callback:function(t){e.keyWord=t},expression:"keyWord"}},"el-input",e.attrs,!1),[n("svg",{staticClass:"el-input__icon",attrs:{slot:"prefix",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},slot:"prefix"},[n("path",{attrs:{d:"M9.51033 10.2186C8.69189 10.8814 7.64943 11.2784 6.51424 11.2784C3.88302 11.2784 1.75 9.14541 1.75 6.51421C1.75 3.88301 3.88302 1.75 6.51424 1.75C9.14545 1.75 11.2785 3.88301 11.2785 6.51421C11.2785 7.64942 10.8814 8.69189 10.2186 9.51034L13.75 13.0417L13.0417 13.75L9.51033 10.2186ZM10.2768 6.51421C10.2768 4.43623 8.59224 2.75168 6.51424 2.75168C4.43623 2.75168 2.75168 4.43623 2.75168 6.51421C2.75168 8.59219 4.43623 10.2767 6.51424 10.2767C8.59224 10.2767 10.2768 8.59219 10.2768 6.51421Z",fill:"#959A9F"}})])])],1)},$=[],w=c(q,C,$,!1,null,"ef706e31",null,null);const T=w.exports,z={name:"Descriptions",components:{DescriptionsColumn:{functional:!0,props:{column:{default:{render:()=>{}},type:Object},formData:{default:{},type:Object}},render(r,e){const{props:n}=e,{column:t,formData:s}=n;return t.render(s)}}},data(){return{attrs:{border:!0,class:"v-descriptions"}}},props:{formItem:{type:Array,default:[]},formData:{type:Object,default:()=>{}}},watch:{$attrs:{handler(r){this.attrs={...this.attrs,...r}},immediate:!0,deep:!0}}};var I=function(){var e=this,n=e._self._c;return n("el-descriptions",e._b({},"el-descriptions",e.attrs,!1),e._l(e.formItem,function(t,s){return n("el-descriptions-item",e._b({key:t.prop,attrs:{label:t.label}},"el-descriptions-item",t.descriptionsItemProps,!1),[t.render?n("DescriptionsColumn",{attrs:{column:t,formData:e.formData}}):n("span",[e._v(e._s(e.formData[t.prop]))])],1)}),1)},B=[],D=c(z,I,B,!1,null,null,null,null);const O=D.exports,F=P,R=T,L=O;l.VDescriptions=L,l.VGeneralBasicForm=F,l.VSearchBox=R,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(l,c){typeof exports=="object"&&typeof module<"u"?c(exports):typeof define=="function"&&define.amd?define(["exports"],c):(l=typeof globalThis<"u"?globalThis:l||self,c(l.Index={}))})(this,function(l){"use strict";const c="";function p(t,e,n,r,s,o,f,L){var a=typeof t=="function"?t.options:t;e&&(a.render=e,a.staticRenderFns=n,a._compiled=!0),r&&(a.functional=!0),o&&(a._scopeId="data-v-"+o);var u;if(f?(u=function(i){i=i||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!i&&typeof __VUE_SSR_CONTEXT__<"u"&&(i=__VUE_SSR_CONTEXT__),s&&s.call(this,i),i&&i._registeredComponents&&i._registeredComponents.add(f)},a._ssrRegister=u):s&&(u=L?function(){s.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:s),u)if(a.functional){a._injectStyles=u;var W=a.render;a.render=function(V,h){return u.call(h),W(V,h)}}else{var d=a.beforeCreate;a.beforeCreate=d?[].concat(d,u):[u]}return{exports:t,options:a}}const _={props:{verificationSetting:{type:Object,default:()=>{}},getSmscode:{type:Function,default:()=>{}}},data(){return{defaultText:this.verificationSetting.defaultText||"获取验证码",buttonText:this.verificationSetting.defaultText||"获取验证码",restTime:this.verificationSetting.restTime||60,timer:null}},computed:{buttonType(){return this.buttonText===this.defaultText}},destroyed(){this.reset()},methods:{reset(){this.timer&&(clearInterval(this.timer),this.timer=null,this.buttonText=this.defaultText)},async buttonClick(){if(this.buttonText===this.defaultText)if(this.buttonText=this.restTime,this.timer=setInterval(()=>{if(Number(this.buttonText)<=0||!this.buttonText){this.reset();return}else this.buttonText=Number(this.buttonText)-1},1e3),this.getSmscode)await this.getSmscode()===!1&&this.reset();else return}}};var y=function(){var e=this,n=e._self._c;return n("el-button",{on:{click:e.buttonClick}},[e._v(e._s(e.buttonType?e.defaultText:e.buttonText+"s"))])},m=[],g=p(_,y,m,!1,null,null,null,null);const b=g.exports,U="",v={name:"GeneralBasicForm",components:{InputArchive:t=>{const{templateEle:e}=t;return e()},VerificationButton:b},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:""},labelWidth:{type:String,default:"90px"},noUrlParameters:{type:Boolean,default:()=>!1},formData:{type:Object,default:()=>{}},noInputBlank:{type:Boolean,default:()=>!1}},data(){var t;return{queryParams:{...this.noUrlParameters?{}:(t=this.$route)==null?void 0:t.query},formLoading:this.loading||!1,selectSetting:{placeholder:"请选择",filterable:!0,clearable:!0,style:"width: 200px"},inputSetting:{placeholder:"请输入",style:"width: 200px",clearable:!0},datePackerSetting:{style:"width: 227px","start-placeholder":"开始日期","end-placeholder":"结束日期",type:"daterange"},attrs:{inline:!0,"label-position":"left"}}},watch:{formData:{handler(t,e){JSON.stringify(t)!==JSON.stringify(e)&&(this.queryParams={...this.noUrlParameters?{}:this.queryParams,...t})},immediate:!0},queryParams:{handler(t){this.$emit("update:formData",t)},deep:!0},$attrs:{handler(t){this.attrs={...this.attrs,...t}},immediate:!0,deep:!0},loading(t){this.formLoading!==t&&(this.formLoading=t)},formLoading(t){this.loading!==t&&this.$emit("update:loading",t)}},methods:{handleQuery(){var n;const t={page:1,limit:10},e={...(n=this.$route)==null?void 0:n.query,...this.queryParams,...t};this.noUrlParameters||this.$router.push({query:{...e}}),this.getList({...e})},async resetQuery(){var e;this.$refs.queryFormRef.resetFields();const t={page:1};this.noUrlParameters||await this.$router.push({query:{...t}}),this.queryParams={...this.noUrlParameters?{}:(e=this.$route)==null?void 0:e.query},this.afterReset(),this.handleQuery()},currentInputComponent(){return"input-archive"},getItemRules(t){const{type:e,rules:n=[]}=t,r=[...n];return this.noInputBlank&&e==="input"&&r.push({pattern:this.trimRegex,message:"请输入(不能仅输入空格)",trigger:"blur"}),r},getInputSetting(t){const{inputSetting:e,setting:n}=t;return{...this.inputSetting,...e,...n}},defaultFunction(){},getInputEvents(t){return{blur:t.blur||this.defaultFunction,focus:t.focus||this.defaultFunction,change:t.change||this.defaultFunction,input:t.input||this.defaultFunction,clear:t.clear||this.defaultFunction}},getSelectSetting(t){const{selectSetting:e,setting:n}=t;return{...this.selectSetting,...e,...n}},getSelectEvents(t){return{change:t.change||this.defaultFunction,"visible-change":t["visible-change"]||this.defaultFunction,"remove-tag":t["remove-tag"]||this.defaultFunction,"expand-change":t["expand-change"]||this.defaultFunction,clear:t.clear||this.defaultFunction,blur:t.blur||this.defaultFunction,focus:t.focus||this.defaultFunction}},getDatePackerSetting(t){const{datePackerSetting:e,setting:n}=t;return{...this.datePackerSetting,...e,...n}},getDatePackerEvents(t){return{change:t.change||this.defaultFunction,blur:t.blur||this.defaultFunction,focus:t.focus||this.defaultFunction}}}};var k=function(){var e=this,n=e._self._c;return n("el-form",e._b({directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryFormRef",attrs:{model:e.queryParams,"label-width":e.labelWidth}},"el-form",e.attrs,!1),[e._l(e.formItem,function(r){return n("el-form-item",{key:r.prop,attrs:{label:r.label,prop:r.prop,rules:e.getItemRules(r)}},[r.type==="input"?n("el-input",e._g(e._b({attrs:{size:e.size},nativeOn:{keydown:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.getList.apply(null,arguments)}},scopedSlots:e._u([e._l(r.template,function(s,o){return{key:o,fn:function(){return[s?n(e.currentInputComponent(),{key:o,tag:"component",attrs:{templateEle:s}}):e._e()]},proxy:!0}})],null,!0),model:{value:e.queryParams[r.prop],callback:function(s){e.$set(e.queryParams,r.prop,s)},expression:"queryParams[item.prop]"}},"el-input",e.getInputSetting(r),!1),e.getInputEvents(r))):r.type==="input-mobile-verification"?n("el-input",e._g(e._b({attrs:{size:e.size},nativeOn:{keydown:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.getList.apply(null,arguments)}},scopedSlots:e._u([e._l(r.template,function(s,o){return{key:o,fn:function(){return[s?n(e.currentInputComponent(),{key:o,tag:"component",attrs:{templateEle:s}}):e._e()]},proxy:!0}})],null,!0),model:{value:e.queryParams[r.prop],callback:function(s){e.$set(e.queryParams,r.prop,s)},expression:"queryParams[item.prop]"}},"el-input",e.getInputSetting(r),!1),e.getInputEvents(r)),[n("template",{slot:"append"},[n("verification-button",{attrs:{verificationSetting:r.verificationSetting,getSmscode:r.getSmscode}})],1)],2):r.type==="select"?n("el-select",e._g(e._b({attrs:{filterable:"",size:e.size},model:{value:e.queryParams[r.prop],callback:function(s){e.$set(e.queryParams,r.prop,s)},expression:"queryParams[item.prop]"}},"el-select",e.getSelectSetting(r),!1),e.getSelectEvents(r)),e._l(r.option||[],function(s){return n("el-option",{key:s.value,attrs:{label:s.label,value:s.value}})}),1):r.type==="cascader"?n("el-cascader",e._g(e._b({attrs:{filterable:"",size:e.size,options:r.options||[]},model:{value:e.queryParams[r.prop],callback:function(s){e.$set(e.queryParams,r.prop,s)},expression:"queryParams[item.prop]"}},"el-cascader",e.getSelectSetting(r),!1),e.getSelectEvents(r))):r.type==="date-picker"?n("el-date-picker",e._g(e._b({attrs:{size:e.size},model:{value:e.queryParams[r.prop],callback:function(s){e.$set(e.queryParams,r.prop,s)},expression:"queryParams[item.prop]"}},"el-date-picker",e.getDatePackerSetting(r),!1),e.getDatePackerEvents(r))):e._e(),r.type==="input-number"?n("el-input-number",e._g(e._b({attrs:{size:e.size},model:{value:e.queryParams[r.prop],callback:function(s){e.$set(e.queryParams,r.prop,s)},expression:"queryParams[item.prop]"}},"el-input-number",e.getInputSetting(r),!1),e.getInputEvents(r))):e._e()],1)}),e._t("default"),e.formOnly?e._e():n("el-form-item",[n("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:e.size,loading:e.formLoading},on:{click:e.handleQuery}},[e._v("查询")]),n("el-button",{attrs:{icon:"el-icon-refresh",size:e.size},on:{click:e.resetQuery}},[e._v("重置")])],1),e._t("behind-the-button")],2)},S=[],x=p(v,k,S,!1,null,"95d7c237",null,null);const P=x.exports,j="",q={components:{},props:{query:{type:Object,default:()=>({prefCode:sessionStorage.getItem("prefCode")})},routePath:{type:String,default:()=>"/search/searchDetail"},inputstyle:{type:Object,default:()=>({width:"1280px"})},openHref:{type:Boolean,default:()=>!1},size:{type:String,default:()=>"medium"}},data(){var t,e;return{keyWord:((e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.keyWord)||"",attrs:{}}},watch:{$attrs:{handler(t){this.attrs={...this.attrs,...t}},immediate:!0,deep:!0}},methods:{search(){const t={path:this.routePath,query:{...this.query,keyWord:this.keyWord}};if(this.openHref){const e=this.$router.resolve(t);window.open(e.href,"_blank")}else this.$router.push(t)}}};var C=function(){var e=this,n=e._self._c;return n("div",{staticClass:"search-box"},[n("el-input",e._b({style:{...e.inputstyle},attrs:{size:e.size},nativeOn:{keydown:function(r){return!r.type.indexOf("key")&&e._k(r.keyCode,"enter",13,r.key,"Enter")?null:e.search.apply(null,arguments)}},model:{value:e.keyWord,callback:function(r){e.keyWord=r},expression:"keyWord"}},"el-input",e.attrs,!1),[n("svg",{staticClass:"el-input__icon",attrs:{slot:"prefix",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},slot:"prefix"},[n("path",{attrs:{d:"M9.51033 10.2186C8.69189 10.8814 7.64943 11.2784 6.51424 11.2784C3.88302 11.2784 1.75 9.14541 1.75 6.51421C1.75 3.88301 3.88302 1.75 6.51424 1.75C9.14545 1.75 11.2785 3.88301 11.2785 6.51421C11.2785 7.64942 10.8814 8.69189 10.2186 9.51034L13.75 13.0417L13.0417 13.75L9.51033 10.2186ZM10.2768 6.51421C10.2768 4.43623 8.59224 2.75168 6.51424 2.75168C4.43623 2.75168 2.75168 4.43623 2.75168 6.51421C2.75168 8.59219 4.43623 10.2767 6.51424 10.2767C8.59224 10.2767 10.2768 8.59219 10.2768 6.51421Z",fill:"#959A9F"}})])])],1)},F=[],$=p(q,C,F,!1,null,"ef706e31",null,null);const w=$.exports,T={name:"Descriptions",components:{DescriptionsColumn:{functional:!0,props:{column:{default:{render:()=>{}},type:Object},formData:{default:{},type:Object}},render(t,e){const{props:n}=e,{column:r,formData:s}=n;return r.render(s)}}},data(){return{attrs:{border:!0,class:"v-descriptions"}}},props:{formItem:{type:Array,default:[]},formData:{type:Object,default:()=>{}}},watch:{$attrs:{handler(t){this.attrs={...this.attrs,...t}},immediate:!0,deep:!0}}};var I=function(){var e=this,n=e._self._c;return n("el-descriptions",e._b({},"el-descriptions",e.attrs,!1),e._l(e.formItem,function(r,s){return n("el-descriptions-item",e._b({key:r.prop,attrs:{label:r.label}},"el-descriptions-item",r.descriptionsItemProps,!1),[r.render?n("DescriptionsColumn",{attrs:{column:r,formData:e.formData}}):n("span",[e._v(e._s(e.formData[r.prop]))])],1)}),1)},D=[],z=p(T,I,D,!1,null,null,null,null);const B=z.exports,O=P,R=w,E=B;l.VDescriptions=E,l.VGeneralBasicForm=O,l.VSearchBox=R,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
|