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