@lingshugroup/web-plus 1.0.23 → 1.0.25

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.
Files changed (41) hide show
  1. package/README.md +1 -1
  2. package/lib/index.css +1 -1
  3. package/lib/index.css.br +0 -0
  4. package/lib/index.css.gz +0 -0
  5. package/lib/packages/ls-components/components/button/Button.vue/index.cjs +1 -1
  6. package/lib/packages/ls-components/components/button/Button.vue/index.js +2 -2
  7. package/lib/packages/ls-components/components/chart/config/base/index.cjs +1 -1
  8. package/lib/packages/ls-components/components/chart/config/base/index.js +7 -8
  9. package/lib/packages/ls-components/components/chart/config/base/index.js.br +0 -0
  10. package/lib/packages/ls-components/components/chart/config/base/index.js.gz +0 -0
  11. package/lib/packages/ls-components/components/chart/config/template/bar/index.cjs +1 -1
  12. package/lib/packages/ls-components/components/chart/config/template/bar/index.js +79 -79
  13. package/lib/packages/ls-components/components/chart/config/template/bar/index.js.br +0 -0
  14. package/lib/packages/ls-components/components/chart/config/template/bar/index.js.gz +0 -0
  15. package/lib/packages/ls-components/components/chart/config/template/line/index.cjs +1 -1
  16. package/lib/packages/ls-components/components/chart/config/template/line/index.js +90 -90
  17. package/lib/packages/ls-components/components/chart/config/template/line/index.js.br +0 -0
  18. package/lib/packages/ls-components/components/chart/config/template/line/index.js.gz +0 -0
  19. package/lib/packages/ls-components/components/form/Form.vue/index.cjs +1 -1
  20. package/lib/packages/ls-components/components/form/Form.vue/index.js +1 -1
  21. package/lib/packages/ls-components/components/form/Form.vue/index2.cjs +1 -1
  22. package/lib/packages/ls-components/components/form/Form.vue/index2.js +97 -95
  23. package/lib/packages/ls-components/components/form/Form.vue/index2.js.br +0 -0
  24. package/lib/packages/ls-components/components/form/Form.vue/index2.js.gz +0 -0
  25. package/lib/packages/ls-components/components/form/FormItem.vue/index.cjs +1 -1
  26. package/lib/packages/ls-components/components/form/FormItem.vue/index.js +1 -1
  27. package/lib/packages/ls-components/components/form/FormItem.vue/index2.cjs +1 -1
  28. package/lib/packages/ls-components/components/form/FormItem.vue/index2.js +7 -7
  29. package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.br +0 -0
  30. package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.gz +0 -0
  31. package/lib/packages/ls-components/components/form/types/index.cjs +1 -1
  32. package/lib/packages/ls-components/components/form/types/index.js +4 -0
  33. package/lib/packages/ls-components/components/form/types/index.js.br +0 -0
  34. package/lib/packages/ls-components/components/form/types/index.js.gz +0 -0
  35. package/lib/packages/ls-components/components/live/Index.vue/index.cjs +1 -1
  36. package/lib/packages/ls-components/components/live/Index.vue/index.js +2 -2
  37. package/lib/packages/ls-components/components/live/Index.vue/index2.cjs +1 -1
  38. package/lib/packages/ls-components/components/live/Index.vue/index2.js +56 -51
  39. package/lib/packages/ls-components/components/live/Index.vue/index2.js.br +0 -0
  40. package/lib/packages/ls-components/components/live/Index.vue/index2.js.gz +0 -0
  41. package/package.json +1 -1
@@ -1,37 +1,37 @@
1
- var I = Object.defineProperty;
2
- var p = (a, t) => I(a, "name", { value: t, configurable: !0 });
3
- import { numberFixed as C, formatChartAxis as D } from "../../../../_utils/utils/index.js";
4
- import { BG_COLOR_MAP as R, DEF_THEME as s, BAR_COLOR_MAP as M, TOOLTIP_COLOR_MAP as O, FONT_COLOR_MAP as b, DATA_ZOOM_COLOR as L, BG_BAR_COLOR_MAP as A, SPLIT_LINE_COLOR as S } from "../../base/index.js";
5
- const k = /* @__PURE__ */ p((a, t, e, n, o) => {
6
- const { name: r, seriesName: i, value: l, color: u } = a, d = n == 0 ? `<div class="name">${r}</div>` : "", y = t && l !== "-" && i !== "temp" ? `<span class="serise-name">${t ? i : ""}</span>` : "", c = l !== "-" && i !== "temp" ? `<span class="value">${l || "-"}</span>` : "", m = l !== "-" && i !== "temp" ? `<div class="content-badge ${e}" style="background-color: ${typeof u == "string" ? u : o};"></div>` : "";
1
+ var B = Object.defineProperty;
2
+ var p = (o, t) => B(o, "name", { value: t, configurable: !0 });
3
+ import { numberFixed as C, formatChartAxis as I } from "../../../../_utils/utils/index.js";
4
+ import { BG_COLOR_MAP as k, DEF_THEME as l, BAR_COLOR_MAP as _, TOOLTIP_COLOR_MAP as S, FONT_COLOR_MAP as v, BG_BAR_COLOR_MAP as L, SPLIT_LINE_COLOR as w } from "../../base/index.js";
5
+ const D = /* @__PURE__ */ p((o, t, e, i, a) => {
6
+ const { name: s, seriesName: n, value: r, color: u } = o, d = i == 0 ? `<div class="name">${s}</div>` : "", y = t && r !== "-" && n !== "temp" ? `<span class="serise-name">${t ? n : ""}</span>` : "", c = r !== "-" && n !== "temp" ? `<span class="value">${r || "-"}</span>` : "", m = r !== "-" && n !== "temp" ? `<div class="content-badge ${e}" style="background-color: ${typeof u == "string" ? u : a};"></div>` : "";
7
7
  return ` ${d} <div class="content"> <div class="serise-wrap"> ${m} ${y} </div> ${c} </div> `;
8
- }, "setTooltipFormat"), H = /* @__PURE__ */ p((a) => {
9
- let { legend: t, legendIcon: e, tooltip: n = "shadow", theme: o, tooltipFormatter: r, barColorList: i } = a;
10
- const l = i || M[o || s][0];
11
- return r = r || function(u) {
12
- let d = `<div class="ls-bar-tooltip-wrap ${o}">`;
8
+ }, "setTooltipFormat"), R = /* @__PURE__ */ p((o) => {
9
+ let { legend: t, legendIcon: e, tooltip: i = "shadow", theme: a, tooltipFormatter: s, barColorList: n } = o;
10
+ const r = n || _[a || l][0];
11
+ return s = s || function(u) {
12
+ let d = `<div class="ls-bar-tooltip-wrap ${a}">`;
13
13
  return u.forEach((y, c) => {
14
- d += k(y, t, e, c, l);
14
+ d += D(y, t, e, c, r);
15
15
  }), d + "</div>";
16
- }, n ? {
16
+ }, i ? {
17
17
  trigger: "axis",
18
18
  axisPointer: {
19
- type: n,
19
+ type: i,
20
20
  z: 1,
21
21
  label: {
22
- color: O[o || s].color
22
+ color: S[a || l].color
23
23
  }
24
24
  },
25
25
  textStyle: {
26
- color: b[o || s]
26
+ color: v[a || l]
27
27
  },
28
28
  padding: 12,
29
- backgroundColor: O[o || s].bgColor,
30
- extraCssText: `box-shadow: ${O[o || s].shadowColor};`,
31
- formatter: r
29
+ backgroundColor: S[a || l].bgColor,
30
+ extraCssText: `box-shadow: ${S[a || l].shadowColor};`,
31
+ formatter: s
32
32
  } : null;
33
- }, "setTooltip"), T = /* @__PURE__ */ p((a) => {
34
- const { legend: t, legendIcon: e = "rect", theme: n } = a;
33
+ }, "setTooltip"), H = /* @__PURE__ */ p((o) => {
34
+ const { legend: t, legendIcon: e = "rect", theme: i } = o;
35
35
  return {
36
36
  type: "scroll",
37
37
  data: t || [],
@@ -39,7 +39,7 @@ const k = /* @__PURE__ */ p((a, t, e, n, o) => {
39
39
  itemWidth: 12,
40
40
  itemHeight: 10,
41
41
  textStyle: {
42
- color: b[n || s],
42
+ color: v[i || l],
43
43
  fontSize: 12,
44
44
  height: 10,
45
45
  rich: {
@@ -49,8 +49,8 @@ const k = /* @__PURE__ */ p((a, t, e, n, o) => {
49
49
  }
50
50
  }
51
51
  };
52
- }, "setLegend"), Z = /* @__PURE__ */ p((a) => {
53
- const { dataZoom: t } = a, e = {
52
+ }, "setLegend"), F = /* @__PURE__ */ p((o) => {
53
+ const { dataZoom: t } = o, e = {
54
54
  left: "3%",
55
55
  right: "3%",
56
56
  top: "12%",
@@ -58,19 +58,19 @@ const k = /* @__PURE__ */ p((a, t, e, n, o) => {
58
58
  containLabel: !0
59
59
  };
60
60
  return t === "vertical" && delete e.right, t === "horizontal" && delete e.bottom, e;
61
- }, "setGrid"), _ = /* @__PURE__ */ p((a, t, e) => {
62
- const { axisData: n, seriesData: o } = a, { axis: r = "x", theme: i, lineBar: l, dynamicAxis: u, type: d } = t;
61
+ }, "setGrid"), A = /* @__PURE__ */ p((o, t, e) => {
62
+ const { axisData: i, seriesData: a } = o, { axis: s = "x", theme: n, lineBar: r, dynamicAxis: u, type: d } = t;
63
63
  let y = [
64
64
  {
65
- type: r == e ? "category" : "value",
65
+ type: s == e ? "category" : "value",
66
66
  axisTick: {
67
67
  show: !1
68
68
  },
69
69
  axisLine: {
70
- show: r == e,
70
+ show: s == e,
71
71
  lineStyle: {
72
72
  width: 1,
73
- color: b[i || s]
73
+ color: v[n || l]
74
74
  }
75
75
  },
76
76
  axisLabel: {
@@ -79,19 +79,19 @@ const k = /* @__PURE__ */ p((a, t, e, n, o) => {
79
79
  splitLine: {
80
80
  lineStyle: {
81
81
  type: "dashed",
82
- color: S[i || s]
82
+ color: w[n || l]
83
83
  }
84
84
  },
85
- data: r == e ? n : []
85
+ data: s == e ? i : []
86
86
  }
87
87
  ];
88
- if (r !== e && (l && (y = r == "x" ? [
88
+ if (s !== e && (r && (y = s == "x" ? [
89
89
  {
90
90
  type: "value",
91
91
  splitLine: {
92
92
  show: !1,
93
93
  lineStyle: {
94
- color: S[i || s]
94
+ color: w[n || l]
95
95
  }
96
96
  }
97
97
  },
@@ -99,7 +99,7 @@ const k = /* @__PURE__ */ p((a, t, e, n, o) => {
99
99
  type: "value",
100
100
  splitLine: {
101
101
  lineStyle: {
102
- color: S[i || s],
102
+ color: w[n || l],
103
103
  type: "dashed",
104
104
  width: 2,
105
105
  dashOffset: 2
@@ -112,16 +112,16 @@ const k = /* @__PURE__ */ p((a, t, e, n, o) => {
112
112
  }
113
113
  ]), u)) {
114
114
  let c = [];
115
- d === "multiple" && (!l || r == "y" && l) && (c = o.reduce((m, x) => m.concat(x.data), [])), y.map((m, x) => {
116
- var w;
117
- d === "multiple" ? l && r == "x" && (c = (((w = o[x]) == null ? void 0 : w.data) || []).map((v) => C(v))) : c = (o || []).map((v) => C(v));
118
- const h = Math.max(...c), g = Math.min(...c), { aInterval: f, aMax: $, aMin: B } = D(h, g);
119
- return m.min = B, m.max = $, m.interval = f, m;
115
+ d === "multiple" && (!r || s == "y" && r) && (c = a.reduce((m, f) => m.concat(f.data), [])), y.map((m, f) => {
116
+ var O;
117
+ d === "multiple" ? r && s == "x" && (c = (((O = a[f]) == null ? void 0 : O.data) || []).map((g) => C(g))) : c = (a || []).map((g) => C(g)), c = c.filter((g) => g > 0);
118
+ const h = Math.max(...c), b = Math.min(...c), { aInterval: x, aMax: M, aMin: $ } = I(h, b);
119
+ return m.min = $, m.max = M, m.interval = x, m;
120
120
  });
121
121
  }
122
122
  return y;
123
- }, "setAxis"), F = /* @__PURE__ */ p((a) => {
124
- const { dataZoom: t, dataZoomColorOut: e, dataZoomColorIn: n, theme: o } = a;
123
+ }, "setAxis"), T = /* @__PURE__ */ p((o) => {
124
+ const { dataZoom: t, dataZoomColorOut: e, dataZoomColorIn: i, theme: a } = o;
125
125
  return t ? [
126
126
  {
127
127
  show: !0,
@@ -130,20 +130,20 @@ const k = /* @__PURE__ */ p((a, t, e, n, o) => {
130
130
  orient: t,
131
131
  showDataShadow: !0,
132
132
  dataBackground: {
133
- lineStyle: {
134
- color: "transparent"
135
- },
133
+ // lineStyle: {
134
+ // color: 'transparent'
135
+ // },
136
136
  areaStyle: {
137
- color: n || L[o || s][0]
137
+ color: i || "#d2dbee"
138
138
  }
139
139
  },
140
- fillerColor: e || L[o || s][1],
141
- moveHandleStyle: {
142
- opacity: 0
143
- },
144
- borderColor: null,
140
+ fillerColor: e || "rgba(207, 223, 243, 0.25)",
141
+ // moveHandleStyle: {
142
+ // opacity: 0
143
+ // },
144
+ // borderColor: null,
145
145
  textStyle: {
146
- color: b[o || s]
146
+ color: v[a || l]
147
147
  }
148
148
  },
149
149
  {
@@ -159,79 +159,79 @@ const k = /* @__PURE__ */ p((a, t, e, n, o) => {
159
159
  showDataShadow: !0
160
160
  }
161
161
  ] : null;
162
- }, "setDataZoom"), E = /* @__PURE__ */ p((a, t) => {
163
- const { seriesData: e } = a, {
164
- type: n = "simple",
165
- showBarFont: o = !0,
166
- labelPosition: r = "inside",
167
- smooth: i = !0,
168
- areaStyle: l = void 0,
162
+ }, "setDataZoom"), Z = /* @__PURE__ */ p((o, t) => {
163
+ const { seriesData: e } = o, {
164
+ type: i = "simple",
165
+ showBarFont: a = !0,
166
+ labelPosition: s = "inside",
167
+ smooth: n = !0,
168
+ areaStyle: r = void 0,
169
169
  showBackground: u,
170
170
  theme: d,
171
171
  name: y,
172
172
  lineBar: c,
173
173
  axis: m,
174
- symbol: x = "circle"
174
+ symbol: f = "circle"
175
175
  } = t;
176
- return n === "multiple" ? (e || []).map((h, g) => {
177
- const f = {
176
+ return i === "multiple" ? (e || []).map((h, b) => {
177
+ const x = {
178
178
  name: h.name,
179
179
  type: h.type,
180
- symbol: x,
180
+ symbol: f,
181
181
  emphasis: h.emphasis || {
182
182
  focus: "series"
183
183
  },
184
- smooth: i,
185
- areaStyle: l || null,
184
+ smooth: n,
185
+ areaStyle: r || null,
186
186
  label: {
187
- show: o,
188
- position: r
187
+ show: a,
188
+ position: s
189
189
  },
190
190
  showBackground: u,
191
191
  backgroundStyle: {
192
- color: A[d || s]
192
+ color: L[d || l]
193
193
  },
194
194
  itemStyle: h.itemStyle || {},
195
195
  data: h.data || []
196
196
  };
197
- return c && (m !== "y" && g === 1 ? f.yAxisIndex = g : f.yAxisIndex && delete f.yAxisIndex), f;
197
+ return c && (m !== "y" && b === 1 ? x.yAxisIndex = b : x.yAxisIndex && delete x.yAxisIndex), x;
198
198
  }) : [
199
199
  {
200
200
  name: y,
201
201
  label: {
202
- show: o,
203
- position: r
202
+ show: a,
203
+ position: s
204
204
  },
205
205
  showBackground: u,
206
206
  backgroundStyle: {
207
- color: A[d || s]
207
+ color: L[d || l]
208
208
  },
209
209
  data: e || [],
210
- smooth: i,
211
- symbol: x,
210
+ smooth: n,
211
+ symbol: f,
212
212
  // 设置填充透明度
213
- areaStyle: l || null,
213
+ areaStyle: r || null,
214
214
  type: "line"
215
215
  }
216
216
  ];
217
- }, "setSeries"), z = /* @__PURE__ */ p((a, t) => {
218
- const { theme: e, barColorList: n } = t, o = {
217
+ }, "setSeries"), E = /* @__PURE__ */ p((o, t) => {
218
+ const { theme: e, barColorList: i } = t, a = {
219
219
  textStyle: {},
220
- backgroundColor: R[e || s],
221
- color: n || M[e || s],
222
- legend: T(t),
223
- grid: Z(t),
224
- xAxis: _(a, t, "x"),
225
- yAxis: _(a, t, "y"),
226
- series: E(a, t),
227
- dataZoom: F(t)
228
- }, r = H(t);
229
- return r && (o.tooltip = r), o;
220
+ backgroundColor: k[e || l],
221
+ color: i || _[e || l],
222
+ legend: H(t),
223
+ grid: F(t),
224
+ xAxis: A(o, t, "x"),
225
+ yAxis: A(o, t, "y"),
226
+ series: Z(o, t),
227
+ dataZoom: T(t)
228
+ }, s = R(t);
229
+ return s && (a.tooltip = s), a;
230
230
  }, "setOption");
231
- function W(a = {}, t = {}) {
232
- return z(a, t);
231
+ function P(o = {}, t = {}) {
232
+ return E(o, t);
233
233
  }
234
- p(W, "dealOption");
234
+ p(P, "dealOption");
235
235
  export {
236
- W as dealOption
236
+ P as dealOption
237
237
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */r=t.default(e.default,[["__scopeId","data-v-1da710c6"]]);exports.default=r;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */r=t.default(e.default,[["__scopeId","data-v-f107e914"]]);exports.default=r;
@@ -1,7 +1,7 @@
1
1
  import o from "./index2.js";
2
2
  /* empty css */
3
3
  import r from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-1da710c6"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-f107e914"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1 +1 @@
1
- "use strict";var V=Object.defineProperty;var u=(f,m)=>V(f,"name",{value:m,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),w=,/* empty css */_=,/* empty css */T=,/* empty css */i=,/* empty css */L=,/* empty css */D=,/* empty css */I=,/* empty css */O=,/* empty css */B=,/* empty css */M=,/* empty css */z={class:"ls-form"},A=e.defineComponent({name:"LSForm"}),U=e.defineComponent({...A,props:_.lsFormProps,emits:["submit","reset","update:form-data","onChange"],setup(f,{expose:m,emit:q}){const S=f,k=q,l=e.useAttrs(),$=e.computed(()=>l&&l.hasOwnProperty("inline")?typeof l.inline=="boolean"&&l.inline===!1?{}:l&&l["label-position"]==="top"?{class:"form-item-buttons "}:{}:l&&l["label-position"]==="top"?{"label-position":"top"}:{label:" "}),a=e.ref(),v=["label","input","textarea","number","radio","checkbox","select","date","datetimerange","timePicker","timeSelect","cascader","multipleCascader","switch","inputRange","inputNumberRange","slot","itemSlot"];let t=e.reactive({});function b(o){o&&(o.resetFields(),k("reset",t))}u(b,"resetForm");async function C(o){o&&await o.validate((n,d)=>{n?k("submit",t):console.warn("error submit!",d)})}u(C,"submitForm");function F(){return new Promise((o,n)=>{if(!a.value)return o(!1);a.value.validate((d,c)=>{d?o(t):(console.warn("error submit!",c),n(c))})})}u(F,"validate");function s(o,n){L.default(t,o,n)}u(s,"updateFormData"),e.watch(()=>S.formData,o=>{t=o||{}},{deep:!0,immediate:!0});function g(o,n){k("onChange",o,n)}return u(g,"onChange"),m({FormRef:a,validate:F,submitForm:C,resetForm:b}),(o,n)=>{const d=D.ElCol,c=I.ElRow,h=O.ElButton,E=B.ElFormItem,P=B.ElForm,R=M.ElConfigProvider;return e.openBlock(),e.createElementBlock("div",z,[e.createVNode(R,{locale:e.unref(T.default),"value-on-clear":void 0,"empty-values":[void 0,null]},{default:e.withCtx(()=>[e.createVNode(P,e.mergeProps({ref_key:"FormRef",ref:a,"label-position":"left","require-asterisk-position":"right","label-width":o.labelWidth,"hide-required-asterisk":!!o.read},o.$attrs,{model:e.unref(t),disabled:o.loading||o.disabled,class:[o.read&&o.hasDefReadStyle?"show-label":""]}),{default:e.withCtx(()=>[o.column>1?(e.openBlock(),e.createBlock(c,{key:0,gutter:10},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.formItems,r=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r.prop},[r.hideColumn?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,{key:0,span:r.isRow?24:24/o.column},{default:e.withCtx(()=>[r.type==="slot"?e.renderSlot(o.$slots,r.prop,{key:0,slotRow:{...r},value:e.unref(i.default)(e.unref(t),r.prop),updateFormData:s},void 0,!0):v.includes(r.type)?(e.openBlock(),e.createBlock(w.default,e.mergeProps({key:1,"is-value":!0,value:e.unref(i.default)(e.unref(t),r.prop),colon:o.colon,read:o.read,"label-empty":o.labelEmpty,ref_for:!0},r,{"onUpdate:value":s,onOnChange:g}),e.createSlots({_:2},[e.renderList(o.$slots,(N,p)=>({name:p,fn:e.withCtx(y=>[e.renderSlot(o.$slots,p,e.mergeProps({ref_for:!0},y),void 0,!0)])}))]),1040,["value","colon","read","label-empty"])):e.renderSlot(o.$slots,r.type,{key:2,slotRow:{...r},value:e.unref(i.default)(e.unref(t),r.prop),updateFormData:s},void 0,!0)]),_:2},1032,["span"]))],64))),128))]),_:3})):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(o.formItems,r=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r.prop},[r.hideColumn?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[r.type==="slot"?e.renderSlot(o.$slots,r.prop,{key:0,slotRow:{...r},value:e.unref(i.default)(e.unref(t),r.prop),updateFormData:s},void 0,!0):v.includes(r.type)?(e.openBlock(),e.createBlock(w.default,e.mergeProps({key:1,"is-value":!0,value:e.unref(i.default)(e.unref(t),r.prop),colon:o.colon,read:o.read,"label-empty":o.labelEmpty,ref_for:!0},r,{"onUpdate:value":s,onOnChange:g}),e.createSlots({_:2},[e.renderList(o.$slots,(N,p)=>({name:p,fn:e.withCtx(y=>[e.renderSlot(o.$slots,p,e.mergeProps({ref_for:!0},y),void 0,!0)])}))]),1040,["value","colon","read","label-empty"])):e.renderSlot(o.$slots,r.type,{key:2,slotRow:{...r},value:e.unref(i.default)(e.unref(t),r.prop),updateFormData:s},void 0,!0)],64))],64))),128)),e.renderSlot(o.$slots,"default",{},void 0,!0),o.showButtons?(e.openBlock(),e.createBlock(E,e.mergeProps({key:2},e.unref($),{class:o.buttonsClass}),{default:e.withCtx(()=>[o.$slots["buttons-prepend"]?e.renderSlot(o.$slots,"buttons-prepend",{key:0},void 0,!0):e.createCommentVNode("",!0),o.showSubmit?(e.openBlock(),e.createBlock(h,{key:1,type:"primary",class:e.normalizeClass(o.confirmClassName),loading:o.loading&&o.showBtnLoading,onClick:n[0]||(n[0]=r=>C(a.value))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.confirmText),1)]),_:1},8,["class","loading"])):e.createCommentVNode("",!0),o.showReset?(e.openBlock(),e.createBlock(h,{key:2,onClick:n[1]||(n[1]=r=>b(a.value))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.resetText||"重置"),1)]),_:1})):e.createCommentVNode("",!0)]),_:3},16,["class"])):e.createCommentVNode("",!0)]),_:3},16,["label-width","hide-required-asterisk","model","disabled","class"])]),_:3},8,["locale"])])}}});exports.default=U;
1
+ "use strict";var _=Object.defineProperty;var i=(f,m)=>_(f,"name",{value:m,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),B=,/* empty css */T=,/* empty css */L=,/* empty css */d=,/* empty css */D=,/* empty css */I=,/* empty css */O=,/* empty css */M=,/* empty css */q=,/* empty css */z=,/* empty css */A={class:"ls-form"},U=e.defineComponent({name:"LSForm"}),j=e.defineComponent({...U,props:T.lsFormProps,emits:["submit","reset","update:form-data","onChange"],setup(f,{expose:m,emit:S}){const $=f,k=S,l=e.useAttrs(),F=e.computed(()=>l&&l.hasOwnProperty("inline")?typeof l.inline=="boolean"&&l.inline===!1?{}:l&&l["label-position"]==="top"?{class:"form-item-buttons "}:{}:l&&l["label-position"]==="top"?{"label-position":"top"}:{label:" "}),s=e.ref(),b=["label","input","textarea","number","radio","checkbox","select","date","datetimerange","timePicker","timeSelect","cascader","multipleCascader","switch","inputRange","inputNumberRange","slot","itemSlot"];let t=e.reactive({});function C(o){o&&(o.resetFields(),k("reset",t))}i(C,"resetForm");async function g(o){o&&await o.validate((n,a)=>{n?k("submit",t):console.warn("error submit!",a)})}i(g,"submitForm");function E(){return new Promise((o,n)=>{if(!s.value)return o(!1);s.value.validate((a,c)=>{a?o(t):(console.warn("error submit!",c),n(c))})})}i(E,"validate");function u(o,n){D.default(t,o,n)}i(u,"updateFormData"),e.watch(()=>$.formData,o=>{t=o||{}},{deep:!0,immediate:!0});function h(o,n,a){k("onChange",o,n,a)}return i(h,"onChange"),m({FormRef:s,validate:E,submitForm:g,resetForm:C}),(o,n)=>{const a=I.ElCol,c=O.ElRow,w=M.ElButton,P=q.ElFormItem,R=q.ElForm,N=z.ElConfigProvider;return e.openBlock(),e.createElementBlock("div",A,[e.createVNode(N,{locale:e.unref(L.default),"value-on-clear":void 0,"empty-values":[void 0,null]},{default:e.withCtx(()=>[e.createVNode(R,e.mergeProps({ref_key:"FormRef",ref:s,"label-position":"left","require-asterisk-position":"right","label-width":o.labelWidth,"hide-required-asterisk":!!o.read},o.$attrs,{model:e.unref(t),disabled:o.loading||o.disabled,class:[o.read&&o.hasDefReadStyle?"show-label":""]}),{default:e.withCtx(()=>[o.column>1?(e.openBlock(),e.createBlock(c,{key:0,gutter:10},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.formItems,(r,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r.prop},[r.hideColumn?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(a,{key:0,span:r.isRow?24:24/o.column},{default:e.withCtx(()=>[r.type==="slot"?e.renderSlot(o.$slots,r.prop,{key:0,slotRow:{...r},value:e.unref(d.default)(e.unref(t),r.prop),updateFormData:u},void 0,!0):b.includes(r.type)?(e.openBlock(),e.createBlock(B.default,e.mergeProps({key:1,"is-value":!0,value:e.unref(d.default)(e.unref(t),r.prop),colon:o.colon,read:o.read,"label-empty":o.labelEmpty,index:y,ref_for:!0},r,{"onUpdate:value":u,onOnChange:h}),e.createSlots({_:2},[e.renderList(o.$slots,(V,p)=>({name:p,fn:e.withCtx(v=>[e.renderSlot(o.$slots,p,e.mergeProps({ref_for:!0},v),void 0,!0)])}))]),1040,["value","colon","read","label-empty","index"])):e.renderSlot(o.$slots,r.type,{key:2,slotRow:{...r},value:e.unref(d.default)(e.unref(t),r.prop),updateFormData:u},void 0,!0)]),_:2},1032,["span"]))],64))),128))]),_:3})):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(o.formItems,(r,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r.prop},[r.hideColumn?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[r.type==="slot"?e.renderSlot(o.$slots,r.prop,{key:0,slotRow:{...r},value:e.unref(d.default)(e.unref(t),r.prop),updateFormData:u},void 0,!0):b.includes(r.type)?(e.openBlock(),e.createBlock(B.default,e.mergeProps({key:1,"is-value":!0,value:e.unref(d.default)(e.unref(t),r.prop),colon:o.colon,read:o.read,"label-empty":o.labelEmpty,index:y,ref_for:!0},r,{"onUpdate:value":u,onOnChange:h}),e.createSlots({_:2},[e.renderList(o.$slots,(V,p)=>({name:p,fn:e.withCtx(v=>[e.renderSlot(o.$slots,p,e.mergeProps({ref_for:!0},v),void 0,!0)])}))]),1040,["value","colon","read","label-empty","index"])):e.renderSlot(o.$slots,r.type,{key:2,slotRow:{...r},value:e.unref(d.default)(e.unref(t),r.prop),updateFormData:u},void 0,!0)],64))],64))),128)),e.renderSlot(o.$slots,"default",{},void 0,!0),o.showButtons?(e.openBlock(),e.createBlock(P,e.mergeProps({key:2},e.unref(F),{class:o.buttonsClass}),{default:e.withCtx(()=>[o.$slots["buttons-prepend"]?e.renderSlot(o.$slots,"buttons-prepend",{key:0},void 0,!0):e.createCommentVNode("",!0),o.showSubmit?(e.openBlock(),e.createBlock(w,{key:1,type:"primary",class:e.normalizeClass(o.confirmClassName),loading:o.loading&&o.showBtnLoading,onClick:n[0]||(n[0]=r=>g(s.value))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.confirmText),1)]),_:1},8,["class","loading"])):e.createCommentVNode("",!0),o.showReset?(e.openBlock(),e.createBlock(w,{key:2,onClick:n[1]||(n[1]=r=>C(s.value))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.resetText||"重置"),1)]),_:1})):e.createCommentVNode("",!0)]),_:3},16,["class"])):e.createCommentVNode("",!0)]),_:3},16,["label-width","hide-required-asterisk","model","disabled","class"])]),_:3},8,["locale"])])}}});exports.default=j;