import{aK as f}from"./index.17037962789732.js";import"./index.1703796278973305.js";import"./index.170379627897315.js";import"./index.170379627897317.js";import"./index.1703796278973301.js";import"./index.1703796278973302.js";import"./index.170379627897332.js";import"./index.1703796278973303.js";import"./index.170379627897339.js";import"./index.170379627897316.js";import"./index.170379627897314.js";import"./index.1703796278973304.js";import{_ as b}from"./FunctionItem.vue_vue_type_script_setup_true_lang.17037962789732.js";import{d as h,k as x,w as I,o,c as i,a as k,x as c,A as d,u as w}from"./vue.1703796278973.js";const T={key:0},A={key:1},G=h({__name:"EditTable",props:{value:{type:Array,default:()=>{}},builtInList:{type:Array,default:()=>[]},functions:{type:Array,default:()=>[]}},emits:["update:value"],setup(l,{emit:m}){const p=l,v=[{title:"参数名称",dataIndex:"name",with:"33%"},{title:"类型",dataIndex:"valueType",with:"33%"},{title:"值",dataIndex:"value",with:"34%"}],s=x([]);I(()=>{const n=(p.functions||[]).map(a=>{var e;const u=((e=p.value)==null?void 0:e.find(r=>r.name===(a==null?void 0:a.id)))||{};return{...a,...u,name:a.name}});s.value=n});const y=()=>{const n=[...s.value].map(a=>({name:a.id,source:a.source,upperKey:a.upperKey||a.value,value:a.value}));m("update:value",n)};return(n,a)=>{const u=f;return o(),i(u,{rowKey:"id",columns:v,"data-source":w(s),bordered:"",pagination:!1},{bodyCell:k(({column:e,text:r,record:t})=>[e.dataIndex==="name"?(o(),c("span",T,d(r),1)):e.dataIndex==="valueType"?(o(),c("span",A,d(t.valueType.type),1)):(o(),i(b,{key:2,builtInList:l.builtInList,onChange:y,source:t.source,data:t,value:t.value,"onUpdate:value":_=>t.value=_},null,8,["builtInList","source","data","value","onUpdate:value"]))]),_:1},8,["data-source"])}}});export{G as _};
