import{U as b,a2 as f,ad as g,ag as h,d as y,f as v}from"./vue-vendor-CxLCUzY4.js";import{c9 as x,bp as l}from"./index-B_2CoVdl.js";import{L as S}from"./useTableSync-f6089e8a-C0I0aLzD.js";import"./cgform.data-475d4984-tpXfdvoZ.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./vxe-table-vendor-B5h3MVdD.js";const R=y({name:"IndexTable",components:{},props:{actionButton:{type:Boolean,default:!0,required:!1}},setup(){const e=v([{title:"索引名称",key:"indexName",width:330,type:l.input,defaultValue:"",placeholder:"请输入${title}",validateRules:[{required:!0,message:"${title}不能为空"}]},{title:"索引栏位",key:"indexField",width:330,type:l.selectMultiple,options:[],defaultValue:"",placeholder:"请选择${title}",validateRules:[{required:!0,message:"请选择${title}"}]},{title:"索引类型",key:"indexType",width:330,type:l.select,options:[{title:"normal",value:"normal"},{title:"unique",value:"unique"}],defaultValue:"normal",placeholder:"请选择${title}",validateRules:[{required:!0,message:"请选择${title}"}]}]),o=S(e),{tableRef:i,loading:r,dataSource:n,tableHeight:d,tableProps:t,setDataSource:s,validateData:p}=o;function m(c){let u=[];c.value.tableRef.getTableData().forEach(a=>{a.dbFieldName&&u.push({title:a.dbFieldTxt,value:a.dbFieldName})}),e.value[1].options=u}return{tableRef:i,loading:r,dataSource:n,columns:e,tableHeight:d,tableProps:t,syncTable:m,setDataSource:s,validateData:p}}});function T(e,o,i,r,n,d){const t=b("JVxeTable");return f(),g(t,h({ref:"tableRef",rowNumber:"",rowSelection:"",dragSort:"",keyboardEdit:"",sortKey:"orderNum",maxHeight:e.tableHeight.normal,loading:e.loading,columns:e.columns,dataSource:e.dataSource,toolbar:e.actionButton},e.tableProps),null,16,["maxHeight","loading","columns","dataSource","toolbar"])}const H=x(R,[["render",T]]);export{H as default};
