import"./index-M_JNBppB.js";/* empty css                     *//* empty css                 *//* empty css               *//* empty css                  *//* empty css                     *//* empty css                  *//* empty css                              *//* empty css                  *//* empty css                  */import{_ as x}from"./CommonAttr-DJ3ylPmc.js";import{ax as z,r as k,c as b,w as E,B as U,z as g,O as a,u as o,F as m,y as c,I as y}from"./vue-BJk78QHK.js";/* empty css                       *//* empty css                   */import{p as B,q as i,b as C,r as S,s as I,d as T,e as w,c as F,a as O}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";/* empty css                        */import"./attr-DzN5Wxes.js";/* empty css                   *//* empty css                  *//* empty css                    *//* empty css                 *//* empty css                *//* empty css                   *//* empty css                 *//* empty css                */import"./request-CEvu378m.js";const P={class:"attr-list"},cl=Object.assign({name:"TimePickerAttr"},{__name:"TimePickerAttr",setup(A){const u=z(),_=k(["#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)"]),e=b(()=>u.state.curComponent.propValue),f=b(()=>u.state.globalKey),V=b(()=>{const s=e.value.globalKey,l=e.value.globalName;return{globalKey:s,globalName:l}});return E(V,s=>{if(s.globalKey&&s.globalName){if(f.value.some(l=>l.globalKey===s.globalKey)){B.confirm("当前变量键值已存在, 是否替换?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{const l=u.state.globalKey.findIndex(n=>n.globalKey===e.value.globalKey);l>-1&&(u.state.globalKey[l].globalKey=s.globalKey,u.state.globalKey[l].globalName=s.globalName),i({type:"success",message:"替换成功"})}).catch(()=>{i({type:"info",message:"已取消"})});return}if(f.value.some(l=>l.globalName===s.globalName)){i({message:"当前变量键名已存在",type:"warning"});return}u.commit("addGlobalKey",{globalKey:e.value.globalKey,globalName:e.value.globalName,globalValue:e.value.value}),i({message:`全局变量(${s.globalName})添加成功`,type:"success"})}},{deep:!0}),(s,l)=>{const n=S,r=C,K=I,d=w,N=T,p=F,v=O;return g(),U("div",P,[a(o(x)),a(v,{class:"more-form","label-position":"left","label-width":"100px"},{default:m(()=>[a(r,{label:"可清除:"},{default:m(()=>[a(n,{size:"small",modelValue:o(e).clearable,"onUpdate:modelValue":l[0]||(l[0]=t=>o(e).clearable=t)},null,8,["modelValue"])]),_:1}),a(r,{label:"时间范围:"},{default:m(()=>[a(n,{size:"small",modelValue:o(e).range,"onUpdate:modelValue":l[1]||(l[1]=t=>o(e).range=t)},null,8,["modelValue"])]),_:1}),a(r,{prop:"name",label:"背景颜色:"},{default:m(()=>[a(K,{modelValue:o(e).selectStyle.backgroundColor,"onUpdate:modelValue":l[2]||(l[2]=t=>o(e).selectStyle.backgroundColor=t),predefine:o(_),"show-alpha":""},null,8,["modelValue","predefine"])]),_:1}),a(r,{label:"尺寸:"},{default:m(()=>[a(N,{size:"small",modelValue:o(e).size,"onUpdate:modelValue":l[3]||(l[3]=t=>o(e).size=t),placeholder:"请选择"},{default:m(()=>[a(d,{label:"default",value:"default"}),a(d,{label:"small",value:"small"}),a(d,{label:"large",value:"large"})]),_:1},8,["modelValue"])]),_:1}),a(r,{label:"格式"},{default:m(()=>[a(p,{size:"small",modelValue:o(e).format,"onUpdate:modelValue":l[4]||(l[4]=t=>o(e).format=t),type:"text"},null,8,["modelValue"])]),_:1}),a(r,{label:"默认值"},{default:m(()=>[a(p,{size:"small",modelValue:o(e).value,"onUpdate:modelValue":l[5]||(l[5]=t=>o(e).value=t),type:"text"},null,8,["modelValue"])]),_:1}),a(r,{label:"提示语:"},{default:m(()=>[a(p,{size:"small",modelValue:o(e).placeholder,"onUpdate:modelValue":l[6]||(l[6]=t=>o(e).placeholder=t)},null,8,["modelValue"])]),_:1}),a(r,{label:"全局变量"},{default:m(()=>[a(n,{size:"small",modelValue:o(e).global,"onUpdate:modelValue":l[7]||(l[7]=t=>o(e).global=t)},null,8,["modelValue"])]),_:1}),o(e).global?(g(),c(r,{key:0,label:"变量键值:"},{default:m(()=>[a(p,{size:"small",modelValue:o(e).globalKey,"onUpdate:modelValue":l[8]||(l[8]=t=>o(e).globalKey=t)},null,8,["modelValue"])]),_:1})):y("",!0),o(e).global?(g(),c(r,{key:1,label:"变量名:"},{default:m(()=>[a(p,{size:"small",modelValue:o(e).globalName,"onUpdate:modelValue":l[9]||(l[9]=t=>o(e).globalName=t)},null,8,["modelValue"])]),_:1})):y("",!0)]),_:1})])}}});export{cl as default};
