general-basic-form 1.0.34 → 1.0.36

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 CHANGED
@@ -49,6 +49,7 @@ import { VGeneralBasicForm } from "general-basic-form";
49
49
  size="small"
50
50
  ref="VGeneralBasicFormRef"
51
51
  :labelWidth="formLabelWidth"
52
+ v-bind:loading:sync="loading"
52
53
  :formData: {
53
54
  // 外部传入的表单数据,用于回填
54
55
  }
package/dist/index.js CHANGED
@@ -1,22 +1,22 @@
1
- function u(r, e, s, t, n, o, p, d) {
1
+ function u(r, e, n, t, s, o, p, d) {
2
2
  var a = typeof r == "function" ? r.options : r;
3
- e && (a.render = e, a.staticRenderFns = s, a._compiled = !0), t && (a.functional = !0), o && (a._scopeId = "data-v-" + o);
3
+ e && (a.render = e, a.staticRenderFns = n, a._compiled = !0), t && (a.functional = !0), o && (a._scopeId = "data-v-" + o);
4
4
  var l;
5
5
  if (p ? (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__), n && n.call(this, i), i && i._registeredComponents && i._registeredComponents.add(p);
9
- }, a._ssrRegister = l) : n && (l = d ? function() {
10
- n.call(
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(p);
9
+ }, a._ssrRegister = l) : s && (l = d ? function() {
10
+ s.call(
11
11
  this,
12
12
  (a.functional ? this.parent : this).$root.$options.shadowRoot
13
13
  );
14
- } : n), l)
14
+ } : s), l)
15
15
  if (a.functional) {
16
16
  a._injectStyles = l;
17
- var _ = a.render;
18
- a.render = function(h, f) {
19
- return l.call(f), _(h, f);
17
+ var h = a.render;
18
+ a.render = function(_, f) {
19
+ return l.call(f), h(_, f);
20
20
  };
21
21
  } else {
22
22
  var c = a.beforeCreate;
@@ -27,7 +27,7 @@ function u(r, e, s, t, n, o, p, d) {
27
27
  options: a
28
28
  };
29
29
  }
30
- const y = {
30
+ const m = {
31
31
  props: {
32
32
  verificationSetting: {
33
33
  type: Object,
@@ -75,12 +75,12 @@ const y = {
75
75
  }
76
76
  }
77
77
  };
78
- var m = function() {
79
- var e = this, s = e._self._c;
80
- return s("el-button", { on: { click: e.buttonClick } }, [e._v(e._s(e.buttonType ? e.defaultText : e.buttonText + "s"))]);
78
+ var y = function() {
79
+ var e = this, n = e._self._c;
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
- y,
83
82
  m,
83
+ y,
84
84
  g,
85
85
  !1,
86
86
  null,
@@ -182,6 +182,10 @@ const k = {
182
182
  "start-placeholder": "开始日期",
183
183
  "end-placeholder": "结束日期",
184
184
  type: "daterange"
185
+ },
186
+ attrs: {
187
+ inline: !0,
188
+ "label-position": "left"
185
189
  }
186
190
  };
187
191
  },
@@ -218,6 +222,16 @@ const k = {
218
222
  },
219
223
  deep: !0
220
224
  },
225
+ $attrs: {
226
+ handler(r) {
227
+ this.attrs = {
228
+ ...this.attrs,
229
+ ...r
230
+ };
231
+ },
232
+ immediate: !0,
233
+ deep: !0
234
+ },
221
235
  loading(r) {
222
236
  this.formLoading !== r && (this.formLoading = r);
223
237
  },
@@ -228,9 +242,9 @@ const k = {
228
242
  methods: {
229
243
  /** 搜索按钮操作 */
230
244
  handleQuery() {
231
- var s;
245
+ var n;
232
246
  const r = { page: 1, limit: 10 }, e = {
233
- ...(s = this.$route) == null ? void 0 : s.query,
247
+ ...(n = this.$route) == null ? void 0 : n.query,
234
248
  ...this.queryParams,
235
249
  ...r
236
250
  };
@@ -255,7 +269,7 @@ const k = {
255
269
  return "input-archive";
256
270
  },
257
271
  getItemRules(r) {
258
- const { type: e, rules: s = [] } = r, t = [...s];
272
+ const { type: e, rules: n = [] } = r, t = [...n];
259
273
  return this.noInputBlank && e === "input" && t.push({
260
274
  pattern: this.trimRegex,
261
275
  message: "请输入(不能仅输入空格)",
@@ -263,66 +277,69 @@ const k = {
263
277
  }), t;
264
278
  },
265
279
  getInputSetting(r) {
266
- const { inputSetting: e } = r;
280
+ const { inputSetting: e, setting: n } = r;
267
281
  return {
268
282
  ...this.inputSetting,
269
- ...e
283
+ ...e,
284
+ ...n
270
285
  };
271
286
  },
272
287
  getSelectSetting(r) {
273
- const { selectSetting: e } = r;
288
+ const { selectSetting: e, setting: n } = r;
274
289
  return {
275
290
  ...this.selectSetting,
276
- ...e
291
+ ...e,
292
+ ...n
277
293
  };
278
294
  },
279
295
  getDatePackerSetting(r) {
280
- const { datePackerSetting: e } = r;
296
+ const { datePackerSetting: e, setting: n } = r;
281
297
  return {
282
298
  ...this.datePackerSetting,
283
- ...e
299
+ ...e,
300
+ ...n
284
301
  };
285
302
  }
286
303
  }
287
304
  };
288
305
  var S = function() {
289
- var e = this, s = e._self._c;
290
- return s("el-form", e._b({ directives: [{ name: "show", rawName: "v-show", value: e.showSearch, expression: "showSearch" }], ref: "queryFormRef", attrs: { model: e.queryParams, inline: "", "label-position": "left", "label-width": e.labelWidth } }, "el-form", e.$attrs, !1), [e._l(e.formItem, function(t) {
291
- return s("el-form-item", { key: t.prop, attrs: { label: t.label, prop: t.prop, rules: e.getItemRules(t) } }, [t.type === "input" ? s("el-input", e._b({ attrs: { size: e.size }, nativeOn: { keydown: function(n) {
292
- return !n.type.indexOf("key") && e._k(n.keyCode, "enter", 13, n.key, "Enter") ? null : e.getList.apply(null, arguments);
293
- } }, scopedSlots: e._u([e._l(t.template, function(n, o) {
306
+ 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(t) {
308
+ 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) {
309
+ 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(t.template, function(s, o) {
294
311
  return { key: o, fn: function() {
295
- return [n ? s(e.currentInputComponent(), { key: o, tag: "component", attrs: { templateEle: n } }) : e._e()];
312
+ return [s ? n(e.currentInputComponent(), { key: o, tag: "component", attrs: { templateEle: s } }) : e._e()];
296
313
  }, proxy: !0 };
297
- })], null, !0), model: { value: e.queryParams[t.prop], callback: function(n) {
298
- e.$set(e.queryParams, t.prop, n);
299
- }, expression: "queryParams[item.prop]" } }, "el-input", e.getInputSetting(t), !1)) : t.type === "input-mobile-verification" ? s("el-input", e._b({ attrs: { size: e.size }, nativeOn: { keydown: function(n) {
300
- return !n.type.indexOf("key") && e._k(n.keyCode, "enter", 13, n.key, "Enter") ? null : e.getList.apply(null, arguments);
301
- } }, scopedSlots: e._u([e._l(t.template, function(n, o) {
314
+ })], null, !0), model: { value: e.queryParams[t.prop], callback: function(s) {
315
+ e.$set(e.queryParams, t.prop, s);
316
+ }, 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) {
317
+ 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(t.template, function(s, o) {
302
319
  return { key: o, fn: function() {
303
- return [n ? s(e.currentInputComponent(), { key: o, tag: "component", attrs: { templateEle: n } }) : e._e()];
320
+ return [s ? n(e.currentInputComponent(), { key: o, tag: "component", attrs: { templateEle: s } }) : e._e()];
304
321
  }, proxy: !0 };
305
- })], null, !0), model: { value: e.queryParams[t.prop], callback: function(n) {
306
- e.$set(e.queryParams, t.prop, n);
307
- }, expression: "queryParams[item.prop]" } }, "el-input", e.getInputSetting(t), !1), [s("template", { slot: "append" }, [s("verification-button", { attrs: { verificationSetting: t.verificationSetting, getSmscode: t.getSmscode } })], 1)], 2) : t.type === "select" ? s("el-select", e._b({ attrs: { filterable: "", size: e.size }, model: { value: e.queryParams[t.prop], callback: function(n) {
308
- e.$set(e.queryParams, t.prop, n);
309
- }, expression: "queryParams[item.prop]" } }, "el-select", e.getSelectSetting(t), !1), e._l(t.option || [], function(n) {
310
- return s("el-option", { key: n.value, attrs: { label: n.label, value: n.value } });
311
- }), 1) : t.type === "cascader" ? s("el-cascader", e._b({ attrs: { filterable: "", size: e.size, options: t.options || [] }, model: { value: e.queryParams[t.prop], callback: function(n) {
312
- e.$set(e.queryParams, t.prop, n);
313
- }, expression: "queryParams[item.prop]" } }, "el-cascader", e.getSelectSetting(t), !1)) : t.type === "date-picker" ? s("el-date-picker", e._b({ attrs: { size: e.size }, model: { value: e.queryParams[t.prop], callback: function(n) {
314
- e.$set(e.queryParams, t.prop, n);
315
- }, expression: "queryParams[item.prop]" } }, "el-date-picker", e.getDatePackerSetting(t), !1)) : e._e(), t.type === "input-number" ? s("el-input-number", e._b({ attrs: { size: e.size }, model: { value: e.queryParams[t.prop], callback: function(n) {
316
- e.$set(e.queryParams, t.prop, n);
322
+ })], null, !0), model: { value: e.queryParams[t.prop], callback: function(s) {
323
+ e.$set(e.queryParams, t.prop, s);
324
+ }, 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) {
325
+ e.$set(e.queryParams, t.prop, s);
326
+ }, expression: "queryParams[item.prop]" } }, "el-select", e.getSelectSetting(t), !1), e._l(t.option || [], function(s) {
327
+ return n("el-option", { key: s.value, attrs: { label: s.label, value: s.value } });
328
+ }), 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) {
329
+ e.$set(e.queryParams, t.prop, s);
330
+ }, 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) {
331
+ e.$set(e.queryParams, t.prop, s);
332
+ }, 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) {
333
+ e.$set(e.queryParams, t.prop, s);
317
334
  }, expression: "queryParams[item.prop]" } }, "el-input-number", e.getInputSetting(t), !1)) : e._e()], 1);
318
- }), e._t("default"), e.formOnly ? e._e() : s("el-form-item", [s("el-button", { attrs: { type: "primary", icon: "el-icon-search", size: e.size, loading: e.formLoading }, on: { click: e.handleQuery } }, [e._v("查询")]), s("el-button", { attrs: { icon: "el-icon-refresh", size: e.size }, on: { click: e.resetQuery } }, [e._v("重置")])], 1), e._t("behind-the-button")], 2);
335
+ }), 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);
319
336
  }, x = [], P = /* @__PURE__ */ u(
320
337
  k,
321
338
  S,
322
339
  x,
323
340
  !1,
324
341
  null,
325
- "1892bd0a",
342
+ "7fc8eb2b",
326
343
  null,
327
344
  null
328
345
  );
@@ -360,9 +377,22 @@ const C = {
360
377
  data() {
361
378
  var r, e;
362
379
  return {
363
- keyWord: ((e = (r = this.$route) == null ? void 0 : r.query) == null ? void 0 : e.keyWord) || ""
380
+ keyWord: ((e = (r = this.$route) == null ? void 0 : r.query) == null ? void 0 : e.keyWord) || "",
381
+ attrs: {}
364
382
  };
365
383
  },
384
+ watch: {
385
+ $attrs: {
386
+ handler(r) {
387
+ this.attrs = {
388
+ ...this.attrs,
389
+ ...r
390
+ };
391
+ },
392
+ immediate: !0,
393
+ deep: !0
394
+ }
395
+ },
366
396
  methods: {
367
397
  search() {
368
398
  const r = { path: this.routePath, query: { ...this.query, keyWord: this.keyWord } };
@@ -375,19 +405,19 @@ const C = {
375
405
  }
376
406
  };
377
407
  var $ = function() {
378
- var e = this, s = e._self._c;
379
- return s("div", { staticClass: "search-box" }, [s("el-input", e._b({ style: { ...e.inputstyle }, attrs: { size: e.size }, nativeOn: { keydown: function(t) {
408
+ 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(t) {
380
410
  return !t.type.indexOf("key") && e._k(t.keyCode, "enter", 13, t.key, "Enter") ? null : e.search.apply(null, arguments);
381
411
  } }, model: { value: e.keyWord, callback: function(t) {
382
412
  e.keyWord = t;
383
- }, expression: "keyWord" } }, "el-input", e.$attrs, !1), [s("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" }, [s("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);
413
+ }, 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);
384
414
  }, w = [], T = /* @__PURE__ */ u(
385
415
  C,
386
416
  $,
387
417
  w,
388
418
  !1,
389
419
  null,
390
- "f4757253",
420
+ "ef706e31",
391
421
  null,
392
422
  null
393
423
  );
@@ -405,14 +435,22 @@ const z = T.exports, I = {
405
435
  }
406
436
  },
407
437
  render(r, e) {
408
- const { props: s } = e, { column: t, formData: n } = s;
409
- return t.render(n);
438
+ const { props: n } = e, { column: t, formData: s } = n;
439
+ return t.render(s);
410
440
  }
411
441
  }, O = {
412
442
  name: "Descriptions",
413
443
  components: {
414
444
  DescriptionsColumn: I
415
445
  },
446
+ data() {
447
+ return {
448
+ attrs: {
449
+ border: !0,
450
+ class: "v-descriptions"
451
+ }
452
+ };
453
+ },
416
454
  props: {
417
455
  formItem: {
418
456
  // 定义表单的数据
@@ -425,12 +463,24 @@ const z = T.exports, I = {
425
463
  default: () => {
426
464
  }
427
465
  }
466
+ },
467
+ watch: {
468
+ $attrs: {
469
+ handler(r) {
470
+ this.attrs = {
471
+ ...this.attrs,
472
+ ...r
473
+ };
474
+ },
475
+ immediate: !0,
476
+ deep: !0
477
+ }
428
478
  }
429
479
  };
430
480
  var B = function() {
431
- var e = this, s = e._self._c;
432
- return s("el-descriptions", e._b({ staticClass: "v-descriptions", attrs: { border: "" } }, "el-descriptions", e.$attrs, !1), e._l(e.formItem, function(t, n) {
433
- return s("el-descriptions-item", e._b({ key: t.prop, attrs: { label: t.label } }, "el-descriptions-item", t.descriptionsItemProps, !1), [t.render ? s("DescriptionsColumn", { attrs: { column: t, formData: e.formData } }) : s("span", [e._v(e._s(e.formData[t.prop]))])], 1);
481
+ var e = this, n = e._self._c;
482
+ return n("el-descriptions", e._b({}, "el-descriptions", e.attrs, !1), e._l(e.formItem, function(t, s) {
483
+ 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);
434
484
  }), 1);
435
485
  }, D = [], R = /* @__PURE__ */ u(
436
486
  O,
@@ -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,s,t,n,o,f,W){var a=typeof r=="function"?r.options:r;e&&(a.render=e,a.staticRenderFns=s,a._compiled=!0),t&&(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__),n&&n.call(this,i),i&&i._registeredComponents&&i._registeredComponents.add(f)},a._ssrRegister=u):n&&(u=W?function(){n.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:n),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 _={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,s=e._self._c;return s("el-button",{on:{click:e.buttonClick}},[e._v(e._s(e.buttonType?e.defaultText:e.buttonText+"s"))])},m=[],g=c(_,y,m,!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"}}},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},loading(r){this.formLoading!==r&&(this.formLoading=r)},formLoading(r){this.loading!==r&&this.$emit("update:loading",r)}},methods:{handleQuery(){var s;const r={page:1,limit:10},e={...(s=this.$route)==null?void 0:s.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:s=[]}=r,t=[...s];return this.noInputBlank&&e==="input"&&t.push({pattern:this.trimRegex,message:"请输入(不能仅输入空格)",trigger:"blur"}),t},getInputSetting(r){const{inputSetting:e}=r;return{...this.inputSetting,...e}},getSelectSetting(r){const{selectSetting:e}=r;return{...this.selectSetting,...e}},getDatePackerSetting(r){const{datePackerSetting:e}=r;return{...this.datePackerSetting,...e}}}};var k=function(){var e=this,s=e._self._c;return s("el-form",e._b({directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryFormRef",attrs:{model:e.queryParams,inline:"","label-position":"left","label-width":e.labelWidth}},"el-form",e.$attrs,!1),[e._l(e.formItem,function(t){return s("el-form-item",{key:t.prop,attrs:{label:t.label,prop:t.prop,rules:e.getItemRules(t)}},[t.type==="input"?s("el-input",e._b({attrs:{size:e.size},nativeOn:{keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.getList.apply(null,arguments)}},scopedSlots:e._u([e._l(t.template,function(n,o){return{key:o,fn:function(){return[n?s(e.currentInputComponent(),{key:o,tag:"component",attrs:{templateEle:n}}):e._e()]},proxy:!0}})],null,!0),model:{value:e.queryParams[t.prop],callback:function(n){e.$set(e.queryParams,t.prop,n)},expression:"queryParams[item.prop]"}},"el-input",e.getInputSetting(t),!1)):t.type==="input-mobile-verification"?s("el-input",e._b({attrs:{size:e.size},nativeOn:{keydown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"enter",13,n.key,"Enter")?null:e.getList.apply(null,arguments)}},scopedSlots:e._u([e._l(t.template,function(n,o){return{key:o,fn:function(){return[n?s(e.currentInputComponent(),{key:o,tag:"component",attrs:{templateEle:n}}):e._e()]},proxy:!0}})],null,!0),model:{value:e.queryParams[t.prop],callback:function(n){e.$set(e.queryParams,t.prop,n)},expression:"queryParams[item.prop]"}},"el-input",e.getInputSetting(t),!1),[s("template",{slot:"append"},[s("verification-button",{attrs:{verificationSetting:t.verificationSetting,getSmscode:t.getSmscode}})],1)],2):t.type==="select"?s("el-select",e._b({attrs:{filterable:"",size:e.size},model:{value:e.queryParams[t.prop],callback:function(n){e.$set(e.queryParams,t.prop,n)},expression:"queryParams[item.prop]"}},"el-select",e.getSelectSetting(t),!1),e._l(t.option||[],function(n){return s("el-option",{key:n.value,attrs:{label:n.label,value:n.value}})}),1):t.type==="cascader"?s("el-cascader",e._b({attrs:{filterable:"",size:e.size,options:t.options||[]},model:{value:e.queryParams[t.prop],callback:function(n){e.$set(e.queryParams,t.prop,n)},expression:"queryParams[item.prop]"}},"el-cascader",e.getSelectSetting(t),!1)):t.type==="date-picker"?s("el-date-picker",e._b({attrs:{size:e.size},model:{value:e.queryParams[t.prop],callback:function(n){e.$set(e.queryParams,t.prop,n)},expression:"queryParams[item.prop]"}},"el-date-picker",e.getDatePackerSetting(t),!1)):e._e(),t.type==="input-number"?s("el-input-number",e._b({attrs:{size:e.size},model:{value:e.queryParams[t.prop],callback:function(n){e.$set(e.queryParams,t.prop,n)},expression:"queryParams[item.prop]"}},"el-input-number",e.getInputSetting(t),!1)):e._e()],1)}),e._t("default"),e.formOnly?e._e():s("el-form-item",[s("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:e.size,loading:e.formLoading},on:{click:e.handleQuery}},[e._v("查询")]),s("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,"1892bd0a",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)||""}},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,s=e._self._c;return s("div",{staticClass:"search-box"},[s("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),[s("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"},[s("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)},$=[],T=c(q,C,$,!1,null,"f4757253",null,null);const w=T.exports,z={name:"Descriptions",components:{DescriptionsColumn:{functional:!0,props:{column:{default:{render:()=>{}},type:Object},formData:{default:{},type:Object}},render(r,e){const{props:s}=e,{column:t,formData:n}=s;return t.render(n)}}},props:{formItem:{type:Array,default:[]},formData:{type:Object,default:()=>{}}}};var I=function(){var e=this,s=e._self._c;return s("el-descriptions",e._b({staticClass:"v-descriptions",attrs:{border:""}},"el-descriptions",e.$attrs,!1),e._l(e.formItem,function(t,n){return s("el-descriptions-item",e._b({key:t.prop,attrs:{label:t.label}},"el-descriptions-item",t.descriptionsItemProps,!1),[t.render?s("DescriptionsColumn",{attrs:{column:t,formData:e.formData}}):s("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=w,L=O;l.VDescriptions=L,l.VGeneralBasicForm=F,l.VSearchBox=R,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
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"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.search-box[data-v-f4757253]{position:absolute;left:50%;top:0;transform:translate(-50%) translateY(-50%)}.search-box[data-v-f4757253] .el-input{font-size:16px;font-weight:400;line-height:24px}.search-box[data-v-f4757253] .el-input svg{width:32px;height:100%}.search-box[data-v-f4757253] .el-input .el-input__prefix{left:24px;font-size:32px}.search-box[data-v-f4757253] .el-input .el-input__suffix{right:24px;font-size:32px}.search-box[data-v-f4757253] .el-input .el-input__icon{line-height:60px}.search-box[data-v-f4757253] .el-input .el-input__inner{padding:14px 24px 14px 72px;height:60px;border-radius:37px;background:#FFF;box-shadow:0 0 8px #2b2e3105,0 6px 8px #2b2e3114;border-color:#fff}.search-box[data-v-f4757253] .el-input .el-input__inner::placeholder{color:#959a9f}.search-box[data-v-f4757253] .el-input .el-input__inner:hover{border:1px solid #00B5F2}
1
+ @charset "UTF-8";.search-box[data-v-ef706e31]{position:absolute;left:50%;top:0;transform:translate(-50%) translateY(-50%)}.search-box[data-v-ef706e31] .el-input{font-size:16px;font-weight:400;line-height:24px}.search-box[data-v-ef706e31] .el-input svg{width:32px;height:100%}.search-box[data-v-ef706e31] .el-input .el-input__prefix{left:24px;font-size:32px}.search-box[data-v-ef706e31] .el-input .el-input__suffix{right:24px;font-size:32px}.search-box[data-v-ef706e31] .el-input .el-input__icon{line-height:60px}.search-box[data-v-ef706e31] .el-input .el-input__inner{padding:14px 24px 14px 72px;height:60px;border-radius:37px;background:#FFF;box-shadow:0 0 8px #2b2e3105,0 6px 8px #2b2e3114;border-color:#fff}.search-box[data-v-ef706e31] .el-input .el-input__inner::placeholder{color:#959a9f}.search-box[data-v-ef706e31] .el-input .el-input__inner:hover{border:1px solid #00B5F2}
package/package.json CHANGED
@@ -1,66 +1,66 @@
1
- {
2
- "name": "general-basic-form",
3
- "version": "1.0.34",
4
- "description": "",
5
- "main": "./dist/index.umd.cjs",
6
- "type": "module",
7
- "scripts": {
8
- "build": "cross-env CURRENT_ENV=prod run-p type-check && run-p 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/unlinkModule.ts && yarn unlink && run-p build",
14
- "linkNode": "tsx script/linkNode.ts && yarn link && run-p dev",
15
- "unlinkNode": "tsx script/unlinkNode.ts && yarn unlink && run-p buildts",
16
- "dev": "tsc -w -p .",
17
- "buildts": "rimraf dist && tsc -p ."
18
- },
19
- "keywords": [
20
- "general-basic-form",
21
- "form",
22
- "vue",
23
- "vue2",
24
- "vue3",
25
- "element-plus",
26
- "typescript"
27
- ],
28
- "author": "chendeli419287484@qq.com",
29
- "license": "ISC",
30
- "repository": {
31
- "type": "git",
32
- "url": "git+https://github.com/Alan1034/GeneralBasicForm.git"
33
- },
34
- "devDependencies": {
35
- "@playwright/test": "^1.36.1",
36
- "@types/node": "^20.8.10",
37
- "@vitejs/plugin-legacy": "^4.1.1",
38
- "@vitejs/plugin-vue2": "^2.3.1",
39
- "@vitejs/plugin-vue2-jsx": "^1.1.1",
40
- "chalk": "^2.4.2",
41
- "cross-env": "^7.0.3",
42
- "less": "^4.2.0",
43
- "npm-run-all": "^4.1.5",
44
- "rimraf": "^5.0.5",
45
- "sass": "^1.77.8",
46
- "tsx": "^4.0.0",
47
- "typescript": "^5.2.2",
48
- "vite-plugin-image-optimizer": "^1.1.6"
49
- },
50
- "peerDependencies": {
51
- "vue": "^2.7.0-0"
52
- },
53
- "typings": "./dist/index.d.ts",
54
- "module": "./dist/index.js",
55
- "exports": {
56
- ".": {
57
- "import": "./dist/index.js",
58
- "require": "./dist/index.umd.cjs",
59
- "types": "./dist/index.d.ts"
60
- },
61
- "./style": "./dist/style.css"
62
- },
63
- "files": [
64
- "/dist"
65
- ]
66
- }
1
+ {
2
+ "name": "general-basic-form",
3
+ "version": "1.0.36",
4
+ "description": "",
5
+ "main": "./dist/index.umd.cjs",
6
+ "type": "module",
7
+ "scripts": {
8
+ "build": "cross-env CURRENT_ENV=prod run-p type-check && run-p 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/unlinkModule.ts && yarn unlink && run-p build",
14
+ "linkNode": "tsx script/linkNode.ts && yarn link && run-p dev",
15
+ "unlinkNode": "tsx script/unlinkNode.ts && yarn unlink && run-p buildts",
16
+ "dev": "tsc -w -p .",
17
+ "buildts": "rimraf dist && tsc -p ."
18
+ },
19
+ "keywords": [
20
+ "general-basic-form",
21
+ "form",
22
+ "vue",
23
+ "vue2",
24
+ "vue3",
25
+ "element-plus",
26
+ "typescript"
27
+ ],
28
+ "author": "chendeli419287484@qq.com",
29
+ "license": "ISC",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/Alan1034/GeneralBasicForm.git"
33
+ },
34
+ "devDependencies": {
35
+ "@playwright/test": "^1.36.1",
36
+ "@types/node": "^20.8.10",
37
+ "@vitejs/plugin-legacy": "^4.1.1",
38
+ "@vitejs/plugin-vue2": "^2.3.1",
39
+ "@vitejs/plugin-vue2-jsx": "^1.1.1",
40
+ "chalk": "^2.4.2",
41
+ "cross-env": "^7.0.3",
42
+ "less": "^4.2.0",
43
+ "npm-run-all": "^4.1.5",
44
+ "rimraf": "^5.0.5",
45
+ "sass": "^1.77.8",
46
+ "tsx": "^4.0.0",
47
+ "typescript": "^5.2.2",
48
+ "vite-plugin-image-optimizer": "^1.1.6"
49
+ },
50
+ "peerDependencies": {
51
+ "vue": "^2.7.0-0"
52
+ },
53
+ "typings": "./dist/index.d.ts",
54
+ "module": "./dist/index.js",
55
+ "exports": {
56
+ ".": {
57
+ "import": "./dist/index.js",
58
+ "require": "./dist/index.umd.cjs",
59
+ "types": "./dist/index.d.ts"
60
+ },
61
+ "./style": "./dist/style.css"
62
+ },
63
+ "files": [
64
+ "/dist"
65
+ ]
66
+ }