@lingshugroup/web-plus 1.7.1 → 1.7.2
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/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 +75 -58
- 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 +19 -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/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 +37 -35
- 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 +10 -10
- 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/dialog/Index.vue.d.ts +1 -1
- package/lib/types/components/editor/Index.vue.d.ts +9 -0
- package/lib/types/components/editor/index.d.ts +18 -0
- package/lib/types/components/editor/types.d.ts +3 -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";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-17078d0c"]]);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 i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-17078d0c"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
i as default
|
|
8
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var q=Object.defineProperty;var
|
|
1
|
+
"use strict";var q=Object.defineProperty;var l=(u,i)=>q(u,"name",{value:i,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),c=require("@wangeditor/editor-for-vue"),w=require("../../_hooks/useNamespace/index.cjs"),m=require("../types/index.cjs"),f=require("../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.cjs"),M=o.defineComponent({name:"LSEditor"}),P=o.defineComponent({...M,props:m.lsEditorProps,emits:m.lsEditorEmits,setup(u,{expose:i,emit:p}){const h=w.useNamespace("editor").b(),t=u,a=p,s=o.shallowRef();function g(e,n){let r=(e||2)*1024*1024;if(!e)return r;switch(n){case"GB":r=e*1024*1024;break;case"KB":r=e*1024;break}return r}l(g,"getMaxFileSize");const C={excludeKeys:["group-video"]},v={placeholder:"请输入内容...",maxLength:2e4,MENU_CONF:{uploadImage:{server:t.uploadServer,fieldName:t.uploadFieldName,maxFileSize:g(t.uploadImgSize,t.uploadImgSizeUnit),headers:t.uploadHeaders?t.uploadHeaders:{token:t.uploadToken},customInsert(e,n){const{data:r="",alt:k="",href:V=""}=e||{};n(r,k,V)}}}},y=o.computed(()=>({height:(t==null?void 0:t.height)||"300px"})),d=o.ref("");o.watch(()=>t.valueHtml,e=>{d.value=e},{immediate:!0,deep:!0}),o.onBeforeUnmount(()=>{const e=s.value;e!=null&&e.destroy()});const S=l(e=>{s.value=e,a("handleCreated",e)},"handleCreated"),b=l(e=>{a("handleChange",e)},"handleChange"),B=l(e=>{a("handleDestroyed",e)},"handleDestroyed"),E=l(e=>{a("handleFocus",e)},"handleFocus"),F=l(e=>{a("handleBlur",e)},"handleBlur"),N=l((e,n)=>{a("customAlert",e,n)},"customAlert"),O=l((e,n,r)=>{a("customPaste",e,n,r)},"customPaste");return i({editorRef:s}),(e,n)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(h))},[o.createVNode(o.unref(c.Toolbar),{class:"tool-bar-wrap",editor:o.unref(s),"default-config":o.unref(f.default)(C,e.toolbarConfig),mode:e.mode},null,8,["editor","default-config","mode"]),o.createVNode(o.unref(c.Editor),{class:"editor-wrap",modelValue:o.unref(d),"onUpdate:modelValue":n[0]||(n[0]=r=>o.isRef(d)?d.value=r:null),"default-config":o.unref(f.default)(v,e.editorConfig),style:o.normalizeStyle(o.unref(y)),mode:e.mode,onOnCreated:S,onOnChange:b,onOnDestroyed:B,onOnFocus:E,onOnBlur:F,onCustomAlert:N,onCustomPaste:O},null,8,["modelValue","default-config","style","mode"])],2))}});exports.default=P;
|
|
@@ -1,95 +1,112 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { defineComponent as f, shallowRef as
|
|
4
|
-
import { Toolbar as
|
|
5
|
-
import { useNamespace as
|
|
6
|
-
import { lsEditorProps as
|
|
1
|
+
var x = Object.defineProperty;
|
|
2
|
+
var l = (u, m) => x(u, "name", { value: m, configurable: !0 });
|
|
3
|
+
import { defineComponent as f, shallowRef as I, computed as P, ref as U, watch as V, onBeforeUnmount as z, openBlock as A, createElementBlock as D, normalizeClass as H, unref as a, createVNode as i, isRef as M, normalizeStyle as R } from "vue";
|
|
4
|
+
import { Toolbar as T, Editor as _ } from "@wangeditor/editor-for-vue";
|
|
5
|
+
import { useNamespace as K } from "../../_hooks/useNamespace/index.js";
|
|
6
|
+
import { lsEditorProps as L, lsEditorEmits as G } from "../types/index.js";
|
|
7
7
|
import c from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
|
|
8
8
|
const j = f({
|
|
9
9
|
name: "LSEditor"
|
|
10
|
-
}),
|
|
10
|
+
}), $ = /* @__PURE__ */ f({
|
|
11
11
|
...j,
|
|
12
|
-
props:
|
|
13
|
-
emits:
|
|
12
|
+
props: L,
|
|
13
|
+
emits: G,
|
|
14
14
|
setup(u, { expose: m, emit: p }) {
|
|
15
|
-
const h =
|
|
15
|
+
const h = K("editor").b(), o = u, r = p, d = I();
|
|
16
|
+
function g(e, t) {
|
|
17
|
+
let n = (e || 2) * 1024 * 1024;
|
|
18
|
+
if (!e)
|
|
19
|
+
return n;
|
|
20
|
+
switch (t) {
|
|
21
|
+
case "GB":
|
|
22
|
+
n = e * 1024 * 1024;
|
|
23
|
+
break;
|
|
24
|
+
case "KB":
|
|
25
|
+
n = e * 1024;
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
return n;
|
|
29
|
+
}
|
|
30
|
+
l(g, "getMaxFileSize");
|
|
31
|
+
const C = {
|
|
16
32
|
excludeKeys: ["group-video"]
|
|
17
|
-
},
|
|
33
|
+
}, v = {
|
|
18
34
|
placeholder: "请输入内容...",
|
|
19
35
|
maxLength: 2e4,
|
|
20
36
|
MENU_CONF: {
|
|
21
37
|
uploadImage: {
|
|
22
|
-
server:
|
|
23
|
-
fieldName:
|
|
24
|
-
|
|
25
|
-
|
|
38
|
+
server: o.uploadServer,
|
|
39
|
+
fieldName: o.uploadFieldName,
|
|
40
|
+
maxFileSize: g(o.uploadImgSize, o.uploadImgSizeUnit),
|
|
41
|
+
headers: o.uploadHeaders ? o.uploadHeaders : {
|
|
42
|
+
token: o.uploadToken
|
|
26
43
|
},
|
|
27
|
-
customInsert(e,
|
|
28
|
-
const { data:
|
|
29
|
-
|
|
44
|
+
customInsert(e, t) {
|
|
45
|
+
const { data: n = "", alt: O = "", href: w = "" } = e || {};
|
|
46
|
+
t(n, O, w);
|
|
30
47
|
}
|
|
31
48
|
}
|
|
32
49
|
}
|
|
33
|
-
},
|
|
34
|
-
height: (
|
|
35
|
-
})),
|
|
36
|
-
|
|
37
|
-
() =>
|
|
50
|
+
}, y = P(() => ({
|
|
51
|
+
height: (o == null ? void 0 : o.height) || "300px"
|
|
52
|
+
})), s = U("");
|
|
53
|
+
V(
|
|
54
|
+
() => o.valueHtml,
|
|
38
55
|
(e) => {
|
|
39
|
-
|
|
56
|
+
s.value = e;
|
|
40
57
|
},
|
|
41
58
|
{
|
|
42
59
|
immediate: !0,
|
|
43
60
|
deep: !0
|
|
44
61
|
}
|
|
45
|
-
),
|
|
46
|
-
const e =
|
|
62
|
+
), z(() => {
|
|
63
|
+
const e = d.value;
|
|
47
64
|
e != null && e.destroy();
|
|
48
65
|
});
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
}, "handleCreated"), E = /* @__PURE__ */
|
|
52
|
-
|
|
53
|
-
}, "handleChange"),
|
|
54
|
-
|
|
55
|
-
}, "handleDestroyed"),
|
|
56
|
-
|
|
57
|
-
}, "handleFocus"),
|
|
58
|
-
|
|
59
|
-
}, "handleBlur"),
|
|
60
|
-
|
|
61
|
-
}, "customAlert"),
|
|
62
|
-
|
|
66
|
+
const B = /* @__PURE__ */ l((e) => {
|
|
67
|
+
d.value = e, r("handleCreated", e);
|
|
68
|
+
}, "handleCreated"), E = /* @__PURE__ */ l((e) => {
|
|
69
|
+
r("handleChange", e);
|
|
70
|
+
}, "handleChange"), S = /* @__PURE__ */ l((e) => {
|
|
71
|
+
r("handleDestroyed", e);
|
|
72
|
+
}, "handleDestroyed"), b = /* @__PURE__ */ l((e) => {
|
|
73
|
+
r("handleFocus", e);
|
|
74
|
+
}, "handleFocus"), F = /* @__PURE__ */ l((e) => {
|
|
75
|
+
r("handleBlur", e);
|
|
76
|
+
}, "handleBlur"), k = /* @__PURE__ */ l((e, t) => {
|
|
77
|
+
r("customAlert", e, t);
|
|
78
|
+
}, "customAlert"), N = /* @__PURE__ */ l((e, t, n) => {
|
|
79
|
+
r("customPaste", e, t, n);
|
|
63
80
|
}, "customPaste");
|
|
64
81
|
return m({
|
|
65
|
-
editorRef:
|
|
66
|
-
}), (e,
|
|
67
|
-
class:
|
|
82
|
+
editorRef: d
|
|
83
|
+
}), (e, t) => (A(), D("div", {
|
|
84
|
+
class: H(a(h))
|
|
68
85
|
}, [
|
|
69
|
-
i(
|
|
86
|
+
i(a(T), {
|
|
70
87
|
class: "tool-bar-wrap",
|
|
71
|
-
editor:
|
|
72
|
-
"default-config":
|
|
88
|
+
editor: a(d),
|
|
89
|
+
"default-config": a(c)(C, e.toolbarConfig),
|
|
73
90
|
mode: e.mode
|
|
74
91
|
}, null, 8, ["editor", "default-config", "mode"]),
|
|
75
|
-
i(
|
|
92
|
+
i(a(_), {
|
|
76
93
|
class: "editor-wrap",
|
|
77
|
-
modelValue:
|
|
78
|
-
"onUpdate:modelValue":
|
|
79
|
-
"default-config":
|
|
80
|
-
style:
|
|
94
|
+
modelValue: a(s),
|
|
95
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => M(s) ? s.value = n : null),
|
|
96
|
+
"default-config": a(c)(v, e.editorConfig),
|
|
97
|
+
style: R(a(y)),
|
|
81
98
|
mode: e.mode,
|
|
82
|
-
onOnCreated:
|
|
99
|
+
onOnCreated: B,
|
|
83
100
|
onOnChange: E,
|
|
84
|
-
onOnDestroyed:
|
|
85
|
-
onOnFocus:
|
|
86
|
-
onOnBlur:
|
|
87
|
-
onCustomAlert:
|
|
88
|
-
onCustomPaste:
|
|
101
|
+
onOnDestroyed: S,
|
|
102
|
+
onOnFocus: b,
|
|
103
|
+
onOnBlur: F,
|
|
104
|
+
onCustomAlert: k,
|
|
105
|
+
onCustomPaste: N
|
|
89
106
|
}, null, 8, ["modelValue", "default-config", "style", "mode"])
|
|
90
107
|
], 2));
|
|
91
108
|
}
|
|
92
109
|
});
|
|
93
110
|
export {
|
|
94
|
-
|
|
111
|
+
$ as default
|
|
95
112
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var d=Object.defineProperty;var e=(t,l)=>d(t,"name",{value:l,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";var d=Object.defineProperty;var e=(t,l)=>d(t,"name",{value:l,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../_utils/runtime/index.cjs"),o=a.buildProps({valueHtml:{type:String,default:""},height:{type:String,default:"300px"},mode:{type:String,default:"default"},toolbarConfig:{type:Object,default:e(()=>({}),"default")},editorConfig:{type:Object,default:e(()=>({}),"default")},uploadServer:{type:String,default:""},uploadFieldName:{type:String,default:"file"},uploadToken:{type:String,default:""},uploadHeaders:{type:Object,default:e(()=>null,"default")},uploadImgSize:{type:Number,default:2},uploadImgSizeUnit:{type:String,default:"MB"}}),r=["handleCreated","handleChange","handleDestroyed","handleFocus","handleBlur","customAlert","customPaste"];exports.lsEditorEmits=r;exports.lsEditorProps=o;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var d = Object.defineProperty;
|
|
2
2
|
var e = (t, l) => d(t, "name", { value: l, configurable: !0 });
|
|
3
3
|
import { buildProps as a } from "../../_utils/runtime/index.js";
|
|
4
|
-
const
|
|
4
|
+
const r = a({
|
|
5
5
|
valueHtml: {
|
|
6
6
|
type: String,
|
|
7
7
|
default: ""
|
|
@@ -34,8 +34,23 @@ const u = a({
|
|
|
34
34
|
uploadToken: {
|
|
35
35
|
type: String,
|
|
36
36
|
default: ""
|
|
37
|
+
},
|
|
38
|
+
// 自定义上传请求头
|
|
39
|
+
uploadHeaders: {
|
|
40
|
+
type: Object,
|
|
41
|
+
default: /* @__PURE__ */ e(() => null, "default")
|
|
42
|
+
},
|
|
43
|
+
// 上传图片大小限制, 默认5
|
|
44
|
+
uploadImgSize: {
|
|
45
|
+
type: Number,
|
|
46
|
+
default: 2
|
|
47
|
+
},
|
|
48
|
+
// 上传图片大小单位(GB,MB,KB),默认M
|
|
49
|
+
uploadImgSizeUnit: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: "MB"
|
|
37
52
|
}
|
|
38
|
-
}),
|
|
53
|
+
}), p = [
|
|
39
54
|
"handleCreated",
|
|
40
55
|
"handleChange",
|
|
41
56
|
"handleDestroyed",
|
|
@@ -45,6 +60,6 @@ const u = a({
|
|
|
45
60
|
"customPaste"
|
|
46
61
|
];
|
|
47
62
|
export {
|
|
48
|
-
|
|
49
|
-
|
|
63
|
+
p as lsEditorEmits,
|
|
64
|
+
r as lsEditorProps
|
|
50
65
|
};
|
|
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 u=,/* empty css */t=u.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 u=,/* empty css */t=u.default(e.default,[["__scopeId","data-v-86e4f2b6"]]);exports.default=t;
|
|
@@ -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 f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-86e4f2b6"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var g=Object.defineProperty;var o=(
|
|
1
|
+
"use strict";var g=Object.defineProperty;var o=(r,l)=>g(r,"name",{value:l,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */;/* empty css */const s=require("vue"),N=,/* empty css */y=,/* empty css */w=,/* empty css */B=,/* empty css */E=,/* empty css */D=s.defineComponent({name:"LSMenu"}),P=s.defineComponent({...D,props:y.lsMenuProps,emits:y.lsEmitNames,setup(r,{expose:l,emit:S}){s.useCssVars(e=>({"7ad8c66c":e.hoverColor}));const{currentRouter:c}=w.default(),h=N.useNamespace("menu").b(),k=r,a=S,q=s.useAttrs(),C=s.ref(!1),_=s.ref(""),u=s.ref();s.watch(()=>k.permissionList,e=>{k.needPermission&&e&&e.length>0&&m()},{immediate:!0,deep:!0}),s.watch(()=>c.value,()=>{m()},{immediate:!0,deep:!0}),s.watch(()=>q["default-active"],async e=>{e&&(await s.nextTick(),f(e.toString()))},{immediate:!0,deep:!0});function m(){if(!C.value)return;const{meta:e}=(c==null?void 0:c.value)||{};_.value=(e==null?void 0:e.key)||"1"}o(m,"initMenuSider");function L(e){a("onJump",e)}o(L,"onJump");function M(e){const{key:i}=e;f(i),a("defineSubClick",e)}o(M,"defineSubClickFunc");function b(e){const{key:i}=e;f(i),a("defineChildClick",e)}o(b,"defineChildClickFunc");function f(e){if(u.value){let i=!1;const d=u.value.$el.querySelectorAll(".el-sub-menu"),n=u.value.$el.querySelectorAll(".el-menu-item"),p="is-sub-active",v="is-active";n.forEach(t=>{Array.from(t.classList).includes(v)&&t.classList.remove(v),e===t.dataset.index&&(i=!0,t.classList.add(v))}),d.forEach(t=>{Array.from(t.classList).includes(p)&&t.classList.remove(p),!i&&e===t.dataset.index&&t.classList.add(p)})}}return o(f,"removeActiveClass"),s.onMounted(()=>{C.value=!0,m()}),l({lsComMenuRef:u}),(e,i)=>{const d=E.ElMenu;return s.openBlock(),s.createBlock(d,s.mergeProps({ref_key:"lsComMenuRef",ref:u},e.$attrs,{class:s.unref(h),"default-active":s.unref(_)}),{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.menuConfigList,n=>(s.openBlock(),s.createBlock(B.default,{key:n.key,item:n,"permission-list":e.permissionList,"need-permission":e.needPermission,"is-define-click":e.isDefineClick,onOnJump:L,onDefineSubClick:M,onDefineChildClick:b},{[n.iconSlot]:s.withCtx(()=>[s.renderSlot(e.$slots,n.iconSlot,{},void 0,!0)]),_:2},1032,["item","permission-list","need-permission","is-define-click"]))),128))]),_:3},16,["class","default-active"])}}});exports.default=P;
|