You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
32 KiB
2 lines
32 KiB
|
1 year ago
|
import{d as ue,r as G,e as Z,o as Te,a as d,g as E,w as s,l as t,x as D,u as O,a7 as Re,c as L,f as te,F as H,b as p,j as W,B as Ie,m as S,a1 as Ue,I as pe,G as Ee,t as le,k as K,J as Se,L as $e,z as be,A as he,n as ne,v as De,y as re,a5 as Me,a3 as ye,_ as ze,a4 as Ae,a8 as ke,V as Oe,D as _e,a9 as je,X as qe,W as we,q as Be,S as xe,E as Fe,h as Xe,C as Ye,p as We}from"./index-ea7eee8a.js";import{_ as Ge,a as Ke}from"./vueFile.vue_vue_type_script_setup_true_lang-db7b0571.js";import{_ as Ne}from"./aceDrawer.vue_vue_type_script_setup_true_lang-74ddf302.js";import{g as Pe,a as He}from"./getData-8e3ed6b9.js";const Je=["bg.jpg","bg2.jpg","bg3.jpg","head_bg.png"],Qe=[],Ze=[],de={bg:Je,border:Qe,img:Ze},el={class:"img-list"},ll=["onClick"],tl=["src"],ol={key:0},nl=ue({__name:"upload",emits:["click"],setup(M,{expose:R,emit:b}){const f=G(!1),i=G(),z=G("bg"),e=Z(()=>{if(!de)return[];const g=[];for(const C in de)g.push(C);return g}),F=Z(()=>z.value.name==="upload"?[]:de?de[z.value]:[]),w=Z(()=>`./static/screen/${z.value}/`),T=g=>{f.value=!1,b("click",w.value+g,i.value)},u=g=>{z.value="upload",Ie(()=>{F.value.unshift(g.path)})};return R({open:(g,C)=>{f.value=!0,i.value=C,g?z.value=g:z.value=e.value[0]}}),Te(()=>{}),(g,C)=>{const v=S("el-button"),Y=S("el-upload"),U=S("el-tab-pane"),Q=S("el-tabs"),ee=S("el-dialog");return d(),E(ee,{modelValue:f.value,"onUpdate:modelValue":C[1]||(C[1]=A=>f.value=A),width:"800px",title:"选择上传图片"},{default:s(()=>{var A;return[t(Y,{action:O(Re),"on-success":u,"show-file-list":!1},{default:s(()=>[t(v,{type:"primary"},{default:s(()=>[D("上传")]),_:1})]),_:1},8,["action"]),t(Q,{modelValue:z.value,"onUpdate:modelValue":C[0]||(C[0]=j=>z.value=j)},{default:s(()=>[(d(!0),L(H,null,te(O(e),j=>(d(),E(U,{label:j,name:j,key:j},null,8,["label","name"]))),128)),t(U,{label:"上传",name:"upload"})]),_:1},8,["modelValue"]),p("div",el,[p("ul",null,[(d(!0),L(H,null,te(O(F),j=>(d(),L("li",{key:j,onClick:oe=>T(j)},[p("img",{src:O(w)+j,alt:""},null,8,tl)],8,ll))),128))]),(A=O(F))!=null&&A.length?W("",!0):(d(),L("p",ol," 暂无相关素材资源 "))])]}),_:1},8,["modelValue"])}}});const al=Ue(nl,[["__scopeId","data-v-7ebb50b6"]]),sl={key:0},il=p("h3",null,"接口数据处理事件",-1),cl=p("h3",null,"全局数据",-1),rl=p("h3",null,"接口数据处理事件",-1),ul=ue({__name:"configControl",props:{config:null},emits:["update:config","openDrawer","update"],setup(M,{expose:R,emit:b}){const f=M,i=G({}),z=G(),e=Z(()=>i.value.type),F=c=>{b("update:config",Object.assign({},f.config,c))},w=pe({bgColor:"",bgLinear:"",bgAngle:0,bgUpload:"",bgSelect:""});Ee(()=>f.config,c=>{if(!Object.keys(i.value).length){const o=c.background||"";if(o.indexOf("url")!==-1){const V=new RegExp("(?<=url\\()(.*?)(?=\\))","g"),x=o.match(V);Object.assign(w,{bgUpload:x,bgSelect:3})}else if(o.indexOf("linear")!==-1){const x=o.substring(o.indexOf("(")+1,o.lastIndexOf(")")).split(/,(?![^(]*\))(?![^"']*["'](?:[^"']*["'][^"']*["'])*[^"']*$)/);Object.assign(w,{bgColor:x[1].trim(),bgLinear:x[2].trim(),bgAngle:Number(x[0].replace("deg","")),bgSelect:2})}else Object.assign(w,{bgColor:o,bgSelect:1})}},{immediate:!0});const T=()=>{let c="";switch(w.bgSelect){case 1:c=w.bgColor;break;case 2:c=`linear-gradient(${w.bgAngle}deg, ${w.bgColor}, ${w.bgLinear})`;break;case 3:c=`url(${w.bgUpload})`;break}u("background",c)},u=(c,o)=>{F({[c]:o})},$=c=>{i.value=c},g=Z(()=>{var c,o,V,x;if(Object.keys(i.value).length){const{config:y={},position:r,type:N}=i.value;return[{type:"group",title:"位置信息"},{label:"width",value:r.width,placeholder:"请输入宽度",key:"width",path:"position"},{label:"height",value:r.height,placeholder:"请输入高度",key:"height",path:"position"},{type:"number",label:"left",value:r.left,placeholder:"图层位置",key:"left",path:"position"},{type:"number",label:"top",value:r.top,key:"top",path:"position"},{type:"number",label:"right",value:r.right,placeholder:"设置后left为auto",key:"right",path:"position"},{type:"number",label:"bottom",value:r.bottom,placeholder:"设置后top为auto",key:"bottom",path:"position"},{type:"number",l
|