import"./index-M_JNBppB.js";/* empty css                     *//* empty css                 *//* empty css               *//* empty css                  *//* empty css                     *//* empty css                  *//* empty css                              *//* empty css                  *//* empty css                        *//* empty css                  */import{_ as z}from"./CommonAttr-DJ3ylPmc.js";import{ax as E,r as U,c as n,w as k,B as x,z as p,O as a,u as S,F as t,y as g,I as f}from"./vue-BJk78QHK.js";import{p as C,q as i,b as B,r as I,n as w,s as F,d as O,e as A,c as L,a as M}from"./element-3_pOinej.js";import"./threejs-BafxXW5-.js";import"./utils-YI6ye1sf.js";import"./vxe-Dx3zSILm.js";/* empty css                    */import"./el-tooltip-l0sNRNKZ.js";import"./el-collapse-item-l0sNRNKZ.js";import"./attr-DzN5Wxes.js";/* empty css                   *//* empty css                  *//* empty css                   *//* empty css                    *//* empty css                 *//* empty css                *//* empty css                   *//* empty css                 *//* empty css                */import"./request-CEvu378m.js";const T={class:"attr-list"},cl=Object.assign({name:"SelectAttr"},{__name:"SelectAttr",setup(j){const s=E(),v=U(["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","rgba(255, 69, 0, 0.68)","rgb(255, 120, 0)","rgb(51, 100, 98)","rgb(120, 40, 94, 0.5)","hsl(181, 100%, 37%)","hsla(209, 100%, 56%, 0.73)","rgba(255, 0, 0, 1)"]);n(()=>s.state.curComponent);const e=n(()=>s.state.curComponent.propValue),c=n(()=>s.state.globalKey),y=n(()=>{const u=e.value.globalKey,l=e.value.globalName;return{globalKey:u,globalName:l}});return k(y,u=>{if(u.globalKey&&u.globalName){if(c.value.some(l=>l.globalKey===u.globalKey)){C.confirm("当前变量键值已存在, 是否替换?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{const l=s.state.globalKey.findIndex(r=>r.globalKey===e.value.globalKey);l>-1&&(s.state.globalKey[l].globalKey=u.globalKey,s.state.globalKey[l].globalName=u.globalName),i({type:"success",message:"替换成功"})}).catch(()=>{i({type:"info",message:"已取消"})});return}if(c.value.some(l=>l.globalName===u.globalName)){i({message:"当前变量键名已存在",type:"warning"});return}s.commit("addGlobalKey",{globalKey:e.value.globalKey,globalName:e.value.globalName,globalValue:e.value.value}),i({message:`全局变量(${u.globalName})添加成功`,type:"success"})}},{deep:!0}),(u,l)=>{const r=I,m=B,V=w,_=F,d=A,K=O,b=L,N=M;return p(),x("div",T,[a(S(z)),a(N,{class:"more-form","label-position":"left","label-width":"100px"},{default:t(()=>[a(m,{label:"可清除:"},{default:t(()=>[a(r,{size:"small",modelValue:e.value.clearable,"onUpdate:modelValue":l[0]||(l[0]=o=>e.value.clearable=o)},null,8,["modelValue"])]),_:1}),a(m,{label:"可搜索:"},{default:t(()=>[a(r,{size:"small",modelValue:e.value.filterable,"onUpdate:modelValue":l[1]||(l[1]=o=>e.value.filterable=o)},null,8,["modelValue"])]),_:1}),a(m,{label:"可多选:"},{default:t(()=>[a(r,{size:"small",modelValue:e.value.multiple,"onUpdate:modelValue":l[2]||(l[2]=o=>e.value.multiple=o)},null,8,["modelValue"])]),_:1}),e.value.multiple?(p(),g(m,{key:0,label:"多选最多可选:"},{default:t(()=>[a(V,{size:"small",modelValue:e.value.multipleLimit,"onUpdate:modelValue":l[3]||(l[3]=o=>e.value.multipleLimit=o),step:1,min:0},null,8,["modelValue"])]),_:1})):f("",!0),a(m,{prop:"name",label:"背景颜色:"},{default:t(()=>[a(_,{size:"small",modelValue:e.value.selectStyle.backgroundColor,"onUpdate:modelValue":l[4]||(l[4]=o=>e.value.selectStyle.backgroundColor=o),predefine:v.value,"show-alpha":""},null,8,["modelValue","predefine"])]),_:1}),a(m,{prop:"name",label:"选项文字颜色:"},{default:t(()=>[a(_,{size:"small",modelValue:e.value.selectStyle.color,"onUpdate:modelValue":l[5]||(l[5]=o=>e.value.selectStyle.color=o),predefine:v.value,"show-alpha":""},null,8,["modelValue","predefine"])]),_:1}),a(m,{label:"尺寸:"},{default:t(()=>[a(K,{size:"small",modelValue:e.value.size,"onUpdate:modelValue":l[6]||(l[6]=o=>e.value.size=o),placeholder:"请选择"},{default:t(()=>[a(d,{label:"default",value:"default"}),a(d,{label:"small",value:"small"}),a(d,{label:"large",value:"large"})]),_:1},8,["modelValue"])]),_:1}),a(m,{label:"提示语:"},{default:t(()=>[a(b,{size:"small",modelValue:e.value.placeholder,"onUpdate:modelValue":l[7]||(l[7]=o=>e.value.placeholder=o)},null,8,["modelValue"])]),_:1}),a(m,{label:"全局变量"},{default:t(()=>[a(r,{size:"small",modelValue:e.value.global,"onUpdate:modelValue":l[8]||(l[8]=o=>e.value.global=o)},null,8,["modelValue"])]),_:1}),e.value.global?(p(),g(m,{key:1,label:"变量键值:"},{default:t(()=>[a(b,{size:"small",modelValue:e.value.globalKey,"onUpdate:modelValue":l[9]||(l[9]=o=>e.value.globalKey=o)},null,8,["modelValue"])]),_:1})):f("",!0),e.value.global?(p(),g(m,{key:2,label:"变量名:"},{default:t(()=>[a(b,{size:"small",modelValue:e.value.globalName,"onUpdate:modelValue":l[10]||(l[10]=o=>e.value.globalName=o)},null,8,["modelValue"])]),_:1})):f("",!0)]),_:1})])}}});export{cl as default};
