1 |
- import{d as X,n as B,r as i,f as G,o as d,c as p,i as t,w as u,a as e,j as U,C as M,l as I,g as O,a2 as W,y as Y,F as Z,H as $,v as L,U as Q,c2 as ee,K as ae,J as re,N as te,_ as le,__tla as se}from"./index-afaf388d.js";import{_ as ue,__tla as oe}from"./Dialog-82c2009c.js";import{_ as ie,__tla as _e}from"./UploadImgs-a15847a2.js";import{_ as ce,__tla as de}from"./UploadImg-f909692d.js";import{E as me,__tla as ne}from"./el-image-caa301d0.js";import{__tla as pe}from"./el-image-viewer-9330e340.js";import{g as fe,c as ve,__tla as ye}from"./comment-d6fb57ed.js";import he,{__tla as be}from"./SpuShowcase-317f7a05.js";import ge,{__tla as Ve}from"./SkuTableSelect-2d2ea40d.js";import{u as ke,__tla as Ue}from"./useMessage-a290df31.js";import{__tla as Ie}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-e548deac.js";import{__tla as Se}from"./index-6149057d.js";import{__tla as xe}from"./spu-4d82f8bd.js";import{__tla as we}from"./SpuTableSelect-5d181451.js";import{__tla as Ce}from"./ContentWrap-abe0694e.js";import{__tla as qe}from"./el-card-9c18d881.js";import{__tla as Ae}from"./index-89d02e79.js";import{__tla as Ne}from"./index-0eed91e1.js";import{__tla as Fe}from"./el-tree-select-190eecb6.js";import"./tree-0af4953a.js";import{__tla as He}from"./category-f4ef186a.js";let S,Re=Promise.all([(()=>{try{return se}catch{}})(),(()=>{try{return oe}catch{}})(),(()=>{try{return _e}catch{}})(),(()=>{try{return de}catch{}})(),(()=>{try{return ne}catch{}})(),(()=>{try{return pe}catch{}})(),(()=>{try{return ye}catch{}})(),(()=>{try{return be}catch{}})(),(()=>{try{return Ve}catch{}})(),(()=>{try{return Ue}catch{}})(),(()=>{try{return Ie}catch{}})(),(()=>{try{return Se}catch{}})(),(()=>{try{return xe}catch{}})(),(()=>{try{return we}catch{}})(),(()=>{try{return Ce}catch{}})(),(()=>{try{return qe}catch{}})(),(()=>{try{return Ae}catch{}})(),(()=>{try{return Ne}catch{}})(),(()=>{try{return Fe}catch{}})(),(()=>{try{return He}catch{}})()]).then(async()=>{let f,v;f={key:0},v={key:1,class:"select-box"},S=le(X({__name:"CommentForm",emits:["success"],setup(ze,{expose:x,emit:w}){const{t:y}=B(),C=ke(),_=i(!1),q=i(""),c=i(!1),h=i(""),r=i({id:void 0,userId:void 0,userNickname:void 0,userAvatar:void 0,spuId:0,skuId:void 0,descriptionScores:5,benefitScores:5,content:void 0,picUrls:[]}),A=G({spuId:[{required:!0,message:"\u5546\u54C1\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],skuId:[{required:!0,message:"\u89C4\u683C\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],userAvatar:[{required:!0,message:"\u7528\u6237\u5934\u50CF\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],userNickname:[{required:!0,message:"\u7528\u6237\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],content:[{required:!0,message:"\u8BC4\u8BBA\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],descriptionScores:[{required:!0,message:"\u63CF\u8FF0\u661F\u7EA7\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],benefitScores:[{required:!0,message:"\u670D\u52A1\u661F\u7EA7\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),m=i(),n=i({id:-1,name:"",picUrl:""});x({open:async(o,a)=>{if(_.value=!0,q.value=y("action."+o),h.value=o,H(),a){c.value=!0;try{r.value=await fe(a)}finally{c.value=!1}}}});const N=w,F=async()=>{if(m&&await m.value.validate()){c.value=!0;try{const o=r.value.picUrls.map(s=>s!=null&&s.url?s.url:s),a={...r.value,picUrls:o};h.value==="create"&&(await ve(a),C.success(y("common.createSuccess"))),_.value=!1,N("success")}finally{c.value=!1}}},H=()=>{var o;r.value={id:void 0,userId:void 0,userNickname:void 0,userAvatar:void 0,spuId:0,skuId:void 0,descriptionScores:5,benefitScores:5,content:void 0,picUrls:[]},(o=m.value)==null||o.resetFields()},b=i(),R=()=>{b.value.open()},z=o=>{n.value=o,r.value.skuId=o.id};return(o,a)=>{const s=$,D=me,P=L,T=ce,g=Q,V=ee,j=ie,E=ae,k=re,J=ue,K=te;return d(),p(Z,null,[t(J,{title:"\u6DFB\u52A0\u865A\u62DF\u8BC4\u8BBA",modelValue:e(_),"onUpdate:modelValue":a[8]||(a[8]=l=>Y(_)?_.value=l:null)},{footer:u(()=>[t(k,{onClick:F,type:"primary",disabled:e(c)},{default:u(()=>[U("\u786E \u5B9A")]),_:1},8,["disabled"]),t(k,{onClick:a[7]||(a[7]=l=>_.value=!1)},{default:u(()=>[U("\u53D6 \u6D88")]),_:1})]),default:u(()=>[M((d(),I(E,{ref_key:"formRef",ref:m,model:e(r),rules:e(A),"label-width":"100px"},{default:u(()=>[t(s,{label:"\u5546\u54C1",prop:"spuId"},{default:u(()=>[t(he,{modelValue:e(r).spuId,"onUpdate:modelValue":a[0]||(a[0]=l=>e(r).spuId=l),limit:1},null,8,["modelValue"])]),_:1}),e(r).spuId?(d(),I(s,{key:0,label:"\u5546\u54C1\u89C4\u683C",prop:"skuId"},{default:u(()=>[O("div",{onClick:R,class:"h-60px w-60px"},[e(n)&&e(n).picUrl?(d(),p("div",f,[t(D,{src:e(n).picUrl},null,8,["src"])])):(d(),p("div",v,[t(P,{icon:"ep:plus"})]))])]),_:1})):W("",!0),t(s,{label:"\u7528\u6237\u5934\u50CF",prop:"userAvatar"},{default:u(()=>[t(T,{modelValue:e(r).userAvatar,"onUpdate:modelValue":a[1]||(a[1]=l=>e(r).userAvatar=l),height:"60px",width:"60px"},null,8,["modelValue"])]),_:1}),t(s,{label:"\u7528\u6237\u540D\u79F0",prop:"userNickname"},{default:u(()=>[t(g,{modelValue:e(r).userNickname,"onUpdate:modelValue":a[2]||(a[2]=l=>e(r).userNickname=l),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D\u79F0"},null,8,["modelValue"])]),_:1}),t(s,{label:"\u8BC4\u8BBA\u5185\u5BB9",prop:"content"},{default:u(()=>[t(g,{type:"textarea",modelValue:e(r).content,"onUpdate:modelValue":a[3]||(a[3]=l=>e(r).content=l)},null,8,["modelValue"])]),_:1}),t(s,{label:"\u63CF\u8FF0\u661F\u7EA7",prop:"descriptionScores"},{default:u(()=>[t(V,{modelValue:e(r).descriptionScores,"onUpdate:modelValue":a[4]||(a[4]=l=>e(r).descriptionScores=l)},null,8,["modelValue"])]),_:1}),t(s,{label:"\u670D\u52A1\u661F\u7EA7",prop:"benefitScores"},{default:u(()=>[t(V,{modelValue:e(r).benefitScores,"onUpdate:modelValue":a[5]||(a[5]=l=>e(r).benefitScores=l)},null,8,["modelValue"])]),_:1}),t(s,{label:"\u8BC4\u8BBA\u56FE\u7247",prop:"picUrls"},{default:u(()=>[t(j,{modelValue:e(r).picUrls,"onUpdate:modelValue":a[6]||(a[6]=l=>e(r).picUrls=l),limit:9,height:"60px",width:"60px"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[K,e(c)]])]),_:1},8,["modelValue"]),t(ge,{ref_key:"skuTableSelectRef",ref:b,onChange:z,"spu-id":e(r).spuId},null,8,["spu-id"])],64)}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mall/product/comment/CommentForm.vue"]])});export{Re as __tla,S as default};
|