2 lines
5.5 KiB
JavaScript
2 lines
5.5 KiB
JavaScript
import{o as R,q as s,O as i,D as t,v as l,bg as S,s as o,bc as q,u as p,bf as A,L as _,P as x,r as b,bQ as G,F as K,b6 as L,b7 as P,I as Q,K as T,b9 as H,p as J,cm as E}from"./.pnpm-BGZW0UGg.js";import{_ as M}from"./index-B1H9vJ5g.js";import{c as W,i as h,_ as X}from"./index-CeIwrh_6.js";import{_ as Y}from"./picker-a35ae8-7.js";import{_ as Z}from"./picker-y_fNEf57.js";import"./index-BeJT5uVo.js";import"./index.vue_vue_type_script_setup_true_lang-ByFSC-yR.js";import"./article-BXBM4mti.js";import"./usePaging-C4oc3vBq.js";import"./index-DjAC1tO-.js";import"./index-TD4t951S.js";import"./file-tQw_m7Aj.js";import"./index.vue_vue_type_script_setup_true_lang-DBx_F7yj.js";const ee={class:"flex items-end"},te={key:0,class:"text-xs text-tx-secondary ml-2"},le={key:1,class:"text-xs text-tx-secondary ml-2"},oe={class:"flex-1"},ae={class:"bg-fill-light w-full p-4 mt-4"},ne={class:"flex justify-center w-[467px]"},se={class:"flex-1"},de={class:"flex-1 flex items-center"},me={class:"drag-move cursor-move ml-auto"},ue={key:0,class:"mt-4"},y=5,ie=R({__name:"attr",props:{content:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})},type:{type:String,default:"mobile"}},emits:["update:content"],setup(d,{emit:C}){const g=C,f=d,c=J({get:()=>f.content,set:m=>{g("update:content",m)}}),B=()=>{var m;if(((m=f.content.data)==null?void 0:m.length)<y){const e=E(f.content);e.data.push({is_show:"1",image:"",bg:"",name:"",link:{}}),g("update:content",e)}else h.msgError(`最多添加${y}张图片`)},D=m=>{var u;if(((u=f.content.data)==null?void 0:u.length)<=1)return h.msgError("最少保留一张图片");const e=E(f.content);e.data.splice(m,1),g("update:content",e)};return(m,e)=>{const u=A,k=q,V=S,v=Z,F=Y,I=P,w=L,N=Q,$=W,j=M,z=T,O=H;return s(),i(O,{"label-width":"70px"},{default:t(()=>[l(V,{shadow:"never",class:"!border-none flex mt-2"},{default:t(()=>[e[5]||(e[5]=o("div",{class:"flex items-end mb-4"},[o("div",{class:"text-base dark:text-[#ffffff] text-[#101010] font-medium"},"展示样式")],-1)),l(k,{modelValue:p(c).style,"onUpdate:modelValue":e[0]||(e[0]=r=>p(c).style=r)},{default:t(()=>[l(u,{value:1},{default:t(()=>[...e[3]||(e[3]=[_("常规",-1)])]),_:1}),l(u,{value:2},{default:t(()=>[...e[4]||(e[4]=[_("大屏",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),d.content.style==1?(s(),i(V,{key:0,shadow:"never",class:"!border-none flex mt-2"},{default:t(()=>[e[8]||(e[8]=o("div",{class:"flex items-end mb-4"},[o("div",{class:"text-base text-[#101010] dark:text-[#ffffff] font-medium"},"背景联动")],-1)),l(k,{modelValue:p(c).bg_style,"onUpdate:modelValue":e[1]||(e[1]=r=>p(c).bg_style=r)},{default:t(()=>[l(u,{value:1},{default:t(()=>[...e[6]||(e[6]=[_("开启",-1)])]),_:1}),l(u,{value:0},{default:t(()=>[...e[7]||(e[7]=[_("关闭",-1)])]),_:1})]),_:1},8,["modelValue"]),e[9]||(e[9]=o("div",{class:"p-[15px] rounded-[8px] bg-[#f3f8ff] text-[#136bdf] mt-2"}," 开启背景联动后,需为轮播图设置背景图,轮播图切换时,背景图也跟随切换,此时该页面自身的“页面背景“设置将失效。 ",-1))]),_:1})):x("",!0),l(V,{shadow:"never",class:"!border-none flex-1 mt-2"},{default:t(()=>{var r;return[o("div",ee,[e[10]||(e[10]=o("div",{class:"text-base text-[#101010] dark:text-[#ffffff] font-medium"},"轮播图片",-1)),d.content.style==1?(s(),b("div",te," 最多添加5张,建议图片尺寸:750px*340px ")):(s(),b("div",le," 最多添加5张,建议图片尺寸:750px*1100px "))]),o("div",oe,[l(p(G),{class:"draggable",modelValue:p(c).data,"onUpdate:modelValue":e[2]||(e[2]=a=>p(c).data=a),animation:"300",handle:".drag-move","item-key":"index"},{item:t(({element:a,index:U})=>[(s(),i(j,{key:U,onClose:n=>D(U),class:"w-full"},{default:t(()=>[o("div",ae,[o("div",ne,[d.content.style==1?(s(),b(K,{key:0},[l(v,{size:"122px",modelValue:a.image,"onUpdate:modelValue":n=>a.image=n,"upload-class":"bg-body","exclude-domain":""},{upload:t(()=>[...e[11]||(e[11]=[o("div",{class:"w-[122px] h-[122px] banner-upload-btn"}," 轮播图 ",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"]),d.content.style==1||d.content.bg_style==1?(s(),i(v,{key:0,class:"ml-[40px]",size:"122px",modelValue:a.bg,"onUpdate:modelValue":n=>a.bg=n,"upload-class":"bg-body","exclude-domain":""},{upload:t(()=>[...e[12]||(e[12]=[o("div",{class:"w-[122px] h-[122px] banner-upload-btn"}," 背景图 ",-1)])]),_:1},8,["modelValue","onUpdate:modelValue"])):x("",!0)],64)):(s(),i(v,{key:1,width:"396px",height:"196px",modelValue:a.image,"onUpdate:modelValue":n=>a.image=n,"upload-class":"bg-body","exclude-domain":""},null,8,["modelValue","onUpdate:modelValue"]))]),o("div",se,[l(w,{class:"mt-[18px]",label:"图片链接"},{default:t(()=>[d.type=="mobile"?(s(),i(F,{key:0,modelValue:a.link,"onUpdate:modelValue":n=>a.link=n},null,8,["modelValue","onUpdate:modelValue"])):x("",!0),d.type=="pc"?(s(),i(I,{key:1,placeholder:"请输入链接",modelValue:a.link.path,"onUpdate:modelValue":n=>a.link.path=n},null,8,["modelValue","onUpdate:modelValue"])):x("",!0)]),_:2},1024),l(w,{label:"是否显示",class:"mt-[18px] !mb-0"},{default:t(()=>[o("div",de,[l(N,{modelValue:a.is_show,"onUpdate:modelValue":n=>a.is_show=n,"active-value":"1","inactive-value":"0"},null,8,["modelValue","onUpdate:modelValue"]),o("div",me,[l($,{name:"el-icon-Rank",size:"18"})])])]),_:2},1024)])])]),_:2},1032,["onClose"]))]),_:1},8,["modelValue"])]),((r=d.content.data)==null?void 0:r.length)<y?(s(),b("div",ue,[l(z,{class:"w-full",type:"primary",onClick:B},{default:t(()=>[...e[13]||(e[13]=[_("添加图片",-1)])]),_:1})])):x("",!0)]}),_:1})]),_:1})}}}),Ue=X(ie,[["__scopeId","data-v-3e6394fe"]]);export{Ue as default};
|