import{_ as l,r as e,c as a,d as o,e as t,f as d,g as s,i,h as n,a7 as u,k as m,j as c,an as r,n as p,p as f,q as b,t as _,v as V}from"./index.286e9b79.js";import{E as k}from"./color-picker.cdffbfcf.js";import{E as j}from"./input.31de1b37.js";import{E as v,a as h}from"./form.ad10dcd5.js";import{E as y}from"./col.5ff06cbd.js";import"./form-item.9355e6dc.js";import{_ as g}from"./select-link.eae2b688.js";import{d as x}from"./vuedraggable.umd.cd2b1285.js";import"./position.1bd00850.js";import"./event.776e7e11.js";import"./debounce.caafe00b.js";import"./index.ed3ed02e.js";import"./_initCloneObject.fb8fbaea.js";import"./dialog.ec9503d2.js";import"./overlay.2c1583ac.js";import"./scroll.a50153b5.js";import"./table-column.7b4f59a2.js";import"./_baseIteratee.9ead53a1.js";import"./isEqual.57d72c4a.js";import"./checkbox.f06171a4.js";/* empty css            */import"./loading.c49775a6.js";import"./http.f588794f.js";import"./pagination.22bb50f6.js";import"./select.297a82d5.js";import"./index.27150c7e.js";import"./token.34cb8214.js";import"./strings.8c60bfae.js";const C=l=>(_("data-v-9227183b"),l=l(),V(),l),w={class:"widget-title"},U=C((()=>n("div",null,"公告",-1))),E={key:0,class:"content"},q={class:"content-wrap"},z={class:"nav-item"},A=["onClick"],I={class:"nav-box"},O={key:1,class:"content"},R={class:"content-wrap"},S=C((()=>n("div",{class:"attribute-item"},[n("div",{class:"attr-title flex"},"颜色设置")],-1))),B=l({__name:"panel",props:{modelValue:{type:[Object,Array],default:{}}},emits:["update:modelValue"],setup(l,{emit:_}){const V=l;let C=e(0);const B=l=>{C.value=l};let D=e(0),F=e(!1);const G=l=>{V.modelValue.list[D.value].link=l,F.value=!1},H=()=>{if(V.modelValue.list.length>=20)return!1;V.modelValue.list.push({title:"公告内容",link:{}})},J=l=>{D.value=l,F.value=!0};return(l,e)=>{const _=g,D=a("Close"),K=f,L=j,M=v,N=a("ArrowRight"),P=b,Q=y,T=h,W=k;return o(),t("div",null,[d(_,{modelValue:s(F),"onUpdate:modelValue":e[0]||(e[0]=l=>i(F)?F.value=l:F=l),onSelected:G},null,8,["modelValue"]),n("div",w,[U,n("div",null,[n("span",{onClick:e[1]||(e[1]=l=>B(0)),class:u({active:0==s(C)})},"内容",2),n("span",{onClick:e[2]||(e[2]=l=>B(1)),class:u({active:1==s(C)})},"样式",2)])]),0==s(C)?(o(),t("div",E,[d(T,{"label-position":"left"},{default:m((()=>[n("div",q,[d(s(x),{class:"nav-wrap",list:V.modelValue.list,"item-key":"name",animation:"150"},{item:m((({element:l,index:e})=>[n("div",z,[n("div",{class:"close",onClick:l=>(l=>{V.modelValue.list.splice(l,1)})(e)},[d(K,null,{default:m((()=>[d(D)])),_:1})],8,A),n("div",I,[n("div",null,[d(M,{label:"标题"},{default:m((()=>[d(L,{modelValue:l.title,"onUpdate:modelValue":e=>l.title=e,placeholder:"请输入标题",style:{width:"100%"}},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),d(M,{label:"链接"},{default:m((()=>[d(L,{onClick:l=>J(e),modelValue:l.link.name,"onUpdate:modelValue":e=>l.link.name=e,readonly:"readonly",placeholder:"请选择跳转链接",style:{width:"100%"}},{append:m((()=>[d(P,{size:"small"},{default:m((()=>[null==l.link.path?(o(),c(K,{key:0,onClick:l=>J(e)},{default:m((()=>[d(N)])),_:2},1032,["onClick"])):r("",!0),null!=l.link.path?(o(),c(K,{key:1,onClick:e=>l.link={}},{default:m((()=>[d(D)])),_:2},1032,["onClick"])):r("",!0)])),_:2},1024)])),_:2},1032,["onClick","modelValue","onUpdate:modelValue"])])),_:2},1024)])])])])),_:1},8,["list"]),d(M,null,{default:m((()=>[d(Q,{span:24},{default:m((()=>[d(P,{size:"default",style:{width:"100%"},onClick:H},{default:m((()=>[p("添加数据")])),_:1})])),_:1})])),_:1})])])),_:1})])):r("",!0),1==s(C)?(o(),t("div",O,[d(T,{"label-position":"left"},{default:m((()=>[n("div",R,[S,d(M,{label:"背景颜色","label-width":"100px"},{default:m((()=>[d(Q,{span:4},{default:m((()=>[d(W,{modelValue:V.modelValue.background_color,"onUpdate:modelValue":e[3]||(e[3]=l=>V.modelValue.background_color=l),tabindex:"1111111111"},null,8,["modelValue"])])),_:1}),d(Q,{span:15},{default:m((()=>[d(L,{modelValue:V.modelValue.background_color,"onUpdate:modelValue":e[4]||(e[4]=l=>V.modelValue.background_color=l),placeholder:"请输入颜色"},null,8,["modelValue"])])),_:1}),d(Q,{span:1}),d(Q,{span:4},{default:m((()=>[d(P,{type:"primary",onClick:e[5]||(e[5]=l=>V.modelValue.background_color="#ffffff"),link:""},{default:m((()=>[p("重置")])),_:1})])),_:1})])),_:1}),d(M,{label:"文字颜色","label-width":"100px"},{default:m((()=>[d(Q,{span:4},{default:m((()=>[d(W,{modelValue:V.modelValue.text_color,"onUpdate:modelValue":e[6]||(e[6]=l=>V.modelValue.text_color=l)},null,8,["modelValue"])])),_:1}),d(Q,{span:15},{default:m((()=>[d(L,{modelValue:V.modelValue.text_color,"onUpdate:modelValue":e[7]||(e[7]=l=>V.modelValue.text_color=l),placeholder:"请输入颜色"},null,8,["modelValue"])])),_:1}),d(Q,{span:1}),d(Q,{span:4},{default:m((()=>[d(P,{type:"primary",onClick:e[8]||(e[8]=l=>V.modelValue.text_color="#333333"),link:""},{default:m((()=>[p("重置")])),_:1})])),_:1})])),_:1})])])),_:1})])):r("",!0)])}}},[["__scopeId","data-v-9227183b"]]);export{B as default};
