增行方法:handleAddColumn()
删行方法:handleDeleteColumn(selectedRows)
<template>
<a-card :bordered="false">
<a-form @submit="handleSubmit" :form="form">
<a-tabs @change="callback" defaultActiveKey="2" type="card">
<a-tab-pane tab="基本信息" key="1">
<basic-info-form ref="basicinfo" :showSubmit="false" :info="info" />
</a-tab-pane>
<a-tab-pane tab="字段信息" key="2">
<a-button icon="plus" type="primary" @click="handleAddColumn">增行</a-button>
<a-button icon="minus" type="danger" @click="handleDeleteColumn(selectedRows)">删行</a-button>
<a-table
:pagination="false"
:columns="columns"
:dataSource="data"
rowKey="columnId"
:row-selection="rowSelection"
rowClassName="rowClassName"
>
<span slot="serial" slot-scope="text, record, index">{
{
index + 1 }}</span>
<template slot="PhysicalType" slot-scope="text, record">
<a-select
:value="text"
style="width: 120px"
@change="e => handleChange(e, record.columnId, 'PhysicalType')"
>
<a-select-option
:value="item.key"
v-for="item in javaType"
:key="item.key"
>{
{
item.label }}</a-select-option>
<!-- :options="javaType" -->
<!-- <a-select-option value="Long">bigint(20)</a-select-option>
<a-select-option value="String">String</a-select-option>
<a-select-option value="Ingeter">Ingeter</a-select-option>
<a-select-option value="Double">Double</a-select-option>
<a-select-option value="BigDecimal">BigDecimal</a-select-option>
<a-select-option value="Date">Date</a-select-option>-->
</a-select>
</template>
<template slot="type" slot-scope="text, record">
<a-select
:value="text"
style="width: 120px"
@change="e => handleChange(e, record.columnId, 'type')"
>
<a-select-option
:value="item.key"
v-for="item in javaType"
:key="item.key"
>{
{
item.label }}</a-select-option>
<!-- <a-select-option value="String">String</a-select-option>
<a-select-option value="Ingeter">Ingeter</a-select-option>
<a-select-option value="Double">Double</a-select-option>
<a-select-option value="BigD