@lingshugroup/web-plus 1.7.1 → 1.7.3
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/lib/hooks/index.cjs +1 -1
- package/lib/hooks/index.js +6 -8
- 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/_hooks/useOptionHook/index.cjs +1 -1
- package/lib/packages/ls-components/components/_hooks/useOptionHook/index.js +37 -32
- package/lib/packages/ls-components/components/_hooks/useOptionHook/index.js.br +0 -0
- package/lib/packages/ls-components/components/_hooks/useOptionHook/index.js.gz +0 -0
- package/lib/packages/ls-components/components/_utils/utils/index.cjs +1 -1
- package/lib/packages/ls-components/components/_utils/utils/index.js +120 -100
- package/lib/packages/ls-components/components/_utils/utils/index.js.br +0 -0
- package/lib/packages/ls-components/components/_utils/utils/index.js.gz +0 -0
- package/lib/packages/ls-components/components/button/Button.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/button/Button.vue/index.js +2 -2
- package/lib/packages/ls-components/components/button/Button.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/button/Button.vue/index2.js +14 -14
- package/lib/packages/ls-components/components/button/Button.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/button/Button.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/button/ButtonGroup.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/button/ButtonGroup.vue/index.js +2 -2
- package/lib/packages/ls-components/components/editor/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/editor/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/editor/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/editor/Index.vue/index2.js +105 -62
- package/lib/packages/ls-components/components/editor/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/editor/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/editor/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/editor/types/index.js +24 -4
- package/lib/packages/ls-components/components/editor/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/editor/types/index.js.gz +0 -0
- package/lib/packages/ls-components/components/layout/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/layout/Index.vue/index.js +1 -1
- package/lib/packages/ls-components/components/menu/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/menu/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/menu/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/menu/Index.vue/index2.js +40 -38
- package/lib/packages/ls-components/components/menu/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/menu/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/menu/MenuItem.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/menu/MenuItem.vue/index.js +30 -30
- package/lib/packages/ls-components/components/menu/MenuItem.vue/index.js.br +0 -0
- package/lib/packages/ls-components/components/menu/MenuItem.vue/index.js.gz +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/upload/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js +52 -52
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.gz +0 -0
- package/lib/types/components/_hooks/index.d.ts +1 -2
- package/lib/types/components/_hooks/useOptionHook.d.ts +3 -3
- package/lib/types/components/_utils/utils.d.ts +1 -0
- package/lib/types/components/dialog/Index.vue.d.ts +1 -1
- package/lib/types/components/editor/Index.vue.d.ts +12 -0
- package/lib/types/components/editor/index.d.ts +24 -0
- package/lib/types/components/editor/types.d.ts +4 -0
- package/lib/types/components/form/FormItem.vue.d.ts +23 -23
- package/lib/types/components/form/index.d.ts +23 -23
- package/lib/types/components/form/types.d.ts +1 -1
- package/lib/types/components/menu/types.d.ts +1 -1
- package/package.json +1 -1
- package/lib/node_modules/.pnpm/colorthief@2.4.0/node_modules/colorthief/dist/color-thief/index.cjs +0 -1
- package/lib/node_modules/.pnpm/colorthief@2.4.0/node_modules/colorthief/dist/color-thief/index.js +0 -222
- package/lib/node_modules/.pnpm/colorthief@2.4.0/node_modules/colorthief/dist/color-thief/index.js.br +0 -0
- package/lib/node_modules/.pnpm/colorthief@2.4.0/node_modules/colorthief/dist/color-thief/index.js.gz +0 -0
- package/lib/packages/ls-components/components/_hooks/useColorthiefHook/index.cjs +0 -1
- package/lib/packages/ls-components/components/_hooks/useColorthiefHook/index.js +0 -23
package/lib/index.css.br
CHANGED
|
Binary file
|
package/lib/index.css.gz
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var d=Object.defineProperty;var r=(a,c)=>d(a,"name",{value:c,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const v=require("lodash"),m=require("vue");function O(){const a={allOption:[],options:[],maps:{}},c=r((e,o)=>{let t="";return e&&e.forEach(l=>{const i=o[l]||"";t&&(t+="-"),t+=i}),t},"getValueByKeys"),p=r(async(e,o,t,l,i)=>{if(e instanceof Function){let n=[];if(l){const s=v.merge({},l);n=(await e(s)).records}else n=await e();a.options=(n||[]).map(s=>{const u=c(t||["id"],s),f=c(o||["name"],s);return a.maps[u]={label:f},{value:u,label:f}}),a.allOption=(i||[{label:"全部",value:""}]).concat(a.options)}return a},"getSelOption");return{getSelOption:p,remoteSearchSelOption:r(async(e,o,t,l,i)=>{const n=m.ref([]);if(!i&&l){o[t]=l;const{options:u}=await p(e,o);n.value=u,delete o[t]}const{options:s}=await p(e,o);return n.value=v.merge(n.value,s),n.value},"remoteSearchSelOption")}}r(O,"useOptionHook");exports.default=O;
|
|
@@ -1,48 +1,53 @@
|
|
|
1
1
|
var v = Object.defineProperty;
|
|
2
|
-
var r = (
|
|
3
|
-
import { merge as
|
|
4
|
-
import { ref as
|
|
5
|
-
function
|
|
6
|
-
const
|
|
2
|
+
var r = (a, c) => v(a, "name", { value: c, configurable: !0 });
|
|
3
|
+
import { merge as m } from "lodash";
|
|
4
|
+
import { ref as O } from "vue";
|
|
5
|
+
function h() {
|
|
6
|
+
const a = {
|
|
7
7
|
allOption: [],
|
|
8
8
|
options: [],
|
|
9
9
|
maps: {}
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
}, c = /* @__PURE__ */ r((t, e) => {
|
|
11
|
+
let o = "";
|
|
12
|
+
return t && t.forEach((i) => {
|
|
13
|
+
const s = e[i] || "";
|
|
14
|
+
o && (o += "-"), o += s;
|
|
15
|
+
}), o;
|
|
16
|
+
}, "getValueByKeys"), u = /* @__PURE__ */ r(async (t, e, o, i, s) => {
|
|
17
|
+
if (t instanceof Function) {
|
|
18
|
+
let n = [];
|
|
19
|
+
if (i) {
|
|
20
|
+
const l = m({}, i);
|
|
21
|
+
n = (await t(l)).records;
|
|
17
22
|
} else
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
return
|
|
22
|
-
label:
|
|
23
|
+
n = await t();
|
|
24
|
+
a.options = (n || []).map((l) => {
|
|
25
|
+
const p = c(o || ["id"], l), f = c(e || ["name"], l);
|
|
26
|
+
return a.maps[p] = {
|
|
27
|
+
label: f
|
|
23
28
|
}, {
|
|
24
|
-
value:
|
|
25
|
-
label:
|
|
29
|
+
value: p,
|
|
30
|
+
label: f
|
|
26
31
|
};
|
|
27
|
-
}),
|
|
32
|
+
}), a.allOption = (s || [{ label: "全部", value: "" }]).concat(a.options);
|
|
28
33
|
}
|
|
29
|
-
return
|
|
34
|
+
return a;
|
|
30
35
|
}, "getSelOption");
|
|
31
36
|
return {
|
|
32
|
-
getSelOption:
|
|
33
|
-
remoteSearchSelOption: /* @__PURE__ */ r(async (
|
|
34
|
-
const
|
|
35
|
-
if (!
|
|
36
|
-
e[
|
|
37
|
-
const { options:
|
|
38
|
-
|
|
37
|
+
getSelOption: u,
|
|
38
|
+
remoteSearchSelOption: /* @__PURE__ */ r(async (t, e, o, i, s) => {
|
|
39
|
+
const n = O([]);
|
|
40
|
+
if (!s && i) {
|
|
41
|
+
e[o] = i;
|
|
42
|
+
const { options: p } = await u(t, e);
|
|
43
|
+
n.value = p, delete e[o];
|
|
39
44
|
}
|
|
40
|
-
const { options:
|
|
41
|
-
return
|
|
45
|
+
const { options: l } = await u(t, e);
|
|
46
|
+
return n.value = m(n.value, l), n.value;
|
|
42
47
|
}, "remoteSearchSelOption")
|
|
43
48
|
};
|
|
44
49
|
}
|
|
45
|
-
r(
|
|
50
|
+
r(h, "useOptionHook");
|
|
46
51
|
export {
|
|
47
|
-
|
|
52
|
+
h as default
|
|
48
53
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var E=Object.defineProperty;var c=(t,e)=>E(t,"name",{value:e,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function a(t){if(t===null)return!0;const e=typeof t;return!!(e==="undefined"||e==="string"&&(t=t.replace(/^\s*|\s*$/g,""),t==="")||e==="number"&&Number.isNaN(t)||e==="object"&&Object.keys(t).length===0)}c(a,"isEmpty");function f(t,e){try{const n=new Blob([t]),i=URL.createObjectURL(n),r=document.createElement("a");r.style.display="none",r.href=i,r.download=e,document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(i)}catch{}}c(f,"exportFile");function d(t){if(a(t))return"";const e=t.lastIndexOf(".");return e>=0?t.substring(e):""}c(d,"getExtension");const h=c((t=[])=>{const e=[];return t.forEach(n=>{e.push(new Promise((i,r)=>{const o=document.createElement("script");o.id=n.id,o.src=n.src,document.body.appendChild(o),o.onload=function(){i({})},o.onerror=function(){o.remove(),r({})}}))}),Promise.all(e)},"loadJs"),g=c((t=[])=>{t.forEach(e=>{const n=document.getElementById(e.id);n&&n.remove()})},"removeJs"),m=c((t=[])=>{const e=[];return t.forEach(n=>{e.push(new Promise((i,r)=>{const o=document.createElement("link");o.id=n.id,o.rel="stylesheet",o.href=n.src,document.body.appendChild(o),o.onload=function(){i({})},o.onerror=function(){o.remove(),r({})}}))}),Promise.all(e)},"loadCss"),p=c((t=[])=>{t.forEach(e=>{const n=document.getElementById(e.id);n&&n.remove()})},"removeCss");function b(){return`#${Math.floor(Math.random()*16777215).toString(16).padStart(6,"0")}`}c(b,"getRandomHexColor");function u(t,e){return Number((Math.ceil(t*100)/100).toFixed(e||1))}c(u,"numberFixed");function O(t,e,n){const i=t,r=e;n=n||0,t=u(t,n),e=u(e,n);let o=u((t-e)/2,n);o=o==0?.1:o;let s=Math.ceil((t-e)/o);s=s==0?1:s,e<o&&(e=0);let l=u(o*s+e,n);return l<=i&&(l=u(l+o,n)),{aMax:l,aMin:e==0||e<r?e:u(e-o,n),aInterval:o}}c(O,"formatChartAxis");function y(t){try{return t=JSON.parse(t),t!==null&&typeof t=="object"?t.constructor===Object:!1}catch{return!1}}c(y,"isValidJSON");function w(t){const e=t.reduce((o,s)=>o+s.byteLength,0),n=new ArrayBuffer(e),i=new Uint8Array(n);let r=0;return t.forEach(o=>{i.set(new Uint8Array(o.file),r),r+=o.byteLength}),i}c(w,"mergeBuffer");function B(t){const e=window.atob(t),n=e.length,i=new Uint8Array(n);for(let r=0;r<n;r++)i[r]=e.charCodeAt(r);return new Uint8Array(i).buffer}c(B,"fileToBuffer");function F(t){if(!t)return{width:0,height:0};const e=t.getBoundingClientRect(),n=window.getComputedStyle(t),i=parseFloat(n.marginLeft),r=parseFloat(n.marginRight),o=parseFloat(n.marginTop),s=parseFloat(n.marginBottom),l=e.width+i+r,C=e.height+o+s;return{width:l,height:C}}c(F,"getElementFullSize");function M(t,e){const n=t.getBoundingClientRect(),i=window.innerWidth,{width:r}=F(e),{left:o,right:s}=n||{};let l="";return o<i-r&&s<(r||i)?l="left":s>i&&(l="right"),l}c(M,"elementOutOfBounds");const R={isEmpty:a,exportFile:f,getExtension:d,loadJs:h,removeJs:g,loadCss:m,removeCss:p,getRandomHexColor:b,numberFixed:u,isValidJSON:y,mergeBuffer:w,fileToBuffer:B};exports.default=R;exports.elementOutOfBounds=M;exports.exportFile=f;exports.fileToBuffer=B;exports.formatChartAxis=O;exports.getExtension=d;exports.getRandomHexColor=b;exports.isEmpty=a;exports.isValidJSON=y;exports.loadCss=m;exports.loadJs=h;exports.mergeBuffer=w;exports.numberFixed=u;exports.removeCss=p;exports.removeJs=g;
|
|
@@ -1,137 +1,157 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
function
|
|
4
|
-
if (
|
|
5
|
-
const
|
|
6
|
-
return !!(
|
|
1
|
+
var d = Object.defineProperty;
|
|
2
|
+
var i = (t, e) => d(t, "name", { value: e, configurable: !0 });
|
|
3
|
+
function a(t) {
|
|
4
|
+
if (t === null) return !0;
|
|
5
|
+
const e = typeof t;
|
|
6
|
+
return !!(e === "undefined" || e === "string" && (t = t.replace(/^\s*|\s*$/g, ""), t === "") || e === "number" && Number.isNaN(t) || e === "object" && Object.keys(t).length === 0);
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
function
|
|
8
|
+
i(a, "isEmpty");
|
|
9
|
+
function h(t, e) {
|
|
10
10
|
try {
|
|
11
|
-
const
|
|
12
|
-
|
|
11
|
+
const n = new Blob([t]), c = URL.createObjectURL(n), r = document.createElement("a");
|
|
12
|
+
r.style.display = "none", r.href = c, r.download = e, document.body.appendChild(r), r.click(), r.remove(), URL.revokeObjectURL(c);
|
|
13
13
|
} catch {
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
function
|
|
18
|
-
if (
|
|
19
|
-
const
|
|
20
|
-
return
|
|
16
|
+
i(h, "exportFile");
|
|
17
|
+
function g(t) {
|
|
18
|
+
if (a(t)) return "";
|
|
19
|
+
const e = t.lastIndexOf(".");
|
|
20
|
+
return e >= 0 ? t.substring(e) : "";
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
new Promise((c,
|
|
28
|
-
const
|
|
29
|
-
|
|
22
|
+
i(g, "getExtension");
|
|
23
|
+
const p = /* @__PURE__ */ i((t = []) => {
|
|
24
|
+
const e = [];
|
|
25
|
+
return t.forEach((n) => {
|
|
26
|
+
e.push(
|
|
27
|
+
new Promise((c, r) => {
|
|
28
|
+
const o = document.createElement("script");
|
|
29
|
+
o.id = n.id, o.src = n.src, document.body.appendChild(o), o.onload = function() {
|
|
30
30
|
c({});
|
|
31
|
-
},
|
|
32
|
-
|
|
31
|
+
}, o.onerror = function() {
|
|
32
|
+
o.remove(), r({});
|
|
33
33
|
};
|
|
34
34
|
})
|
|
35
35
|
);
|
|
36
|
-
}), Promise.all(
|
|
37
|
-
}, "loadJs"),
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
36
|
+
}), Promise.all(e);
|
|
37
|
+
}, "loadJs"), m = /* @__PURE__ */ i((t = []) => {
|
|
38
|
+
t.forEach((e) => {
|
|
39
|
+
const n = document.getElementById(e.id);
|
|
40
|
+
n && n.remove();
|
|
41
41
|
});
|
|
42
|
-
}, "removeJs"),
|
|
43
|
-
const
|
|
44
|
-
return
|
|
45
|
-
|
|
46
|
-
new Promise((c,
|
|
47
|
-
const
|
|
48
|
-
|
|
42
|
+
}, "removeJs"), b = /* @__PURE__ */ i((t = []) => {
|
|
43
|
+
const e = [];
|
|
44
|
+
return t.forEach((n) => {
|
|
45
|
+
e.push(
|
|
46
|
+
new Promise((c, r) => {
|
|
47
|
+
const o = document.createElement("link");
|
|
48
|
+
o.id = n.id, o.rel = "stylesheet", o.href = n.src, document.body.appendChild(o), o.onload = function() {
|
|
49
49
|
c({});
|
|
50
|
-
},
|
|
51
|
-
|
|
50
|
+
}, o.onerror = function() {
|
|
51
|
+
o.remove(), r({});
|
|
52
52
|
};
|
|
53
53
|
})
|
|
54
54
|
);
|
|
55
|
-
}), Promise.all(
|
|
56
|
-
}, "loadCss"),
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
|
|
55
|
+
}), Promise.all(e);
|
|
56
|
+
}, "loadCss"), y = /* @__PURE__ */ i((t = []) => {
|
|
57
|
+
t.forEach((e) => {
|
|
58
|
+
const n = document.getElementById(e.id);
|
|
59
|
+
n && n.remove();
|
|
60
60
|
});
|
|
61
61
|
}, "removeCss");
|
|
62
|
-
function
|
|
62
|
+
function w() {
|
|
63
63
|
return `#${Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0")}`;
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
function u(
|
|
67
|
-
return Number((Math.ceil(
|
|
65
|
+
i(w, "getRandomHexColor");
|
|
66
|
+
function u(t, e) {
|
|
67
|
+
return Number((Math.ceil(t * 100) / 100).toFixed(e || 1));
|
|
68
68
|
}
|
|
69
|
-
|
|
70
|
-
function
|
|
71
|
-
const c =
|
|
72
|
-
|
|
73
|
-
let
|
|
74
|
-
|
|
75
|
-
let
|
|
76
|
-
|
|
77
|
-
let l = u(
|
|
78
|
-
return l <= c && (l = u(l +
|
|
69
|
+
i(u, "numberFixed");
|
|
70
|
+
function R(t, e, n) {
|
|
71
|
+
const c = t, r = e;
|
|
72
|
+
n = n || 0, t = u(t, n), e = u(e, n);
|
|
73
|
+
let o = u((t - e) / 2, n);
|
|
74
|
+
o = o == 0 ? 0.1 : o;
|
|
75
|
+
let s = Math.ceil((t - e) / o);
|
|
76
|
+
s = s == 0 ? 1 : s, e < o && (e = 0);
|
|
77
|
+
let l = u(o * s + e, n);
|
|
78
|
+
return l <= c && (l = u(l + o, n)), {
|
|
79
79
|
aMax: l,
|
|
80
|
-
aMin:
|
|
81
|
-
aInterval:
|
|
80
|
+
aMin: e == 0 || e < r ? e : u(e - o, n),
|
|
81
|
+
aInterval: o
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
|
|
85
|
-
function
|
|
84
|
+
i(R, "formatChartAxis");
|
|
85
|
+
function E(t) {
|
|
86
86
|
try {
|
|
87
|
-
return
|
|
87
|
+
return t = JSON.parse(t), t !== null && typeof t == "object" ? t.constructor === Object : !1;
|
|
88
88
|
} catch {
|
|
89
89
|
return !1;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
|
|
93
|
-
function
|
|
94
|
-
const
|
|
95
|
-
let
|
|
96
|
-
return
|
|
97
|
-
c.set(new Uint8Array(
|
|
92
|
+
i(E, "isValidJSON");
|
|
93
|
+
function B(t) {
|
|
94
|
+
const e = t.reduce((o, s) => o + s.byteLength, 0), n = new ArrayBuffer(e), c = new Uint8Array(n);
|
|
95
|
+
let r = 0;
|
|
96
|
+
return t.forEach((o) => {
|
|
97
|
+
c.set(new Uint8Array(o.file), r), r += o.byteLength;
|
|
98
98
|
}), c;
|
|
99
99
|
}
|
|
100
|
-
|
|
101
|
-
function
|
|
102
|
-
const
|
|
103
|
-
for (let
|
|
104
|
-
c[
|
|
100
|
+
i(B, "mergeBuffer");
|
|
101
|
+
function C(t) {
|
|
102
|
+
const e = window.atob(t), n = e.length, c = new Uint8Array(n);
|
|
103
|
+
for (let r = 0; r < n; r++)
|
|
104
|
+
c[r] = e.charCodeAt(r);
|
|
105
105
|
return new Uint8Array(c).buffer;
|
|
106
106
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
107
|
+
i(C, "fileToBuffer");
|
|
108
|
+
function L(t) {
|
|
109
|
+
if (!t)
|
|
110
|
+
return {
|
|
111
|
+
width: 0,
|
|
112
|
+
height: 0
|
|
113
|
+
};
|
|
114
|
+
const e = t.getBoundingClientRect(), n = window.getComputedStyle(t), c = parseFloat(n.marginLeft), r = parseFloat(n.marginRight), o = parseFloat(n.marginTop), s = parseFloat(n.marginBottom), l = e.width + c + r, f = e.height + o + s;
|
|
115
|
+
return {
|
|
116
|
+
width: l,
|
|
117
|
+
height: f
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
i(L, "getElementFullSize");
|
|
121
|
+
function U(t, e) {
|
|
122
|
+
const n = t.getBoundingClientRect(), c = window.innerWidth, { width: r } = L(e), { left: o, right: s } = n || {};
|
|
123
|
+
let l = "";
|
|
124
|
+
return o < c - r && s < (r || c) ? l = "left" : s > c && (l = "right"), l;
|
|
125
|
+
}
|
|
126
|
+
i(U, "elementOutOfBounds");
|
|
127
|
+
const A = {
|
|
128
|
+
isEmpty: a,
|
|
129
|
+
exportFile: h,
|
|
130
|
+
getExtension: g,
|
|
131
|
+
loadJs: p,
|
|
132
|
+
removeJs: m,
|
|
133
|
+
loadCss: b,
|
|
134
|
+
removeCss: y,
|
|
135
|
+
getRandomHexColor: w,
|
|
117
136
|
numberFixed: u,
|
|
118
|
-
isValidJSON:
|
|
119
|
-
mergeBuffer:
|
|
120
|
-
fileToBuffer:
|
|
137
|
+
isValidJSON: E,
|
|
138
|
+
mergeBuffer: B,
|
|
139
|
+
fileToBuffer: C
|
|
121
140
|
};
|
|
122
141
|
export {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
C as
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
b as
|
|
133
|
-
|
|
142
|
+
A as default,
|
|
143
|
+
U as elementOutOfBounds,
|
|
144
|
+
h as exportFile,
|
|
145
|
+
C as fileToBuffer,
|
|
146
|
+
R as formatChartAxis,
|
|
147
|
+
g as getExtension,
|
|
148
|
+
w as getRandomHexColor,
|
|
149
|
+
a as isEmpty,
|
|
150
|
+
E as isValidJSON,
|
|
151
|
+
b as loadCss,
|
|
152
|
+
p as loadJs,
|
|
153
|
+
B as mergeBuffer,
|
|
134
154
|
u as numberFixed,
|
|
135
|
-
|
|
136
|
-
|
|
155
|
+
y as removeCss,
|
|
156
|
+
m as removeJs
|
|
137
157
|
};
|
|
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 */u=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 */u=t.default(e.default,[["__scopeId","data-v-f4aca2be"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f4aca2be"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */const e=require("vue"),p=,/* empty css */f=,/* empty css */d=,/* empty css */m=,/* empty css */k=,/* empty css */y=e.defineComponent({name:"LSButton"}),B=e.defineComponent({...y,props:f.lsBtnProp,setup(S){const r=e.useSlots(),s=d.useNamespace("button").b(),n=e.inject(p.lsBtnKey,void 0),o=e.ref(""),a=e.ref(""),l=e.ref("");n&&(o.value=n.separator,a.value=n.separatorColor,l.value=n.separatorSize);const u=e.computed(()=>({color:a.value,fontSize:`${l.value}px`}));return(t,
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */const e=require("vue"),p=,/* empty css */f=,/* empty css */d=,/* empty css */m=,/* empty css */k=,/* empty css */y=e.defineComponent({name:"LSButton"}),B=e.defineComponent({...y,props:f.lsBtnProp,setup(S){const r=e.useSlots(),s=d.useNamespace("button").b(),n=e.inject(p.lsBtnKey,void 0),o=e.ref(""),a=e.ref(""),l=e.ref("");n&&(o.value=n.separator,a.value=n.separatorColor,l.value=n.separatorSize);const u=e.computed(()=>({color:a.value,fontSize:`${l.value}px`}));return(t,v)=>{const c=k.ElButton;return t.$attrs.icon&&!e.unref(r).default?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(c,e.mergeProps(t.$attrs,{class:e.unref(s)}),null,16,["class"]),e.unref(o)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"ls-separator",style:e.normalizeStyle(e.unref(u))},e.toDisplayString(e.unref(o)),5)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(c,e.mergeProps({key:1},t.$attrs,{class:e.unref(s)}),{default:e.withCtx(()=>{var i;return[!t.$attrs.icon&&((i=t.iconConfig)!=null&&i.name||e.unref(r).icon)?(e.openBlock(),e.createBlock(m.default,e.mergeProps({key:0,class:[e.unref(r).default?"":"only-icon"]},t.iconConfig),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"icon",{},void 0,!0)]),_:3},16,["class"])):e.createCommentVNode("",!0),e.unref(r).default?e.renderSlot(t.$slots,"default",{key:1},void 0,!0):e.createCommentVNode("",!0),e.unref(o)?(e.openBlock(),e.createElementBlock("span",{key:2,class:"ls-separator",style:e.normalizeStyle(e.unref(u))},e.toDisplayString(e.unref(o)),5)):e.createCommentVNode("",!0)]}),_:3},16,["class"]))}}});exports.default=B;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { defineComponent as _, useSlots as $, inject as g, ref as l, computed as z, unref as o, openBlock as r, createElementBlock as c, Fragment as b, createVNode as N, mergeProps as p, normalizeStyle as
|
|
3
|
+
import { defineComponent as _, useSlots as $, inject as g, ref as l, computed as z, unref as o, openBlock as r, createElementBlock as c, Fragment as b, createVNode as N, mergeProps as p, normalizeStyle as S, toDisplayString as k, createCommentVNode as n, createBlock as v, withCtx as B, renderSlot as C } from "vue";
|
|
4
4
|
import { lsBtnKey as P } from "../../_constants/token/index.js";
|
|
5
5
|
import { lsBtnProp as h } from "../types/index.js";
|
|
6
6
|
import { useNamespace as E } from "../../_hooks/useNamespace/index.js";
|
|
@@ -12,26 +12,26 @@ const j = _({
|
|
|
12
12
|
...j,
|
|
13
13
|
props: h,
|
|
14
14
|
setup(w) {
|
|
15
|
-
const s = $(),
|
|
16
|
-
a && (e.value = a.separator,
|
|
15
|
+
const s = $(), u = E("button").b(), a = g(P, void 0), e = l(""), i = l(""), m = l("");
|
|
16
|
+
a && (e.value = a.separator, i.value = a.separatorColor, m.value = a.separatorSize);
|
|
17
17
|
const f = z(() => ({
|
|
18
|
-
color:
|
|
18
|
+
color: i.value,
|
|
19
19
|
fontSize: `${m.value}px`
|
|
20
20
|
}));
|
|
21
21
|
return (t, F) => {
|
|
22
22
|
const d = V;
|
|
23
23
|
return t.$attrs.icon && !o(s).default ? (r(), c(b, { key: 0 }, [
|
|
24
|
-
N(d, p(t.$attrs, { class: o(
|
|
24
|
+
N(d, p(t.$attrs, { class: o(u) }), null, 16, ["class"]),
|
|
25
25
|
o(e) ? (r(), c("div", {
|
|
26
26
|
key: 0,
|
|
27
|
-
class: "separator",
|
|
28
|
-
style:
|
|
29
|
-
},
|
|
30
|
-
], 64)) : (r(),
|
|
27
|
+
class: "ls-separator",
|
|
28
|
+
style: S(o(f))
|
|
29
|
+
}, k(o(e)), 5)) : n("", !0)
|
|
30
|
+
], 64)) : (r(), v(d, p({ key: 1 }, t.$attrs, { class: o(u) }), {
|
|
31
31
|
default: B(() => {
|
|
32
32
|
var y;
|
|
33
33
|
return [
|
|
34
|
-
!t.$attrs.icon && ((y = t.iconConfig) != null && y.name || o(s).icon) ? (r(),
|
|
34
|
+
!t.$attrs.icon && ((y = t.iconConfig) != null && y.name || o(s).icon) ? (r(), v(L, p({
|
|
35
35
|
key: 0,
|
|
36
36
|
class: [o(s).default ? "" : "only-icon"]
|
|
37
37
|
}, t.iconConfig), {
|
|
@@ -41,11 +41,11 @@ const j = _({
|
|
|
41
41
|
_: 3
|
|
42
42
|
}, 16, ["class"])) : n("", !0),
|
|
43
43
|
o(s).default ? C(t.$slots, "default", { key: 1 }, void 0, !0) : n("", !0),
|
|
44
|
-
o(e) ? (r(), c("
|
|
44
|
+
o(e) ? (r(), c("span", {
|
|
45
45
|
key: 2,
|
|
46
|
-
class: "separator",
|
|
47
|
-
style:
|
|
48
|
-
},
|
|
46
|
+
class: "ls-separator",
|
|
47
|
+
style: S(o(f))
|
|
48
|
+
}, k(o(e)), 5)) : n("", !0)
|
|
49
49
|
];
|
|
50
50
|
}),
|
|
51
51
|
_: 3
|
|
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 */u=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 */u=t.default(e.default,[["__scopeId","data-v-881c9d4b"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-881c9d4b"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* 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 */;/* empty css */const t=,/* empty css */r=t.default(e.default,[["__scopeId","data-v-2f60537b"]]);exports.default=r;
|
|
@@ -2,7 +2,7 @@ import o from "./index2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
5
|
-
const
|
|
5
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2f60537b"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
f as default
|
|
8
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var V=Object.defineProperty;var s=(i,c)=>V(i,"name",{value:c,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),f=require("@wangeditor/editor-for-vue"),_=require("../../_hooks/useNamespace/index.cjs"),p=require("../types/index.cjs"),A=require("../../_utils/utils/index.cjs"),h=require("../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.cjs"),M=t.defineComponent({name:"LSEditor"}),P=t.defineComponent({...M,props:p.lsEditorProps,emits:p.lsEditorEmits,setup(i,{expose:c,emit:g}){const v=_.useNamespace("editor").b(),r=i,a=g,l=t.shallowRef(),m=t.ref();function y(e,n){let o=(e||2)*1024*1024;if(!e)return o;switch(n){case"GB":o=e*1024*1024;break;case"KB":o=e*1024;break}return o}s(y,"getMaxFileSize");const C={excludeKeys:["group-video"]},E={placeholder:"请输入内容...",maxLength:2e4,MENU_CONF:{uploadImage:{server:r.uploadServer,fieldName:r.uploadFieldName,maxFileSize:y(r.uploadImgSize,r.uploadImgSizeUnit),headers:r.uploadHeaders?r.uploadHeaders:{token:r.uploadToken},customInsert(e,n){const{data:o="",alt:F="",href:L=""}=e||{};n(o,F,L)}}}},b=t.computed(()=>({height:(r==null?void 0:r.height)||"300px"})),u=t.ref("");t.watch(()=>r.valueHtml,e=>{u.value=e},{immediate:!0,deep:!0}),t.onBeforeUnmount(()=>{const e=l.value;e!=null&&e.destroy()});const S=s(e=>{l.value=e,w(),a("handleCreated",e)},"handleCreated"),k=s(e=>{a("handleChange",e)},"handleChange"),q=s(e=>{a("handleDestroyed",e)},"handleDestroyed"),B=s(e=>{a("handleFocus",e)},"handleFocus"),D=s(e=>{a("handleBlur",e)},"handleBlur"),N=s((e,n)=>{a("customAlert",e,n)},"customAlert"),O=s((e,n,o)=>{a("customPaste",e,n,o)},"customPaste");async function w(){await t.nextTick(),(m.value.querySelectorAll('button[data-menu-key="group-image"]')||[]).forEach(o=>{o.removeEventListener("mouseenter",d),o.addEventListener("mouseenter",()=>{d(o)})}),(m.value.querySelectorAll('button[data-menu-key="group-video"]')||[]).forEach(o=>{o.removeEventListener("mouseenter",d),o.addEventListener("mouseenter",()=>{d(o)})})}s(w,"listenerDoms");function d(e){const n=e.parentNode.querySelector(".w-e-bar-item-menus-container");switch(A.elementOutOfBounds(n,r.containerDom)){case"left":n.style.left=0,n.style.right="inherit";break;case"right":n.style.left="inherit",n.style.right=0;break}}return s(d,"updateStyle"),c({editorRef:l}),(e,n)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"lsEditorRef",ref:m,class:t.normalizeClass(t.unref(v))},[t.createVNode(t.unref(f.Toolbar),{class:"tool-bar-wrap",editor:t.unref(l),"default-config":t.unref(h.default)(C,e.toolbarConfig),mode:e.mode},null,8,["editor","default-config","mode"]),t.createVNode(t.unref(f.Editor),{class:"editor-wrap",modelValue:t.unref(u),"onUpdate:modelValue":n[0]||(n[0]=o=>t.isRef(u)?u.value=o:null),"default-config":t.unref(h.default)(E,e.editorConfig),style:t.normalizeStyle(t.unref(b)),mode:e.mode,onOnCreated:S,onOnChange:k,onOnDestroyed:q,onOnFocus:B,onOnBlur:D,onCustomAlert:N,onCustomPaste:O},null,8,["modelValue","default-config","style","mode"])],2))}});exports.default=P;
|