niucloud-admin/niucloud/public/admin/assets/edit-member-level-a91f0ebb.js
全栈小学生 c665981070 up
2025-05-23 14:56:18 +08:00

2 lines
3.0 KiB
JavaScript

import{d as D,l as v,r as F,M as T,h as p,c as u,J as f,a7 as b,u as o,a as l,t as c,k as m,e as n,w as i,i as g,F as C,S as z,n as $,z as A,b as I,P as L,G as M,H as O,E as P,R as U}from"./index-08dd4327.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";import{u as G}from"./diy-84497d46.js";const H={class:"content-wrap"},J={class:"edit-attr-item-wrap"},q={class:"mb-[10px]"},K={class:"flex flex-wrap"},Q=["onClick"],W=["src"],X={class:"dialog-footer"},Y={class:"style-wrap"},Z=D({__name:"edit-member-level",setup(ee,{expose:h}){const e=G();e.editComponent.ignore=["componentBgColor","componentBgUrl"];const s=v({title:e.editComponent.styleName,value:e.editComponent.style}),r=F(!1),x=()=>{r.value=!0,s.title=e.editComponent.styleName,s.value=e.editComponent.style},w=v([{url:"static/resource/images/diy/member/member_level_style1.jpg",title:"风格1",value:"style-1"},{url:"static/resource/images/diy/member/member_level_style2.png",title:"风格2",value:"style-2"},{url:"static/resource/images/diy/member/member_level_style3.jpg",title:"风格3",value:"style-3"},{url:"static/resource/images/diy/member/member_level_style4.png",title:"风格4",value:"style-4"},{url:"static/resource/images/diy/member/member_level_style5.png",title:"风格5",value:"style-5"}]),S=t=>{s.title=t.title,s.value=t.value},R=()=>{e.editComponent.styleName=s.title,e.editComponent.style=s.value,k(e.editComponent.style),r.value=!1},k=t=>{t=="style-1"||t=="style-2"?(e.editComponent.bottomRounded=0,e.editComponent.topRounded=12):(t=="style-3"||t=="style-4"||t=="style-5")&&(e.editComponent.bottomRounded=12,e.editComponent.topRounded=12)};return h({}),(t,d)=>{const E=T("ArrowRight"),N=L,B=M,V=O,_=P,j=U;return p(),u(C,null,[f(l("div",H,[l("div",J,[l("h3",q,c(o(m)("selectStyle")),1),n(V,{"label-width":"80px",class:"px-[10px]"},{default:i(()=>[n(B,{label:o(m)("selectStyle"),class:"flex"},{default:i(()=>[l("span",{class:"text-primary flex-1 cursor-pointer",onClick:x},c(o(e).editComponent.styleName),1),n(N,null,{default:i(()=>[n(E)]),_:1})]),_:1},8,["label"])]),_:1}),n(j,{modelValue:r.value,"onUpdate:modelValue":d[1]||(d[1]=a=>r.value=a),title:o(m)("selectStyle"),width:"660px"},{footer:i(()=>[l("span",X,[n(_,{onClick:d[0]||(d[0]=a=>r.value=!1)},{default:i(()=>[g(c(o(m)("cancel")),1)]),_:1}),n(_,{type:"primary",onClick:R},{default:i(()=>[g(c(o(m)("confirm")),1)]),_:1})])]),default:i(()=>[l("div",K,[(p(!0),u(C,null,z(w,(a,y)=>(p(),u("div",{key:y,class:$([{"border-primary":s.value==a.value,"!mr-[0]":[(y+1)%3]==0},"flex my-[5px] items-center justify-center overflow-hidden w-[200px] h-[100px] mr-[12px] cursor-pointer border bg-gray-50"]),onClick:te=>S(a)},[l("img",{src:o(A)(a.url)},null,8,W)],10,Q))),128))])]),_:1},8,["modelValue","title"])])],512),[[b,o(e).editTab=="content"]]),f(l("div",Y,[I(t.$slots,"style")],512),[[b,o(e).editTab=="style"]])],64)}}}),me=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"}));export{me as _};