niucloud-admin/niucloud/public/admin/assets/edit-member-level-ae4725b5.js
全栈小学生 eff269ab88 up
2025-09-20 09:12:11 +08:00

2 lines
3.0 KiB
JavaScript

import{d as D,l as f,r as T,N as F,h as p,c as u,J as b,ae as C,u as o,a as l,t as c,k as m,e as n,w as i,i as g,F as h,T as z,n as $,z as A,b as I,Q as L,G as O,H as U,E as G,S as H}from"./index-9f163f98.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";import{u as J}from"./diy-700f9c59.js";const M={class:"content-wrap"},P={class:"edit-attr-item-wrap"},Q={class:"mb-[10px]"},q={class:"flex flex-wrap"},K=["onClick"],W=["src"],X={class:"dialog-footer"},Y={class:"style-wrap"},Z=D({__name:"edit-member-level",setup(ee,{expose:x}){const e=J();e.editComponent.ignore=["componentBgColor","componentBgUrl"];const s=f({title:e.editComponent.styleName,value:e.editComponent.style}),r=T(!1),_=()=>{r.value=!0,s.title=e.editComponent.styleName,s.value=e.editComponent.style},w=f([{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 x({}),(t,d)=>{const N=F("ArrowRight"),E=L,B=O,V=U,y=G,j=H;return p(),u(h,null,[b(l("div",M,[l("div",P,[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:_},c(o(e).editComponent.styleName),1),n(E,{onClick:_,class:"cursor-pointer"},{default:i(()=>[n(N)]),_: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(y,{onClick:d[0]||(d[0]=a=>r.value=!1)},{default:i(()=>[g(c(o(m)("cancel")),1)]),_:1}),n(y,{type:"primary",onClick:R},{default:i(()=>[g(c(o(m)("confirm")),1)]),_:1})])]),default:i(()=>[l("div",q,[(p(!0),u(h,null,z(w,(a,v)=>(p(),u("div",{key:v,class:$([{"border-primary":s.value==a.value,"!mr-[0]":[(v+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,K))),128))])]),_:1},8,["modelValue","title"])])],512),[[C,o(e).editTab=="content"]]),b(l("div",Y,[I(t.$slots,"style")],512),[[C,o(e).editTab=="style"]])],64)}}}),me=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"}));export{me as _};