mirror of
https://gitee.com/niucloud-team/javashop.git
synced 2026-05-23 09:13:54 +00:00
优化 * 平台端 站点端界面改版优化 * 插件支持多选批量升级 * 万能表单 日期组件、时间组件优化 * 万能表单完善语言包 * 微信开放平台管理端优化,增加小程序撤回审核、授权记录 * 插件支持多选批量升级 * 升级框架/插件时,增加是否备份、是否云编译等控制选项 * 操作日志增加清空功能 * 站点端`本地存储`调整为`默认存储`,若无配置,则使用管理端设置的默认存储方式及配置 * 后台提现列表样式优化 * 隐私协议弹框样式优化 * 待付款订单界面优化 * 商品列表 推广支持微信小程序二维码 * 商品分类列表 推广支持微信小程序二维码 * 优惠券列表 推广支持微信小程序二维码 * 重构限时折扣活动,支持添加N个商品,提供扩展性 * 限时折扣增加批量设置减钱、促销价 * 商品搜索页面增加 搜索关键字、排行榜 * 订单退款详情、优惠券领取记录、退款维权详情改为抽屉弹框样式 新增 * 增加升级记录 * 增加备份记录,支持手动备份、恢复等功能 * 增加主题风格,自定义配色功能 * 自定义链接支持扩展,增加万能表单选择 * 自定义页面增加弹窗广告设置 * 平台端增加清理缓存功能 * 增加定时清理计划任务日志数据 * 牛云短信功能 * 会员增加身份证、备注等信息 * 个人资料增加万能表单 * 后台会员列表增加全选所有页/全选当前页,方便批量操作 * 自定义页面增加弹窗广告设置 * 增加定时清理计划任务 * 站点增加初始化操作,用于清空整个站点数据 * 支持第三方云编译服务搭建 * 商品列表,商品分类展示限时折扣标识 * 价格展示逻辑调整,同时参与会员价、限时折扣,优先展示最低价 * 商品榜单列表增加会员价、限时折扣标识 * 商品收藏列表、足迹列表,显示会员价/限时折扣展示 * 同城配送功能新增预约时间设置,支持用户选择具体配送时段,提升配送体验。 * 自定义商品详情 * 增加商品排序设置 * 增加门店自提核销功能 * 优惠券列表增加发劵功能 * 商品列表、商品详情增加副标题展示 * 商品增加视频 * 后台增加`关闭售后`按钮 * 添加/编辑商品,支持选择多个参数模板 * 商品详情左上角返回增加悬浮菜单导航 * 商品品牌支持自定义样式设置 * 商品标签增加复制功能 * 增加商品搜索设置 * 增加商品编码唯一性设置 * 自定义链接增加选择商品、选择商品分类、选择优惠券、选择积分商品 * 满减送列表增加批量关闭、删除功能 * 后台商品列表增加批量操作(商品标签、商品服务、虚拟销量、商品分类、商品品牌、商品海报、是否赠品、配送设置、批量修改库存)
7 lines
21 KiB
JavaScript
7 lines
21 KiB
JavaScript
import{_ as Rt,E as St,v as Tt,__tla as Ct}from"./el-loading.f6ec93c5.js";import{H as q,V as w,f as B,B as V,i as T,aU as Lt,aV as de,aW as Ut,aX as pe,ax as fe,aT as Dt,a6 as me,o as h,k as F,C as b,u as e,l as R,E as N,r as L,t as j,y as $,c as P,w as _,J as Pt,T as A,D as M,F as ve,ap as G,aY as C,at as Bt,x as Q,M as jt,N as Ot,aZ as ye,a8 as W,m as E,a_ as It,az as Nt,a$ as At,b0 as qt,b1 as Vt,W as Wt,a0 as ee,b2 as Ht,b3 as Mt,b4 as Kt,a3 as he,A as Xt,a5 as zt,I as Jt,b5 as Zt,b6 as ge,aI as te,h as Yt,L as Gt,j as Qt,a7 as ea,p as be,b7 as _e,b8 as ke,q as I,P as ta,b as aa,aN as sa,Z as la,__tla as ra}from"./entry.6da055c7.js";import{t as ae,i as we,d as oa,__tla as na}from"./index.7a939c85.js";import{u as X,__tla as ia}from"./use-form-item.6c2506d7.js";import{c as ua,E as ca,a as da,b as pa,__tla as fa}from"./el-overlay.9a83d09a.js";import{E as ma,__tla as va}from"./el-input.13947061.js";import{E as ya,__tla as ha}from"./el-button.4eda969c.js";import{_ as ga,__tla as ba}from"./default_headimg.23a778b8.js";import{_ as _a}from"./_plugin-vue_export-helper.c27b6911.js";import{__tla as ka}from"./el-tooltip.6d4be0dc.js";import{__tla as wa}from"./el-popper.c6de2638.js";import{__tla as xa}from"./index.5eb2563c.js";import{__tla as $a}from"./vnode.0330dacf.js";import{__tla as Fa}from"./_initCloneObject.17ebf7a3.js";let xe,Ea=Promise.all([(()=>{try{return Ct}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return ba}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return Fa}catch{}})()]).then(async()=>{var $e=1,Fe=4;function Ee(l){return ua(l,$e|Fe)}const Re=q({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:l=>l>=0&&l<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:{type:Boolean,default:!1},duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:w(String),default:"round"},textInside:{type:Boolean,default:!1},width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:w([String,Array,Function]),default:""},format:{type:w(Function),default:l=>`${l}%`}}),Se=["aria-valuenow"],Te={viewBox:"0 0 100 100"},Ce=["d","stroke","stroke-width"],Le=["d","stroke","opacity","stroke-linecap","stroke-width"],Ue={key:0},De=B({name:"ElProgress"}),Pe=B({...De,props:Re,setup(l){const s=l,r={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},a=V("progress"),p=T(()=>({width:`${s.percentage}%`,animationDuration:`${s.duration}s`,backgroundColor:U(s.percentage)})),f=T(()=>(s.strokeWidth/s.width*100).toFixed(1)),m=T(()=>["circle","dashboard"].includes(s.type)?Number.parseInt(`${50-Number.parseFloat(f.value)/2}`,10):0),d=T(()=>{const i=m.value,D=s.type==="dashboard";return`
|
|
M 50 50
|
|
m 0 ${D?"":"-"}${i}
|
|
a ${i} ${i} 0 1 1 0 ${D?"-":""}${i*2}
|
|
a ${i} ${i} 0 1 1 0 ${D?"":"-"}${i*2}
|
|
`}),v=T(()=>2*Math.PI*m.value),u=T(()=>s.type==="dashboard"?.75:1),x=T(()=>`${-1*v.value*(1-u.value)/2}px`),y=T(()=>({strokeDasharray:`${v.value*u.value}px, ${v.value}px`,strokeDashoffset:x.value})),o=T(()=>({strokeDasharray:`${v.value*u.value*(s.percentage/100)}px, ${v.value}px`,strokeDashoffset:x.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),t=T(()=>{let i;return s.color?i=U(s.percentage):i=r[s.status]||r.default,i}),n=T(()=>s.status==="warning"?Lt:s.type==="line"?s.status==="success"?de:Ut:s.status==="success"?pe:fe),g=T(()=>s.type==="line"?12+s.strokeWidth*.4:s.width*.111111+2),k=T(()=>s.format(s.percentage));function c(i){const D=100/i.length;return i.map((S,O)=>me(S)?{color:S,percentage:(O+1)*D}:S).sort((S,O)=>S.percentage-O.percentage)}const U=i=>{var D;const{color:S}=s;if(Dt(S))return S(i);if(me(S))return S;{const O=c(S);for(const K of O)if(K.percentage>i)return K.color;return(D=O[O.length-1])==null?void 0:D.color}};return(i,D)=>(h(),F("div",{class:b([e(a).b(),e(a).m(i.type),e(a).is(i.status),{[e(a).m("without-text")]:!i.showText,[e(a).m("text-inside")]:i.textInside}]),role:"progressbar","aria-valuenow":i.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[i.type==="line"?(h(),F("div",{key:0,class:b(e(a).b("bar"))},[R("div",{class:b(e(a).be("bar","outer")),style:N({height:`${i.strokeWidth}px`})},[R("div",{class:b([e(a).be("bar","inner"),{[e(a).bem("bar","inner","indeterminate")]:i.indeterminate}]),style:N(e(p))},[(i.showText||i.$slots.default)&&i.textInside?(h(),F("div",{key:0,class:b(e(a).be("bar","innerText"))},[L(i.$slots,"default",{percentage:i.percentage},()=>[R("span",null,j(e(k)),1)])],2)):$("v-if",!0)],6)],6)],2)):(h(),F("div",{key:1,class:b(e(a).b("circle")),style:N({height:`${i.width}px`,width:`${i.width}px`})},[(h(),F("svg",Te,[R("path",{class:b(e(a).be("circle","track")),d:e(d),stroke:`var(${e(a).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-width":e(f),fill:"none",style:N(e(y))},null,14,Ce),R("path",{class:b(e(a).be("circle","path")),d:e(d),stroke:e(t),fill:"none",opacity:i.percentage?1:0,"stroke-linecap":i.strokeLinecap,"stroke-width":e(f),style:N(e(o))},null,14,Le)]))],6)),(i.showText||i.$slots.default)&&!i.textInside?(h(),F("div",{key:2,class:b(e(a).e("text")),style:N({fontSize:`${e(g)}px`})},[L(i.$slots,"default",{percentage:i.percentage},()=>[i.status?(h(),P(e(A),{key:1},{default:_(()=>[(h(),P(Pt(e(n))))]),_:1})):(h(),F("span",Ue,j(e(k)),1))])],6)):$("v-if",!0)],10,Se))}});var Be=M(Pe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/progress/src/progress.vue"]]);const je=ve(Be),se=Symbol("uploadContextKey"),Oe="ElUpload";class Ie extends Error{constructor(s,r,a,p){super(s),this.name="UploadAjaxError",this.status=r,this.method=a,this.url=p}}function le(l,s,r){let a;return r.response?a=`${r.response.error||r.response}`:r.responseText?a=`${r.responseText}`:a=`fail to ${s.method} ${l} ${r.status}`,new Ie(a,r.status,s.method,l)}function Ne(l){const s=l.responseText||l.response;if(!s)return s;try{return JSON.parse(s)}catch{return s}}const Ae=l=>{typeof XMLHttpRequest>"u"&&ae(Oe,"XMLHttpRequest is undefined");const s=new XMLHttpRequest,r=l.action;s.upload&&s.upload.addEventListener("progress",f=>{const m=f;m.percent=f.total>0?f.loaded/f.total*100:0,l.onProgress(m)});const a=new FormData;if(l.data)for(const[f,m]of Object.entries(l.data))Array.isArray(m)?a.append(f,...m):a.append(f,m);a.append(l.filename,l.file,l.file.name),s.addEventListener("error",()=>{l.onError(le(r,l,s))}),s.addEventListener("load",()=>{if(s.status<200||s.status>=300)return l.onError(le(r,l,s));l.onSuccess(Ne(s))}),s.open(l.method,r,!0),l.withCredentials&&"withCredentials"in s&&(s.withCredentials=!0);const p=l.headers||{};if(p instanceof Headers)p.forEach((f,m)=>s.setRequestHeader(m,f));else for(const[f,m]of Object.entries(p))we(m)||s.setRequestHeader(f,String(m));return s.send(a),s},re=["text","picture","picture-card"];let qe=1;const z=()=>Date.now()+qe++,oe=q({action:{type:String,default:"#"},headers:{type:w(Object)},method:{type:String,default:"post"},data:{type:Object,default:()=>G({})},multiple:{type:Boolean,default:!1},name:{type:String,default:"file"},drag:{type:Boolean,default:!1},withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},type:{type:String,default:"select"},fileList:{type:w(Array),default:()=>G([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:re,default:"text"},httpRequest:{type:w(Function),default:Ae},disabled:Boolean,limit:Number}),Ve=q({...oe,beforeUpload:{type:w(Function),default:C},beforeRemove:{type:w(Function)},onRemove:{type:w(Function),default:C},onChange:{type:w(Function),default:C},onPreview:{type:w(Function),default:C},onSuccess:{type:w(Function),default:C},onProgress:{type:w(Function),default:C},onError:{type:w(Function),default:C},onExceed:{type:w(Function),default:C}}),We=q({files:{type:w(Array),default:()=>G([])},disabled:{type:Boolean,default:!1},handlePreview:{type:w(Function),default:C},listType:{type:String,values:re,default:"text"}}),He={remove:l=>!!l},Me=["onKeydown"],Ke=["src"],Xe=["onClick"],ze=["onClick"],Je=["onClick"],Ze=B({name:"ElUploadList"}),Ye=B({...Ze,props:We,emits:He,setup(l,{emit:s}){const{t:r}=Bt(),a=V("upload"),p=V("icon"),f=V("list"),m=X(),d=Q(!1),v=u=>{s("remove",u)};return(u,x)=>(h(),P(qt,{tag:"ul",class:b([e(a).b("list"),e(a).bm("list",u.listType),e(a).is("disabled",e(m))]),name:e(f).b()},{default:_(()=>[(h(!0),F(jt,null,Ot(u.files,y=>(h(),F("li",{key:y.uid||y.name,class:b([e(a).be("list","item"),e(a).is(y.status),{focusing:d.value}]),tabindex:"0",onKeydown:ye(o=>!e(m)&&v(y),["delete"]),onFocus:x[0]||(x[0]=o=>d.value=!0),onBlur:x[1]||(x[1]=o=>d.value=!1),onClick:x[2]||(x[2]=o=>d.value=!1)},[L(u.$slots,"default",{file:y},()=>[u.listType==="picture"||y.status!=="uploading"&&u.listType==="picture-card"?(h(),F("img",{key:0,class:b(e(a).be("list","item-thumbnail")),src:y.url,alt:""},null,10,Ke)):$("v-if",!0),y.status==="uploading"||u.listType!=="picture-card"?(h(),F("div",{key:1,class:b(e(a).be("list","item-info"))},[R("a",{class:b(e(a).be("list","item-name")),onClick:W(o=>u.handlePreview(y),["prevent"])},[E(e(A),{class:b(e(p).m("document"))},{default:_(()=>[E(e(It))]),_:1},8,["class"]),R("span",{class:b(e(a).be("list","item-file-name"))},j(y.name),3)],10,Xe),y.status==="uploading"?(h(),P(e(je),{key:0,type:u.listType==="picture-card"?"circle":"line","stroke-width":u.listType==="picture-card"?6:2,percentage:Number(y.percentage),style:N(u.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):$("v-if",!0)],2)):$("v-if",!0),R("label",{class:b(e(a).be("list","item-status-label"))},[u.listType==="text"?(h(),P(e(A),{key:0,class:b([e(p).m("upload-success"),e(p).m("circle-check")])},{default:_(()=>[E(e(de))]),_:1},8,["class"])):["picture-card","picture"].includes(u.listType)?(h(),P(e(A),{key:1,class:b([e(p).m("upload-success"),e(p).m("check")])},{default:_(()=>[E(e(pe))]),_:1},8,["class"])):$("v-if",!0)],2),e(m)?$("v-if",!0):(h(),P(e(A),{key:2,class:b(e(p).m("close")),onClick:o=>v(y)},{default:_(()=>[E(e(fe))]),_:2},1032,["class","onClick"])),$(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),$(" This is a bug which needs to be fixed "),$(" TODO: Fix the incorrect navigation interaction "),e(m)?$("v-if",!0):(h(),F("i",{key:3,class:b(e(p).m("close-tip"))},j(e(r)("el.upload.deleteTip")),3)),u.listType==="picture-card"?(h(),F("span",{key:4,class:b(e(a).be("list","item-actions"))},[R("span",{class:b(e(a).be("list","item-preview")),onClick:o=>u.handlePreview(y)},[E(e(A),{class:b(e(p).m("zoom-in"))},{default:_(()=>[E(e(Nt))]),_:1},8,["class"])],10,ze),e(m)?$("v-if",!0):(h(),F("span",{key:0,class:b(e(a).be("list","item-delete")),onClick:o=>v(y)},[E(e(A),{class:b(e(p).m("delete"))},{default:_(()=>[E(e(At))]),_:1},8,["class"])],10,Je))],2)):$("v-if",!0)])],42,Me))),128)),L(u.$slots,"append")]),_:3},8,["class","name"]))}});var ne=M(Ye,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-list.vue"]]);const Ge=q({disabled:{type:Boolean,default:!1}}),Qe={file:l=>Vt(l)},et=["onDrop","onDragover"],ie="ElUploadDrag",tt=B({name:ie}),at=B({...tt,props:Ge,emits:Qe,setup(l,{emit:s}){const r=Wt(se);r||ae(ie,"usage: <el-upload><el-upload-dragger /></el-upload>");const a=V("upload"),p=Q(!1),f=X(),m=v=>{if(f.value)return;p.value=!1,v.stopPropagation();const u=Array.from(v.dataTransfer.files),x=r.accept.value;if(!x){s("file",u);return}const y=u.filter(o=>{const{type:t,name:n}=o,g=n.includes(".")?`.${n.split(".").pop()}`:"",k=t.replace(/\/.*$/,"");return x.split(",").map(c=>c.trim()).filter(c=>c).some(c=>c.startsWith(".")?g===c:/\/\*$/.test(c)?k===c.replace(/\/\*$/,""):/^[^/]+\/[^/]+$/.test(c)?t===c:!1)});s("file",y)},d=()=>{f.value||(p.value=!0)};return(v,u)=>(h(),F("div",{class:b([e(a).b("dragger"),e(a).is("dragover",p.value)]),onDrop:W(m,["prevent"]),onDragover:W(d,["prevent"]),onDragleave:u[0]||(u[0]=W(x=>p.value=!1,["prevent"]))},[L(v.$slots,"default")],42,et))}});var st=M(at,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-dragger.vue"]]);const lt=q({...oe,beforeUpload:{type:w(Function),default:C},onRemove:{type:w(Function),default:C},onStart:{type:w(Function),default:C},onSuccess:{type:w(Function),default:C},onProgress:{type:w(Function),default:C},onError:{type:w(Function),default:C},onExceed:{type:w(Function),default:C}}),rt=["onKeydown"],ot=["name","multiple","accept"],nt=B({name:"ElUploadContent",inheritAttrs:!1}),it=B({...nt,props:lt,setup(l,{expose:s}){const r=l,a=V("upload"),p=X(),f=ee({}),m=ee(),d=t=>{if(t.length===0)return;const{autoUpload:n,limit:g,fileList:k,multiple:c,onStart:U,onExceed:i}=r;if(g&&k.length+t.length>g){i(t,k);return}c||(t=t.slice(0,1));for(const D of t){const S=D;S.uid=z(),U(S),n&&v(S)}},v=async t=>{if(m.value.value="",!r.beforeUpload)return u(t);let n,g={};try{const c=r.beforeUpload(t);g=Ht(r.data)?Ee(r.data):r.data,n=await c}catch{n=!1}if(n===!1){r.onRemove(t);return}let k=t;n instanceof Blob&&(n instanceof File?k=n:k=new File([n],t.name,{type:t.type})),u(Object.assign(k,{uid:t.uid}),g)},u=(t,n)=>{const{headers:g,data:k,method:c,withCredentials:U,name:i,action:D,onProgress:S,onSuccess:O,onError:K,httpRequest:Et}=r,{uid:J}=t,Z={headers:g||{},withCredentials:U,file:t,data:n??k,method:c,filename:i,action:D,onProgress:H=>{S(H,t)},onSuccess:H=>{O(H,t),delete f.value[J]},onError:H=>{K(H,t),delete f.value[J]}},Y=Et(Z);f.value[J]=Y,Y instanceof Promise&&Y.then(Z.onSuccess,Z.onError)},x=t=>{const n=t.target.files;n&&d(Array.from(n))},y=()=>{p.value||(m.value.value="",m.value.click())},o=()=>{y()};return s({abort:t=>{Mt(f.value).filter(t?([n])=>String(t.uid)===n:()=>!0).forEach(([n,g])=>{g instanceof XMLHttpRequest&&g.abort(),delete f.value[n]})},upload:v}),(t,n)=>(h(),F("div",{class:b([e(a).b(),e(a).m(t.listType),e(a).is("drag",t.drag)]),tabindex:"0",onClick:y,onKeydown:ye(W(o,["self"]),["enter","space"])},[t.drag?(h(),P(st,{key:0,disabled:e(p),onFile:d},{default:_(()=>[L(t.$slots,"default")]),_:3},8,["disabled"])):L(t.$slots,"default",{key:1}),R("input",{ref_key:"inputRef",ref:m,class:b(e(a).e("input")),name:t.name,multiple:t.multiple,accept:t.accept,type:"file",onChange:x,onClick:n[0]||(n[0]=W(()=>{},["stop"]))},null,42,ot)],42,rt))}});var ue=M(it,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-content.vue"]]);const ce="ElUpload",ut=l=>{var s;(s=l.url)!=null&&s.startsWith("blob:")&&URL.revokeObjectURL(l.url)},ct=(l,s)=>{const r=Kt(l,"fileList",void 0,{passive:!0}),a=o=>r.value.find(t=>t.uid===o.uid);function p(o){var t;(t=s.value)==null||t.abort(o)}function f(o=["ready","uploading","success","fail"]){r.value=r.value.filter(t=>!o.includes(t.status))}const m=(o,t)=>{const n=a(t);n&&(console.error(o),n.status="fail",r.value.splice(r.value.indexOf(n),1),l.onError(o,n,r.value),l.onChange(n,r.value))},d=(o,t)=>{const n=a(t);n&&(l.onProgress(o,n,r.value),n.status="uploading",n.percentage=Math.round(o.percent))},v=(o,t)=>{const n=a(t);n&&(n.status="success",n.response=o,l.onSuccess(o,n,r.value),l.onChange(n,r.value))},u=o=>{we(o.uid)&&(o.uid=z());const t={name:o.name,percentage:0,status:"ready",size:o.size,raw:o,uid:o.uid};if(l.listType==="picture-card"||l.listType==="picture")try{t.url=URL.createObjectURL(o)}catch(n){oa(ce,n.message),l.onError(n,t,r.value)}r.value=[...r.value,t],l.onChange(t,r.value)},x=async o=>{const t=o instanceof File?a(o):o;t||ae(ce,"file to be removed not found");const n=g=>{p(g);const k=r.value;k.splice(k.indexOf(g),1),l.onRemove(g,k),ut(g)};l.beforeRemove?await l.beforeRemove(t,r.value)!==!1&&n(t):n(t)};function y(){r.value.filter(({status:o})=>o==="ready").forEach(({raw:o})=>{var t;return o&&((t=s.value)==null?void 0:t.upload(o))})}return he(()=>l.listType,o=>{o!=="picture-card"&&o!=="picture"||(r.value=r.value.map(t=>{const{raw:n,url:g}=t;if(!g&&n)try{t.url=URL.createObjectURL(n)}catch(k){l.onError(k,t,r.value)}return t}))}),he(r,o=>{for(const t of o)t.uid||(t.uid=z()),t.status||(t.status="success")},{immediate:!0,deep:!0}),{uploadFiles:r,abort:p,clearFiles:f,handleError:m,handleProgress:d,handleStart:u,handleSuccess:v,handleRemove:x,submit:y}},dt=B({name:"ElUpload"}),pt=B({...dt,props:Ve,setup(l,{expose:s}){const r=l,a=Xt(),p=X(),f=ee(),{abort:m,submit:d,clearFiles:v,uploadFiles:u,handleStart:x,handleError:y,handleRemove:o,handleSuccess:t,handleProgress:n}=ct(r,f),g=T(()=>r.listType==="picture-card"),k=T(()=>({...r,fileList:u.value,onStart:x,onProgress:n,onSuccess:t,onError:y,onRemove:o}));return zt(()=>{u.value.forEach(({url:c})=>{c!=null&&c.startsWith("blob:")&&URL.revokeObjectURL(c)})}),Jt(se,{accept:Zt(r,"accept")}),s({abort:m,submit:d,clearFiles:v,handleStart:x,handleRemove:o}),(c,U)=>(h(),F("div",null,[e(g)&&c.showFileList?(h(),P(ne,{key:0,disabled:e(p),"list-type":c.listType,files:e(u),"handle-preview":c.onPreview,onRemove:e(o)},ge({append:_(()=>[E(ue,te({ref_key:"uploadRef",ref:f},e(k)),{default:_(()=>[e(a).trigger?L(c.$slots,"trigger",{key:0}):$("v-if",!0),!e(a).trigger&&e(a).default?L(c.$slots,"default",{key:1}):$("v-if",!0)]),_:3},16)]),_:2},[c.$slots.file?{name:"default",fn:_(({file:i})=>[L(c.$slots,"file",{file:i})])}:void 0]),1032,["disabled","list-type","files","handle-preview","onRemove"])):$("v-if",!0),!e(g)||e(g)&&!c.showFileList?(h(),P(ue,te({key:1,ref_key:"uploadRef",ref:f},e(k)),{default:_(()=>[e(a).trigger?L(c.$slots,"trigger",{key:0}):$("v-if",!0),!e(a).trigger&&e(a).default?L(c.$slots,"default",{key:1}):$("v-if",!0)]),_:3},16)):$("v-if",!0),c.$slots.trigger?L(c.$slots,"default",{key:2}):$("v-if",!0),L(c.$slots,"tip"),!e(g)&&c.showFileList?(h(),P(ne,{key:3,disabled:e(p),"list-type":c.listType,files:e(u),"handle-preview":c.onPreview,onRemove:e(o)},ge({_:2},[c.$slots.file?{name:"default",fn:_(({file:i})=>[L(c.$slots,"file",{file:i})])}:void 0]),1032,["disabled","list-type","files","handle-preview","onRemove"])):$("v-if",!0)]))}});var ft=M(pt,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload.vue"]]);const mt=ve(ft),vt={class:"w-full h-full bg-page pt-6"},yt={class:"main-container flex justify-between"},ht={class:"card-header"},gt={key:0,class:"pr-15"},bt={class:"w-full flex justify-between content-center items-center"},_t={key:0,class:"w-[80px] h-[80px]",src:ga,alt:""},kt=["src"],wt={class:"cursor-pointer text-color"},xt={class:"w-full flex justify-between content-center"},$t={class:"dialog-footer"},Ft=B({__name:"center",setup(l){const s=Yt(),r=Q(!0),a=Gt({modal:!1,value:""}),p=T(()=>{var d;return a.value=(d=s.info)==null?void 0:d.nickname,s.info&&(r.value=!1),s.info});Qt();const f=T(()=>{const d={};return d.token=aa(),d["site-id"]=sa.get("siteId")||1,{action:`${la.options.baseURL}/file/image`,limit:1,headers:d,onSuccess:(v,u,x)=>{var o,t;let y=(t=(o=u==null?void 0:u.response)==null?void 0:o.data)==null?void 0:t.url;v.code==200?ke({field:"headimg",value:y}).then(()=>{s.info.headimg=y}):(u.status="fail",_e({message:v.msg,type:"error"}))}}}),m=()=>{if(!a.value){_e.error("\u4F1A\u5458\u6635\u79F0\u4E0D\u80FD\u4E3A\u7A7A");return}ke({field:"nickname",value:a.value}).then(d=>{a.modal=!1})};return(d,v)=>{const u=Rt,x=mt,y=ca,o=da,t=St,n=ma,g=ya,k=pa,c=Tt;return h(),F("div",vt,[R("div",yt,[E(u),ea((h(),P(t,{class:"box-card flex-1 ml-4",shadow:"never"},{header:_(()=>[R("div",ht,[R("span",null,j(("t"in d?d.t:e(I))("personageInfo")),1)])]),default:_(()=>[e(p)?(h(),F("div",gt,[E(o,{model:e(p),class:"form-wrap","label-width":"120px"},{default:_(()=>[E(y,{label:("t"in d?d.t:e(I))("memberHeadimg")},{default:_(()=>[R("div",bt,[e(p).headimg?(h(),F("img",{key:1,src:("img"in d?d.img:e(ta))(e(p).headimg),class:"w-[80px] h-[80px]",alt:""},null,8,kt)):(h(),F("img",_t)),E(x,te({class:"avatar-uploader","show-file-list":!1},e(f)),{default:_(()=>[R("span",wt,j(("t"in d?d.t:e(I))("edit")),1)]),_:1},16)])]),_:1},8,["label"]),E(y,{label:("t"in d?d.t:e(I))("nickname")},{default:_(()=>[R("div",xt,[R("span",null,j(a.value),1),R("span",{class:"cursor-pointer text-color",onClick:v[0]||(v[0]=U=>a.modal=!0)},j(("t"in d?d.t:e(I))("edit")),1)])]),_:1},8,["label"])]),_:1},8,["model"])])):$("",!0)]),_:1})),[[c,r.value]]),E(k,{modelValue:a.modal,"onUpdate:modelValue":v[3]||(v[3]=U=>a.modal=U),title:("t"in d?d.t:e(I))("nickname")},{footer:_(()=>[R("span",$t,[E(g,{onClick:v[2]||(v[2]=U=>a.modal=!1)},{default:_(()=>[be(j(("t"in d?d.t:e(I))("cancel")),1)]),_:1}),E(g,{type:"primary",onClick:m},{default:_(()=>[be(j(("t"in d?d.t:e(I))("confirm")),1)]),_:1})])]),default:_(()=>[E(o,{model:e(p)},{default:_(()=>[E(y,null,{default:_(()=>[E(n,{modelValue:a.value,"onUpdate:modelValue":v[1]||(v[1]=U=>a.value=U),autocomplete:"off"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"])])])}}});xe=_a(Ft,[["__scopeId","data-v-b2617264"]])});export{Ea as __tla,xe as default};
|