import{_ as I}from"./index-M_JNBppB.js";/* empty css                  *//* empty css                              *//* empty css                 */import{ax as L,r as c,c as v,B as i,z as s,D as a,M,a7 as R,H as B,u as e,G as E,y as D,L as U,O as y,F,K as P}from"./vue-BJk78QHK.js";import{c as $,s as G,f as H,q as K}from"./element-3_pOinej.js";import"./threejs-BafxXW5-.js";import"./utils-YI6ye1sf.js";import"./vxe-Dx3zSILm.js";const O={class:"edit-table"},j=["onClick"],J={key:1},Q=["onClick"],W={class:"valueTd"},X={key:1},Y={__name:"EditFunnel",setup(Z){const d=L(),k={mounted(l){l.querySelector("input").focus()}},u=c(""),p=c(!1),_=c(""),m=c(null),z=c(["#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)"]),V=v(()=>d.state.curComponent.propValue.series[0].data),r=v({get:()=>V.value,set:l=>{d.commit("updateComponentProperty",{path:"series[0].data",value:l})}}),T=v(()=>d.state.curComponent.propValue.series[0].color),f=v({get:()=>T.value,set:l=>{d.commit("updateComponentProperty",{path:"series[0].color",value:l})}});function N(){p.value=!0}function b(l,o){_.value=o,u.value=l,m.value=l}function C(){p.value=!1,u.value=null}function S(){if(!m.value&&m.value!==0){K.error("请先选择要删除的行");return}const l=m.value;r.value.splice(l,1),f.value.splice(l,1)}function q(){r.value.push({value:"",name:""}),f.value.push("")}return(l,o)=>{const h=$,A=G,g=H;return s(),i("div",O,[o[3]||(o[3]=a("h4",{style:{color:"#66b1ff","margin-bottom":"10px"}}," 数据 ",-1)),a("table",{onDblclick:N},[a("tbody",null,[o[0]||(o[0]=a("tr",{style:{color:"#66b1ff",height:"40px"}},[a("th",null,"name"),a("th",null,"value/color")],-1)),(s(!0),i(M,null,R(e(V),(x,t)=>(s(),i("tr",{key:t},[a("td",{class:B({selected:e(u)===t}),onClick:n=>b(t,"name")},[e(p)&&e(u)===t&&e(_)==="name"?E((s(),D(h,{key:0,modelValue:e(r)[t].name,"onUpdate:modelValue":n=>e(r)[t].name=n,onBlur:C},null,8,["modelValue","onUpdate:modelValue"])),[[k]]):(s(),i("span",J,U(x.name),1))],10,j),a("td",{class:B({selected:e(u)===t}),onClick:n=>b(t,"value")},[a("div",W,[e(p)&&e(u)===t&&e(_)==="value"?E((s(),D(h,{key:0,modelValue:e(r)[t].value,"onUpdate:modelValue":n=>e(r)[t].value=n,onBlur:C},null,8,["modelValue","onUpdate:modelValue"])),[[k]]):(s(),i("span",X,U(x.value),1)),y(A,{modelValue:e(f)[t],"onUpdate:modelValue":n=>e(f)[t]=n,predefine:e(z),"show-alpha":""},null,8,["modelValue","onUpdate:modelValue","predefine"])])],10,Q)]))),128))])],32),a("div",null,[y(g,{type:"primary",size:"small",onClick:q},{default:F(()=>o[1]||(o[1]=[P(" 添加 ")])),_:1}),y(g,{type:"danger",size:"small",onClick:S},{default:F(()=>o[2]||(o[2]=[P(" 删除 ")])),_:1})])])}}},re=I(Y,[["__scopeId","data-v-ea095d8e"]]);export{re as default};
