ss-component-new 1.1.556 → 1.1.558
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/dist/{index-DsIoySp6.cjs → index-92lrvtCq.cjs} +1 -1
- package/dist/{index-DOcT5e2z.js → index-BIU8F_lv.js} +1 -1
- package/dist/{index-B4sdpTyS.cjs → index-BO49NGmM.cjs} +1 -1
- package/dist/{index-CQUG7LOj.cjs → index-BbnsvXor.cjs} +1 -1
- package/dist/{index-DdBP0Wqm.cjs → index-BgsIvjZs.cjs} +1 -1
- package/dist/{index-DdvfxWm4.cjs → index-BiYXNbxz.cjs} +1 -1
- package/dist/{index-PZTeRkmZ.cjs → index-BnIDKn-E.cjs} +1 -1
- package/dist/{index-A9vxRWRJ.js → index-BsmHBc_b.js} +1 -1
- package/dist/{index-Dh_dKOHK.cjs → index-C8lvwUGH.cjs} +1 -1
- package/dist/{index-VTSBaqt5.js → index-CEozCuqq.js} +1 -1
- package/dist/{index-C0fQaxj0.js → index-CHzbAFHz.js} +4 -4
- package/dist/{index-B0zewoKU.js → index-CPPiMY3k.js} +1 -1
- package/dist/{index-BbArPHI_.js → index-CPh7ZB9f.js} +1 -1
- package/dist/{index-Dh1bXLMt.cjs → index-CS3RKKTv.cjs} +1 -1
- package/dist/{index-CQ4Fra8B.cjs → index-CYNZRT15.cjs} +1 -1
- package/dist/{index-DgovG-d1.cjs → index-C_vLcz0g.cjs} +1 -1
- package/dist/{index-BGxaEDzd.cjs → index-Cml5uaBQ.cjs} +1 -1
- package/dist/{index-DtFsiCW3.cjs → index-Cuafh-04.cjs} +1 -1
- package/dist/{index-BBU7IP4E.js → index-DGIbBmVa.js} +1 -1
- package/dist/{index-BjpzOnQV.js → index-DMZxvCGk.js} +7 -7
- package/dist/{index-BRSajVMs.js → index-DbmXxfO0.js} +3 -3
- package/dist/{index-F0D-IvSv.js → index-DshHBOc5.js} +1 -1
- package/dist/{index-Cc936HCy.cjs → index-FA2ow6cB.cjs} +1 -1
- package/dist/{index-DKfJ4aOY.js → index-GLHkRMlJ.js} +1 -1
- package/dist/{index-B0KEc4se.js → index-UXtB764H.js} +2 -2
- package/dist/{index-DN3mTV37.js → index-wstOezI5.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_c4f9c92c_lang-CyuSo2v_.cjs → index.vue_vue_type_style_index_0_scoped_c4f9c92c_lang-DHcHo28F.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_c4f9c92c_lang-BMrXZat4.js → index.vue_vue_type_style_index_0_scoped_c4f9c92c_lang-m9AMmeTh.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_0_scoped_d888ede3_lang-Bst45l6S.js → index.vue_vue_type_style_index_0_scoped_d888ede3_lang-BMaKmHr1.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_d888ede3_lang-SrVKwnka.cjs → index.vue_vue_type_style_index_0_scoped_d888ede3_lang-CIt4c9qX.cjs} +1 -1
- package/dist/{main-v-FR4zPs.cjs → main-rYwYgFK0.cjs} +1 -1
- package/dist/{main-DqytzL3P.js → main-yU_BLySG.js} +2 -2
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +4 -4
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +7 -7
- package/dist/{threeModel-CmuTBluh.cjs → threeModel-2iOlcABI.cjs} +1 -1
- package/dist/{threeModel-WrnyyU3X.js → threeModel-By71d8H9.js} +66 -68
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as Ug, s as Gg, d as Xg, e as Jg, f as Zg, g as Qg } from "./index.vue_vue_type_style_index_0_scoped_d888ede3_lang-
|
|
1
|
+
import { a as Ug, s as Gg, d as Xg, e as Jg, f as Zg, g as Qg } from "./index.vue_vue_type_style_index_0_scoped_d888ede3_lang-BMaKmHr1.js";
|
|
2
2
|
import { defineComponent as q, shallowRef as Bt, ref as P, computed as E, watch as fe, onMounted as et, watchEffect as Sn, createElementBlock as V, openBlock as _, normalizeStyle as Re, normalizeClass as M, unref as o, createElementVNode as K, renderSlot as Q, nextTick as De, useSlots as an, toRef as Et, createBlock as ce, Transition as yn, withCtx as J, withDirectives as Ue, createCommentVNode as oe, resolveDynamicComponent as st, createTextVNode as ut, toDisplayString as ge, Fragment as Ve, createVNode as Y, vShow as bt, inject as _e, onBeforeUnmount as At, withModifiers as Fe, provide as it, reactive as kt, onActivated as Ou, onUpdated as Na, cloneVNode as ey, Text as ty, Comment as Bl, mergeProps as nt, getCurrentInstance as ct, Teleport as ny, onBeforeMount as Mu, readonly as up, onDeactivated as ay, useAttrs as qa, withKeys as _t, createSlots as Dn, renderList as at, normalizeProps as Bn, guardReactiveProps as ka, isVNode as on, onUnmounted as ml, toRaw as Qs, isRef as On, vModelCheckbox as er, toRefs as en, vModelRadio as cp, h as Ae, resolveComponent as lt, onBeforeUpdate as ly, vModelText as Tr, toHandlers as oy, TransitionGroup as dp, markRaw as Co, effectScope as sy, resolveDirective as Nr, toHandlerKey as ry, render as tr, createApp as fp, defineProps as iy } from "vue";
|
|
3
3
|
import { i as uy, h as Ka, j as Ir, k as cy, m as pp, n as vp, o as dy, q as fy, r as Io, t as hp, S as mp, v as gp, w as yp, x as Ru, y as Yt, z as bp, A as py, B as vy, C as wp, D as Cp, F as hy, G as my, H as gy, I as yy, J as by, K as Qc, L as wy, M as Cy, N as kp, O as Sp, P as ky, Q as ni, R as Sy, T as Nt, U as xe, V as he, W as ee, _ as me, X as pe, Y as Ey, Z as ed, $ as qt, a0 as Lt, a1 as jt, a2 as qe, a3 as $y, a4 as vt, a5 as _r, a6 as nr, a7 as Dt, a8 as Me, a9 as Ty, aa as zt, ab as gt, ac as $t, ad as pn, ae as Go, af as ca, ag as mn, ah as Ni, ai as Xo, aj as Te, ak as Ia, al as rt, am as Ne, an as Ny, ao as Ii, ap as Pu, aq as je, ar as lo, as as Mt, at as Ua, au as Ep, av as Iy, aw as pt, ax as Vt, ay as Vn, az as Fl, aA as Sa, aB as gn, aC as tn, aD as Mn, aE as Jo, aF as _y, c as Oe, aG as va, aH as Zo, aI as Or, aJ as _o, aK as gl, aL as ga, aM as Oy, aN as Wt, aO as qn, aP as My, aQ as $p, aR as Ry, aS as Qa, aT as Mr, aU as Wn, aV as Ha, aW as Wa, aX as Tp, aY as Np, aZ as Py, a_ as zl, a$ as Dy, b0 as ko, b1 as Ay, b2 as xy, b3 as Ly, b4 as Ip, b5 as Vy, b6 as By, b7 as Fy, b8 as _p, b9 as zy, ba as Du, bb as Zn, bc as En, bd as Ky, be as Hy, bf as _i, bg as Oi, bh as Op, bi as td, bj as Wy, bk as jy, bl as Yy, bm as Mp, bn as Rp, bo as ps, bp as qy, bq as nd, br as Uy, bs as Gy, bt as Xy, bu as Jy, bv as Zy, bw as Qy, bx as eb, by as tb, e as nb, bz as Pp, bA as ab, bB as lb, bC as ob, bD as Dp, bE as sb, bF as rb, bG as ib, bH as ub, bI as Ap, bJ as cb, bK as db, E as Ba, g as _n, u as Rr, f as fb, bL as Oo, bM as Mo, bN as pb, bO as Au, bP as xp, p as Qo, s as Kl } from "./menu-DV47UKJo.js";
|
|
4
4
|
import { useRouter as vb } from "vue-router";
|
|
5
5
|
import { g as hb, u as Lp, d as mb } from "./crypto-8Ga3ud_Q.js";
|
|
6
6
|
import { c as gb, a as yb, g as bb } from "./index-ffDSB4Kw.js";
|
|
7
|
-
import { c as Vp, s as Bp, S as wb, d as Cb, i as Qt, t as Fp, e as La, f as ad, b as Mi, h as ld, j as kb, g as Ro, u as Sb, k as Eb, m as $b, n as Tb, o as Nb, I as xu } from "./index-
|
|
7
|
+
import { c as Vp, s as Bp, S as wb, d as Cb, i as Qt, t as Fp, e as La, f as ad, b as Mi, h as ld, j as kb, g as Ro, u as Sb, k as Eb, m as $b, n as Tb, o as Nb, I as xu } from "./index-DbmXxfO0.js";
|
|
8
8
|
import { _ as Ib } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
9
|
import { s as _b, o as Ob, i as zp, h as Mb, b as Lu, f as Rb, C as tt, g as Vu, u as dn, a as od, c as ja, d as es, e as Kp, t as Pb, j as $n, I as Zt, U as We, k as Pr, l as xn, m as kn, n as Hp, p as sn, q as oo, r as Tn, v as Gt, w as na, x as Fa, y as ia, z as Db, A as Bu, B as Ts, D as Wp, F as Dr, T as mo, G as yl, H as Ab, J as xb, K as jp, L as Lb, M as Yp, N as qp, O as Vb, P as Ar, Q as Ns, R as sd, S as Hl, V as Up, W as dl, X as Aa, Y as rd, Z as Bb, _ as Fb, $ as zb, a0 as Kb, a1 as id, a2 as Hb, a3 as ud, a4 as Gp, E as Wb } from "./index-8i6baSTn.js";
|
|
10
10
|
import { d as Ye, g as Ga, c as vs, J as jb } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BPJ7Cu30.js";
|
|
@@ -12,11 +12,11 @@ import { u as Yb, a as qb, g as Ri, b as Ub } from "./index.vue_vue_type_script_
|
|
|
12
12
|
import { u as Gb, e as cd } from "./index-z1F5TOoY.js";
|
|
13
13
|
import "./index-CDBkv_Ya.js";
|
|
14
14
|
import "./index-BQw5HyPd.js";
|
|
15
|
-
import { t as Xb } from "./index-
|
|
15
|
+
import { t as Xb } from "./index-DGIbBmVa.js";
|
|
16
16
|
import { t as Jb } from "./index-B3MmxsIn.js";
|
|
17
17
|
import { u as Xp } from "./modelComp-B4I2gbtf.js";
|
|
18
18
|
import { c as Zb } from "./menuIndex-M4MLExuN.js";
|
|
19
|
-
import { g as Qb, a as e0, b as t0 } from "./index-
|
|
19
|
+
import { g as Qb, a as e0, b as t0 } from "./index-CPh7ZB9f.js";
|
|
20
20
|
import "./index-hhguTasx.js";
|
|
21
21
|
import { c as n0, m as a0, g as l0, b as o0, p as s0 } from "./array-CLz11m07.js";
|
|
22
22
|
var r0 = /\s/;
|
|
@@ -3,7 +3,7 @@ import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BPJ7Cu30.js";
|
|
|
3
3
|
import { bQ as ie, u as me, p as ce, s as ve, g as pe } from "./menu-DV47UKJo.js";
|
|
4
4
|
import { s as ge } from "./index-ffDSB4Kw.js";
|
|
5
5
|
import { useRouter as he } from "vue-router";
|
|
6
|
-
import { g as fe } from "./index-
|
|
6
|
+
import { g as fe } from "./index-CPh7ZB9f.js";
|
|
7
7
|
import { u as be } from "./modelComp-B4I2gbtf.js";
|
|
8
8
|
import { f as Fe } from "./menuIndex-M4MLExuN.js";
|
|
9
9
|
import { E as Ce } from "./index-8i6baSTn.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("vue");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CK9PyDrN.cjs");const S=require("./menu-B-wiVQl5.cjs"),te=require("./index-CxnxDX6H.cjs"),ae=require("vue-router"),re=require("./index-
|
|
1
|
+
"use strict";const t=require("vue");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CK9PyDrN.cjs");const S=require("./menu-B-wiVQl5.cjs"),te=require("./index-CxnxDX6H.cjs"),ae=require("vue-router"),re=require("./index-BnIDKn-E.cjs"),ue=require("./modelComp-BlAKXNIt.cjs"),le=require("./menuIndex-mY8CjeHW.cjs"),oe=require("./index-CGCXj04X.cjs"),k=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CxnxDX6H.cjs")).then(v=>v.index));k.install=v=>{v.component("ssMenu",k)};const q={__name:"index",props:{name:String},setup(v){const i=v,z=t.computed(()=>S.ElIcons[i.name]);return t.onMounted(()=>{}),(y,p)=>{const E=t.resolveComponent("el-icon");return t.openBlock(),t.createBlock(E,null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(z.value)))]),_:1})}}},R=[{name:"--vertical-menu-bg",value:"transparent"},{name:"--vertical-submenu-hover-bg",value:"#3356E8"},{name:"--vertical-submenu-open-bg",value:"#3356E8"},{name:"--vertical-submenu-open-inline-bg",value:"#F6F6F6"},{name:"--vertical-submenu-menuitem-color",value:"#051E37"},{name:"--vertical-submenu-menuitem-active-color",value:"#3356E8"},{name:"--vertical-submenu-color",value:"#051E37"},{name:"--vertical-submenu-active-color",value:"#ffffff"},{name:"--vertical-menuitem-hover-bg",value:"#3356E8"},{name:"--vertical-menuitem-active-bg",value:"#3356E8"},{name:"--vertical-menuitem-color",value:"#051E37"},{name:"--vertical-menuitem-active-color",value:"#ffffff"},{name:"--vertical-menuitem-fontSize",value:"1rem"},{name:"--vertical-menuitem-fontWeight",value:"400"},{name:"--vertical-menuitem-active-fontWeight",value:"600"},{name:"--vertical-menuitem-font",value:"SourceHanSansCN, SourceHanSansCN"},{name:"--vertical-menuitem-radius",value:"8px"},{name:"--vertical-menu-padding",value:"0.5rem"}],se=[{name:"--horizontal-menu-bg",value:"#051E37"},{name:"--horizontal-submenu-hover-bg",value:"#3356E8"},{name:"--horizontal-submenu-open-bg",value:"#3356E8"},{name:"--horizontal-submenu-open-inline-bg",value:"#3356E8"},{name:"--horizontal-menuitem-hover-bg",value:"#3356E8"},{name:"--horizontal-menuitem-active-bg",value:"#3356E8"},{name:"--horizontal-menuitem-color",value:"#FFFFFF"},{name:"--horizontal-menuitem-active-color",value:"#FFFFFF"},{name:"--horizontal-menuitem-fontSize",value:"1.25rem"},{name:"--horizontal-menuitem-fontWeight",value:"400"},{name:"--horizontal-menuitem-active-fontWeight",value:"600"},{name:"--horizontal-menuitem-font",value:"SourceHanSansSC, SourceHanSansSC"}],W=[{name:"--vertical-menu-bg",value:"transparent"},{name:"--vertical-submenu-hover-bg",value:"#72B02D"},{name:"--vertical-submenu-active-color",value:"#323333"},{name:"--vertical-submenu-open-bg",value:"#72B02D"},{name:"--vertical-submenu-open-inline-bg",value:"#F6F6F6"},{name:"--vertical-submenu-color",value:"#323333"},{name:"--vertical-submenu-menuitem-color",value:"#323333"},{name:"--vertical-submenu-menuitem-active-color",value:"#72B02D"},{name:"--vertical-menuitem-hover-bg",value:"#72B02D"},{name:"--vertical-menuitem-active-bg",value:"#72B02D"},{name:"--vertical-menuitem-color",value:"#323333"},{name:"--vertical-menuitem-active-color",value:"#323333"},{name:"--vertical-menuitem-fontSize",value:"1rem"},{name:"--vertical-menuitem-fontWeight",value:"400"},{name:"--vertical-menuitem-active-fontWeight",value:"600"},{name:"--vertical-menuitem-font",value:"SourceHanSansSC, SourceHanSansSC"},{name:"--vertical-menuitem-radius",value:"8px"},{name:"--vertical-menu-padding",value:"0"}],N=[{name:"--horizontal-menu-bg",value:"#323333"},{name:"--horizontal-submenu-hover-bg",value:"#FFFFFF"},{name:"--horizontal-submenu-open-bg",value:"#72B02D"},{name:"--horizontal-submenu-open-inline-bg",value:"#1C4275"},{name:"--horizontal-menuitem-hover-bg",value:"#72B02D"},{name:"--horizontal-menuitem-active-bg",value:"#72B02D"},{name:"--horizontal-menuitem-color",value:"#FFFFFF"},{name:"--horizontal-menuitem-active-color",value:"#323333"},{name:"--horizontal-menuitem-fontSize",value:"1.25rem"},{name:"--horizontal-menuitem-fontWeight",value:"400"},{name:"--horizontal-menuitem-active-fontWeight",value:"600"},{name:"--horizontal-menuitem-font",value:"SourceHanSansSC, SourceHanSansSC"}],ie=[{name:"--ssbutton-theme-color",value:"#FFFFFF"},{name:"--ssbutton-theme-bg",value:"#3356E8"},{name:"--ssbutton-special-bg",value:"rgba(255,255,255,0.2)"},{name:"--ssgroup-background",value:"linear-gradient(to right, #D6DDFA, #ffffff)"},{name:"--ssComponent-theme-color",value:"#3356E8"},{name:"--ssComponent-theme-watermark",value:"url('/public/icons/img/watermark-blue.png')"}],me=[{name:"--ssbutton-theme-color",value:"#323333"},{name:"--ssbutton-theme-bg",value:"#72B02D"},{name:"--ssbutton-special-bg",value:"rgba(255, 255, 255, 0.2)"},{name:"--ssgroup-background",value:"linear-gradient(to right, #ddf6e0, #ffffff)"},{name:"--ssComponent-theme-color",value:"#72B02D"},{name:"--ssComponent-theme-watermark",value:"url('/public/icons/img/watermark.png')"}],ce=t.defineComponent({name:"menu",components:{ssMenu:k,DynamicIcon:q,ssDialog:te.ssDialog},setup(){const v=t.defineProps({mode:{type:String,default:"vertical"}}),i=S.useMenuState(),z=ue.useModelComp(S.pinia),y=t.ref(0),p=ae.useRouter(),{asideMenus:E,menuTriggerType:O,platform:V}=S.storeToRefs(i),U=t.computed(()=>v==null?void 0:v.mode),A=t.computed(()=>{let e=[...E.value];if((e==null?void 0:e.length)===0)return p.push("/"),[];const n=G(e,L.value);return n.isFlag||(e=n==null?void 0:n.data),e}),$=e=>{z.setRouteToChildPath(""),i.setMenuTriggerType("click"),i.setActiveMenuPath(e==null?void 0:e.path),i.setActiveAsideMenu(e),e.isRouter?p.push(e.path):p.push("/")},J=async e=>{i.setActiveMenuPath(e);const n=le.findNodeByPropInTree(A.value,"path",e);i.setActiveAsideMenu(n),z.setRouteToChildPath(""),O.value==="click"?y.value===1?i.setActiveMenuPath(sessionStorage.getItem("pageKey")):i.setActiveMenuPath(e):i.setMenuTriggerType("click"),e!=null&&e.startsWith("/")?p.push(e):p.push("/"),y.value++},K=e=>{i.setActiveMenuPath(e)},D=e=>{const n=document.documentElement;e==null||e.forEach(l=>{n.style.setProperty(l.name,l.value)})};t.onMounted(()=>{y.value=1});const L=t.computed(()=>{const e=sessionStorage.getItem("authority");return e?JSON.parse(e):[]});t.watch(()=>V.value,e=>{e==="browser"?D(R):e==="client"&&(D(N),D(W))},{immediate:!0});const j=(e,n)=>{function l(o){o==null||o.forEach(a=>{var h,C;const s=(h=a==null?void 0:a.path)!=null&&h.startsWith("/")?(C=a==null?void 0:a.path)==null?void 0:C.substring(1):a==null?void 0:a.path;a.show=n==null?void 0:n.some(f=>f==null?void 0:f.includes(s)),a.children&&l(a.children)})}return l(e),e},G=(e,n)=>{if(Array.isArray(n)){const l=Array.from(new Set(n==null?void 0:n.map(o=>o.substring(0,o.lastIndexOf("/")))));return{data:j(e,l),isFlag:!1}}else return{isFlag:(n==null?void 0:n.toUpperCase())==="SUPERADMIN"}},c=t.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Q=e=>re.getComponent(e),X=t.ref({}),T=t.ref([]),Y=async(e,n,l)=>{var C,f,x;if(!(e!=null&&e.structureIds)||((C=e==null?void 0:e.structureIds)==null?void 0:C.length)===0)return;const o=(x=(f=e==null?void 0:e.structureIds)==null?void 0:f.filter(r=>(r==null?void 0:r.key)==="dialogConfig"))==null?void 0:x.map(r=>r==null?void 0:r.id);let a=o==null?void 0:o.map(r=>S.getInsofDataApi({id:r}));const s=await Promise.all(a);if(s==null?void 0:s.every(r=>{var u;return((u=r==null?void 0:r.data)==null?void 0:u.code)===200})){const r=s==null?void 0:s.map(u=>{var F,M,m,d,w,P,H;return{id:(m=(M=(F=u==null?void 0:u.data)==null?void 0:F.result)==null?void 0:M[0])==null?void 0:m.id,...(H=(P=(w=(d=u==null?void 0:u.data)==null?void 0:d.result)==null?void 0:w[0])==null?void 0:P.value)==null?void 0:H.pageData}});n==="create"&&(T.value=r),n==="update"&&(T.value=r==null?void 0:r.map(u=>{var F,M;return((F=u==null?void 0:u.comp)==null?void 0:F.toUpperCase())==="FORM"?{...u,compData:(M=u==null?void 0:u.compData)==null?void 0:M.map(m=>{var d;return(m==null?void 0:m.key)==="formContent"?{...m,contents:(d=m==null?void 0:m.contents)==null?void 0:d.map(w=>({...w,value:l==null?void 0:l.title}))}:m})}:u}))}},b=t.ref({}),g=t.ref({}),Z=e=>{switch(e){case"新增":return"create";case"编辑":return"update";case"删除":return"delete"}},B=t.ref({}),_=e=>{i.setCacheInputMenu({type:c.type,data:e}),i.setIsRefreshMenus(!0)},I=async(e,n)=>{c.type=Z(n==null?void 0:n.operateType),await Y(n,c.type,e),g.value=e,B.value=n,console.log(4542,e),(n==null?void 0:n.operateType)!=="删除"?(c.show=(n==null?void 0:n.trigger)==="openDialog",c.title=(n==null?void 0:n.operateType)+"菜单"):oe.ElMessageBox.confirm(`是否确认要删除【${e==null?void 0:e.title}】`,"",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{_(e)})},ee=()=>{c.show=!1},ne=e=>e==null?void 0:e.filter(n=>n.allowInherit);return{handleCompChange:e=>{var l,o;const n=(l=e==null?void 0:e.contents)==null?void 0:l.find(a=>a.key==="formContent");n&&(b.value=(o=n==null?void 0:n.contents)==null?void 0:o.reduce((a,s)=>(a[s.key]=s.value,a.prop=s.key,a),{}))},dialogForm:X,dialogRenderComps:T,getComponents:Q,clickSubmitForm:()=>{var l,o,a,s,h;let e;c.type==="create"&&(e=((l=g.value)==null?void 0:l.path)+"/"+b.value[(o=b.value)==null?void 0:o.prop]),c.type==="update"&&(e=(a=g.value)==null?void 0:a.path);const n={...g.value,config:ne((s=g.value)==null?void 0:s.config),children:[],childMenus:[],title:b.value[(h=b.value)==null?void 0:h.prop],path:e};console.log("clickSubmitForm",B.value,g.value,n),_(n),c.show=!1},dialogInfo:c,beforeDialogDestroy:ee,clickMenuIcon:I,mode:U,renderMenuList:A,clickMenu:$,openMenu:J,closeMenu:K,changeMenuStyle:D}}});exports._sfc_main=ce;exports._sfc_main$1=q;exports.browserHorizontalMenuClasses=se;exports.browserThemeConfig=ie;exports.browserVerticalMenuClasses=R;exports.clientHorizontalMenuClasses=N;exports.clientThemeConfig=me;exports.clientVerticalMenuClasses=W;exports.ssMenu=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),O=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),O=require("./index-Cml5uaBQ.cjs"),u=require("./menu-B-wiVQl5.cjs"),G=require("./modelComp-BlAKXNIt.cjs"),Z=require("./index-BnIDKn-E.cjs"),K=require("./array-CP2rPazD.cjs"),Q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),V=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"}],s=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"LineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"}],v={key:0,class:"show-content"},ee={class:"item-view-group"},te={__name:"index",props:{content:String,jsonContents:Array},emits:["change"],setup(j,{emit:E}){const t=j,S=E,h=G.useModelComp(u.pinia),{itemData:p}=u.storeToRefs(h),_=e.ref([]),C=e.ref([]),T=c=>{S("change",{wholeValue:_.value,editValue:c})},x=c=>{const g=u.cloneDeep(_.value),b=g==null?void 0:g.map((d,B)=>(B===(c==null?void 0:c.index)&&(d.compData=c==null?void 0:c.contents),d));_.value=b};e.watch(()=>p.value,()=>{var c;!p.value||((c=p.value)==null?void 0:c.length)===0||(C.value=p.value,_.value=p.value)},{deep:!0,immediate:!0}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{var g;if(((g=t==null?void 0:t.jsonContents)==null?void 0:g.length)>0){h.setOriginalData(t==null?void 0:t.jsonContents),h.setItemData(t==null?void 0:t.jsonContents);return}if(!(t!=null&&t.content)||(t==null?void 0:t.content)==="")return;const c=K.expandStringToJson(t==null?void 0:t.content);h.setOriginalData(c),h.setItemData(c)},{deep:!0,immediate:!0});const N=c=>Z.getComponent(c);return(c,g)=>{var b;return((b=C.value)==null?void 0:b.length)>0?(e.openBlock(),e.createElementBlock("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(d,B)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:B},[e.createElementVNode("div",ee,e.toDisplayString(d.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N(d.comp)),{itemData:d==null?void 0:d.compData,childItemData:d==null?void 0:d.itemChildData,key:B,onChange:T,index:B,onContentChange:x},null,40,["itemData","childItemData","index"]))]))),128))])):e.createCommentVNode("",!0)}}},ne=Q._export_sfc(te,[["__scopeId","data-v-1c04adc8"]]),oe={class:"add-model-content"},ae={key:0,class:"model-import-data"},le={class:"import-button"},re={key:0},ce={key:1,class:"model-operate"},se={class:"model-select"},ue={class:"model-fill"},ie={key:2,class:"model-view ssComponent"},de={__name:"main",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change"],setup(j,{emit:E}){const t=j,S=E,h=e.ref(""),p=e.ref([]),_=e.ref(0),C=G.useModelComp(u.pinia);u.useMenuState(u.pinia);const{itemData:T,originalData:x}=u.storeToRefs(C),N=e.ref(null),c=e.ref(0),g=e.ref(""),b=()=>{_.value=window.innerWidth},d=async l=>{var i;const a=(i=u.cloneDeep(l==null?void 0:l.wholeValue))==null?void 0:i.map(o=>{var f;return(o==null?void 0:o.comp)==="Form"&&(o.compData=(f=o.compData)==null?void 0:f.map(k=>((k==null?void 0:k.key)==="formContent"&&(k.contents=K.arrayToNumberArray(k==null?void 0:k.contents)),k))),o});S("change",{originalContents:x.value,currentContents:l==null?void 0:l.wholeValue,editContent:l==null?void 0:l.editValue,stringContent:B(u.cloneDeep(l==null?void 0:l.wholeValue)),arrayToContents:a})},B=l=>{var i;let a=[];return(i=u.cloneDeep(l))==null||i.forEach(o=>{var f,k;V!=null&&V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp))&&a.push(((f=V==null?void 0:V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp)))==null?void 0:f.key)+"="+o.name+"/r/n"),(k=o==null?void 0:o.compData)==null||k.forEach(n=>{var I,F,$,J,A,q,M,R,L,z,W,H;if(s!=null&&s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))if(!((I=n==null?void 0:n.contents)!=null&&I.length))a.push(((F=s==null?void 0:s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))==null?void 0:F.key)+"="+(n.contents===!0?'""':"Vertical")+"/r/n");else{let m=($=n==null?void 0:n.contents)==null?void 0:$[0];if(!m)return;if(Object.keys(m).includes("label")&&Object.keys(m).includes("key")&&Object.keys(m).includes("width"))if(((A=(J=n.contents)==null?void 0:J.filter(y=>y.width!==1))==null?void 0:A.length)===0){const y=(q=u.cloneDeep(n==null?void 0:n.contents))==null?void 0:q.map(r=>({[r.label]:r.value}));a.push(((M=s==null?void 0:s.find(r=>(r==null?void 0:r.value)===(n==null?void 0:n.key)))==null?void 0:M.key)+"="+JSON.stringify(y)+"/r/n")}else{let y=[];(R=u.cloneDeep(n==null?void 0:n.contents))==null||R.reduce((r,D)=>{var P;return r[D.label]=D.key,((P=Object.keys(u.cloneDeep(r)))==null?void 0:P.length)>=D.width&&(y.push(u.cloneDeep(r)),r={}),r},{}),a.push(((L=s==null?void 0:s.find(r=>(r==null?void 0:r.value)===(n==null?void 0:n.key)))==null?void 0:L.key)+"="+JSON.stringify(y)+"/r/n")}else if(Object.keys(m).includes("label")){const y=(z=u.cloneDeep(n==null?void 0:n.contents))==null?void 0:z.map(r=>r.label);a.push(((W=s==null?void 0:s.find(r=>(r==null?void 0:r.value)===(n==null?void 0:n.key)))==null?void 0:W.key)+"="+JSON.stringify(y)+"/r/n")}else a.push(((H=s==null?void 0:s.find(y=>(y==null?void 0:y.value)===(n==null?void 0:n.key)))==null?void 0:H.key)+"="+JSON.stringify(n==null?void 0:n.contents)+"/r/n")}})}),JSON.stringify(a)},w=e.ref([]),U=()=>{N.value.click()},X=l=>{const a=l.target.files[0];if(!a)return;const i=new FileReader;i.onload=o=>{try{h.value=o.target.result,w.value=Y(o.target.result),c.value++}catch(f){console.error("解析失败:",f)}},i.onerror=o=>{console.error("文件读取错误:",o)},i.readAsText(a)};e.onMounted(()=>{window.addEventListener("resize",b)}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{h.value=t==null?void 0:t.content,p.value=t==null?void 0:t.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>c.value,()=>{var l;((l=w.value)==null?void 0:l.length)!==0&&(C.setOriginalData(w.value),C.setItemData(w.value))},{deep:!0,immediate:!0});const Y=l=>{let a=l.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");a=a.replace(/(\w+)\s*:/g,"$1:"),a=a.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),a=a.replace(/,\s*([}\]])/g,"$1"),a=a.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(a)}catch(i){try{const f=new Function(`return ${a}`)();if(Array.isArray(f)||typeof f=="object")return f;throw new Error(`解析结果不是有效的数组或对象: ${i}`)}catch(o){throw new Error(`无法解析JSON: ${o.message}`)}}};return(l,a)=>{var i;return e.openBlock(),e.createElementBlock("div",oe,[((i=t==null?void 0:t.jsonContents)==null?void 0:i.length)===0?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",le,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:N,accept:".txt",onChange:X,style:{display:"none"}},null,544),e.createElementVNode("button",{onClick:U,class:"import-button-content"},"导入文件"),g.value?(e.openBlock(),e.createElementBlock("span",re,e.toDisplayString(g.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",se,[e.createVNode(O.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:_.value},[e.createVNode(O.modelShow)])),e.createElementVNode("div",ue,[e.createVNode(O.modelFill)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="view"?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(ne,{content:h.value,onChange:d,jsonContents:p.value,key:_.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},me=Q._export_sfc(de,[["__scopeId","data-v-1dbc7677"]]);exports.default=me;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ref as _, watch as V, createElementBlock as C, createCommentVNode as I, openBlock as f, Fragment as le, renderList as se, createElementVNode as O, createBlock as Z, toDisplayString as v, resolveDynamicComponent as ue, onMounted as ce, createVNode as A } from "vue";
|
|
2
|
-
import { m as ie, a as me, b as de } from "./index-
|
|
2
|
+
import { m as ie, a as me, b as de } from "./index-DshHBOc5.js";
|
|
3
3
|
import { p as E, s as ee, c as k, u as ye } from "./menu-DV47UKJo.js";
|
|
4
4
|
import { u as te } from "./modelComp-B4I2gbtf.js";
|
|
5
|
-
import { g as fe } from "./index-
|
|
5
|
+
import { g as fe } from "./index-CPh7ZB9f.js";
|
|
6
6
|
import { e as ge, a as he } from "./array-CLz11m07.js";
|
|
7
7
|
import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const x = [
|
package/dist/ss-component.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),p=require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CK9PyDrN.cjs");require("./menu-B-wiVQl5.cjs");const s=require("./ss-component2.cjs"),o=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./main-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),p=require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CK9PyDrN.cjs");require("./menu-B-wiVQl5.cjs");const s=require("./ss-component2.cjs"),o=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./main-rYwYgFK0.cjs")));o.install=e=>{e.component("ssComponent",o)};const t=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CxnxDX6H.cjs")).then(e=>e.index$1));t.install=e=>{e.component("ssTab",t)};const r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-C_vLcz0g.cjs")));r.install=e=>{e.component("ssMenu",r)};const i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-92lrvtCq.cjs")));i.install=e=>{e.component("ssMenuComponent",i)};const c=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-sWPCQFjw.cjs")));c.install=e=>{e.component("ssCanvas",c)};const l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-C31XRLFj.cjs")));l.install=e=>{e.component("ssFold",l)};const m=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CqWusal7.cjs")));m.install=e=>{e.component("ssAvatar",m)};const u=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeModel-2iOlcABI.cjs")));u.install=e=>{e.component("ssThree",u)};const v=[o,t,r,i,c,l,m,u],d=e=>{v.forEach(a=>{e.use(a)}),e.use(s),e.config.globalProperties.$router=s};exports.SvgIcon=p.SvgIcon;exports.router=s;exports.default=d;
|