1 |
- import{d as j,dQ as D,ag as v,K as E,r as y,L as N,av as b,o as s,c as u,g as o,F as g,q as P,f as e,w,x as R,a4 as U,a as V,v as F,P as I,j as K,a_ as M,_ as Q,__tla as T}from"./index-6d7b82ba.js";import{E as X,__tla as B}from"./el-image-afb9e567.js";import{__tla as G}from"./el-image-viewer-4a19ded4.js";import{c as H,__tla as J}from"./spu-402402f7.js";import O,{__tla as W}from"./SpuTableSelect-9edb3132.js";import{__tla as Y}from"./Dialog-78181bae.js";import{__tla as Z}from"./ContentWrap-1ba5c8ca.js";import{__tla as $}from"./ContentWrap.vue_vue_type_script_setup_true_lang-68bb15fa.js";import{__tla as aa}from"./el-card-1a4b93b1.js";import{__tla as la}from"./index-a786614b.js";import{__tla as ta}from"./index-e37504b6.js";import{__tla as ea}from"./el-tree-select-23e10a37.js";import"./tree-0af4953a.js";import{__tla as ra}from"./category-d8fb78d9.js";let x,sa=Promise.all([(()=>{try{return T}catch{}})(),(()=>{try{return B}catch{}})(),(()=>{try{return G}catch{}})(),(()=>{try{return J}catch{}})(),(()=>{try{return W}catch{}})(),(()=>{try{return Y}catch{}})(),(()=>{try{return Z}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return ra}catch{}})()]).then(async()=>{let i,n;i={class:"flex flex-wrap items-center gap-8px"},n={class:"relative h-full w-full"},x=Q(j({name:"SpuShowcase",__name:"SpuShowcase",props:{modelValue:D([Number,Array]).isRequired,limit:v.number.def(Number.MAX_VALUE),disabled:v.bool.def(!1)},emits:["update:modelValue","change"],setup(_,{emit:S}){const t=_,k=E(()=>!t.disabled&&(!t.limit||l.value.length<t.limit)),l=y([]);N(()=>t.modelValue,async()=>{const a=b(t.modelValue)?t.modelValue:t.modelValue?[t.modelValue]:[];a.length!==0?(l.value.length===0||l.value.some(p=>!a.includes(p.id)))&&(l.value=await H(a)):l.value=[]},{immediate:!0});const m=y(),C=()=>{m.value.open(l.value)},A=a=>{l.value=b(a)?a:[a],d()},r=S,d=()=>{if(t.limit===1){const a=l.value.length>0?l.value[0]:null;r("update:modelValue",(a==null?void 0:a.id)||0),r("change",a)}else r("update:modelValue",l.value.map(a=>a.id)),r("change",l.value)};return(a,p)=>{const q=X,f=K,h=M;return s(),u(g,null,[o("div",i,[(s(!0),u(g,null,P(V(l),(c,z)=>(s(),u("div",{key:c.id,class:"select-box spu-pic"},[e(h,{content:c.name},{default:w(()=>[o("div",n,[e(q,{src:c.picUrl,class:"h-full w-full"},null,8,["src"]),R(e(f,{class:"del-icon",icon:"ep:circle-close-filled",onClick:_a=>(L=>{l.value.splice(L,1),d()})(z)},null,8,["onClick"]),[[U,!_.disabled]])])]),_:2},1032,["content"])]))),128)),V(k)?(s(),F(h,{key:0,content:"\u9009\u62E9\u5546\u54C1"},{default:w(()=>[o("div",{class:"select-box",onClick:C},[e(f,{icon:"ep:plus"})])]),_:1})):I("",!0)]),e(O,{ref_key:"spuTableSelectRef",ref:m,multiple:_.limit!=1,onChange:A},null,8,["multiple"])],64)}}}),[["__scopeId","data-v-b2e1fd2c"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/mall/product/spu/components/SpuShowcase.vue"]])});export{sa as __tla,x as default};
|