SkuTableSelect-4b2feab1.js 2.3 KB

1
  1. import{d as C,p as B,r as i,B as N,aS as z,o as h,l as w,w as e,C as D,a as l,M as E,i as t,y as v,j as d,t as y,au as H,ag as L,L as M,N as P,_ as R,__tla as X}from"./index-af173888.js";import{_ as q,__tla as A}from"./Dialog-987c90a1.js";import{E as F,__tla as G}from"./el-image-fdde0035.js";import{__tla as J}from"./el-image-viewer-0d82b94c.js";import{g as K,__tla as O}from"./spu-41f2bf16.js";import{u as Q,__tla as W}from"./useMessage-170c1b43.js";let b,Y=Promise.all([(()=>{try{return X}catch{}})(),(()=>{try{return A}catch{}})(),(()=>{try{return G}catch{}})(),(()=>{try{return J}catch{}})(),(()=>{try{return O}catch{}})(),(()=>{try{return W}catch{}})()]).then(async()=>{b=R(C({name:"SkuTableSelect",__name:"SkuTableSelect",props:{spuId:B.number.def(null)},emits:["change"],setup(g,{expose:S,emit:x}){const p=g;Q();const m=i([]),c=i(!1),s=i(!1),u=i(),V=x;return S({open:()=>{s.value=!0}}),N(async()=>{}),z(()=>p.spuId,()=>{p.spuId&&(async()=>{c.value=!0;try{const f=await K(p.spuId);m.value=f.skus}finally{c.value=!1}})()}),(f,o)=>{const k=L,n=M,U=F,I=q,T=P;return h(),w(I,{modelValue:l(s),"onUpdate:modelValue":o[1]||(o[1]=a=>v(s)?s.value=a:null),appendToBody:!0,title:"\u9009\u62E9\u89C4\u683C",width:"700"},{default:e(()=>[D((h(),w(l(E),{data:l(m),"show-overflow-tooltip":""},{default:e(()=>[t(n,{label:"#",width:"55"},{default:e(({row:a})=>[t(k,{label:a.id,modelValue:l(u),"onUpdate:modelValue":o[0]||(o[0]=r=>v(u)?u.value=r:null),onChange:r=>(_=>{V("change",_),s.value=!1,u.value=void 0})(a)},{default:e(()=>[d("\xA0 ")]),_:2},1032,["label","modelValue","onChange"])]),_:1}),t(n,{label:"\u56FE\u7247","min-width":"80"},{default:e(({row:a})=>[t(U,{src:a.picUrl,class:"h-30px w-30px","preview-src-list":[a.picUrl],"preview-teleported":""},null,8,["src","preview-src-list"])]),_:1}),t(n,{label:"\u89C4\u683C",align:"center","min-width":"80"},{default:e(({row:a})=>{var r,_;return[d(y((_=(r=a.properties)==null?void 0:r.map(j=>j.valueName))==null?void 0:_.join(" ")),1)]}),_:1}),t(n,{align:"center",label:"\u9500\u552E\u4EF7(\u5143)","min-width":"80"},{default:e(({row:a})=>[d(y(l(H)(a.price)),1)]),_:1})]),_:1},8,["data"])),[[T,l(c)]])]),_:1},8,["modelValue"])}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mall/product/spu/components/SkuTableSelect.vue"]])});export{Y as __tla,b as default};