12345 |
- <<<<<<<< HEAD:dist/assets/MenuPreviewer-38d4f5a9.js
- import{d as D,K as S,o,c as u,f as m,w as C,g as k,Z as E,n as T,t as q,a as _,P as h,O as j,F,j as K,_ as L,__tla as Z}from"./index-d75b4e4d.js";import{V as N,__tla as B}from"./vuedraggable.umd-f2a069f3.js";let U,G=Promise.all([(()=>{try{return Z}catch{}})(),(()=>{try{return B}catch{}})()]).then(async()=>{let x,y,I,g,b,f;x={class:"menu_bottom"},y=["onClick"],I={key:0,class:"submenu"},g={class:"menu_bottom subtitle"},b=["onClick"],f=["onClick"],U=L(D({__name:"MenuPreviewer",props:{modelValue:{type:Array,required:!0},activeIndex:{type:String,required:!0},parentIndex:{type:Number,required:!0},accountId:{type:Number,required:!0}},emits:["update:modelValue","menu-clicked","submenu-clicked"],setup(P,{emit:M}){const d=P,s=M,i=S({get:()=>d.modelValue,set:n=>s("update:modelValue",n)}),O=()=>{const n=i.value.length,l={name:"\u83DC\u5355\u540D\u79F0",children:[],reply:{type:"text",accountId:d.accountId}};i.value[n]=l,V(l,n-1)},V=(n,l)=>{s("menu-clicked",n,l)},w=(n,l,a)=>{s("submenu-clicked",n,l,a)},$=({oldIndex:n,newIndex:l})=>{if(d.activeIndex==="__MENU_NOT_SELECTED__")return;let a=new Array(i.value.length).fill(!1);a[d.parentIndex]=!0;const[e]=a.splice(n,1);a.splice(l,0,e);const t=a.indexOf(!0),c=i.value[t];s("menu-clicked",c,t)},z=({newIndex:n})=>{var t;const l=d.parentIndex,a=n,e=(t=i.value[l])==null?void 0:t.children;if(e&&(e==null?void 0:e.length)>0){const c=e[a];s("submenu-clicked",c,l,a)}};return(n,l)=>{const a=K;return o(),u(F,null,[m(_(N),{modelValue:_(i),"onUpdate:modelValue":l[0]||(l[0]=e=>j(i)?i.value=e:null),"item-key":"id","ghost-class":"draggable-ghost",animation:400,onEnd:$},{item:C(({element:e,index:t})=>[k("div",x,[k("div",{onClick:c=>V(e,t),class:E(["menu_item",{active:d.activeIndex===`${t}`}])},[m(a,{icon:"ep:fold",color:"black"}),T(q(e.name),1)],10,y),d.parentIndex===t&&e.children?(o(),u("div",I,[m(_(N),{modelValue:e.children,"onUpdate:modelValue":c=>e.children=c,"item-key":"id","ghost-class":"draggable-ghost",animation:400,onEnd:z},{item:C(({element:c,index:r})=>[k("div",g,[e.children?(o(),u("div",{key:0,class:E(["menu_subItem",{active:d.activeIndex===`${t}-${r}`}]),onClick:p=>w(c,t,r)},q(c.name),11,b)):h("",!0)])]),_:2},1032,["modelValue","onUpdate:modelValue"]),!e.children||e.children.length<5?(o(),u("div",{key:0,class:"menu_bottom menu_addicon",onClick:c=>((r,p)=>{const v=p.children.length,A={name:"\u5B50\u83DC\u5355\u540D\u79F0",reply:{type:"text",accountId:d.accountId}};p.children[v]=A,w(p.children[v],r,v)})(t,e)},[m(a,{icon:"ep:plus",class:"plus"})],8,f)):h("",!0)])):h("",!0)])]),_:1},8,["modelValue"]),_(i).length<3?(o(),u("div",{key:0,class:"menu_bottom menu_addicon",onClick:O},[m(a,{icon:"ep:plus",class:"plus"})])):h("",!0)],64)}}}),[["__scopeId","data-v-733d6a82"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/mp/menu/components/MenuPreviewer.vue"]])});export{G as __tla,U as default};
- ========
- import{d as D,K as S,o,c as u,f as m,w as C,g as k,Z as E,n as T,t as q,a as _,P as h,O as j,F,j as K,_ as L,__tla as Z}from"./index-c9fff140.js";import{V as N,__tla as B}from"./vuedraggable.umd-53f93f2a.js";let U,G=Promise.all([(()=>{try{return Z}catch{}})(),(()=>{try{return B}catch{}})()]).then(async()=>{let x,y,I,g,b,f;x={class:"menu_bottom"},y=["onClick"],I={key:0,class:"submenu"},g={class:"menu_bottom subtitle"},b=["onClick"],f=["onClick"],U=L(D({__name:"MenuPreviewer",props:{modelValue:{type:Array,required:!0},activeIndex:{type:String,required:!0},parentIndex:{type:Number,required:!0},accountId:{type:Number,required:!0}},emits:["update:modelValue","menu-clicked","submenu-clicked"],setup(P,{emit:M}){const d=P,s=M,i=S({get:()=>d.modelValue,set:n=>s("update:modelValue",n)}),O=()=>{const n=i.value.length,l={name:"\u83DC\u5355\u540D\u79F0",children:[],reply:{type:"text",accountId:d.accountId}};i.value[n]=l,V(l,n-1)},V=(n,l)=>{s("menu-clicked",n,l)},w=(n,l,a)=>{s("submenu-clicked",n,l,a)},$=({oldIndex:n,newIndex:l})=>{if(d.activeIndex==="__MENU_NOT_SELECTED__")return;let a=new Array(i.value.length).fill(!1);a[d.parentIndex]=!0;const[e]=a.splice(n,1);a.splice(l,0,e);const t=a.indexOf(!0),c=i.value[t];s("menu-clicked",c,t)},z=({newIndex:n})=>{var t;const l=d.parentIndex,a=n,e=(t=i.value[l])==null?void 0:t.children;if(e&&(e==null?void 0:e.length)>0){const c=e[a];s("submenu-clicked",c,l,a)}};return(n,l)=>{const a=K;return o(),u(F,null,[m(_(N),{modelValue:_(i),"onUpdate:modelValue":l[0]||(l[0]=e=>j(i)?i.value=e:null),"item-key":"id","ghost-class":"draggable-ghost",animation:400,onEnd:$},{item:C(({element:e,index:t})=>[k("div",x,[k("div",{onClick:c=>V(e,t),class:E(["menu_item",{active:d.activeIndex===`${t}`}])},[m(a,{icon:"ep:fold",color:"black"}),T(q(e.name),1)],10,y),d.parentIndex===t&&e.children?(o(),u("div",I,[m(_(N),{modelValue:e.children,"onUpdate:modelValue":c=>e.children=c,"item-key":"id","ghost-class":"draggable-ghost",animation:400,onEnd:z},{item:C(({element:c,index:r})=>[k("div",g,[e.children?(o(),u("div",{key:0,class:E(["menu_subItem",{active:d.activeIndex===`${t}-${r}`}]),onClick:p=>w(c,t,r)},q(c.name),11,b)):h("",!0)])]),_:2},1032,["modelValue","onUpdate:modelValue"]),!e.children||e.children.length<5?(o(),u("div",{key:0,class:"menu_bottom menu_addicon",onClick:c=>((r,p)=>{const v=p.children.length,A={name:"\u5B50\u83DC\u5355\u540D\u79F0",reply:{type:"text",accountId:d.accountId}};p.children[v]=A,w(p.children[v],r,v)})(t,e)},[m(a,{icon:"ep:plus",class:"plus"})],8,f)):h("",!0)])):h("",!0)])]),_:1},8,["modelValue"]),_(i).length<3?(o(),u("div",{key:0,class:"menu_bottom menu_addicon",onClick:O},[m(a,{icon:"ep:plus",class:"plus"})])):h("",!0)],64)}}}),[["__scopeId","data-v-733d6a82"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/mp/menu/components/MenuPreviewer.vue"]])});export{G as __tla,U as default};
- >>>>>>>> 2589804fb89eb98fd6498c1ee41a354dcce32af3:dist/assets/MenuPreviewer-1018139b.js
|