frontend/src/views/gen/database/addTableForm.vue
(开头部分) 13KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<template>
<a-modal title="新增数据表" :width="1200" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit"
@cancel="handleCancel">
<a-spin :spinning="confirmLoading">
<a-divider orientation="left">数据表信息</a-divider>
<a-form :form="form">
<a-form-item label="表名" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入表名" v-decorator="['name',{rules: [{required: true, message: '请输入表名!'}]}]" />
</a-form-item>
<a-form-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入描述" style="width: 100%"
v-decorator="['description',{rules: [{required: true, message: '请输入描述!'}]}]" />
</a-form-item>
</a-form>
</a-spin>
<a-spin :spinning="confirmLoading">
<a-divider orientation="left">数据列信息</a-divider>
<a-row :gutter="24">
<a-col :md="24" :sm="24">
<a-table size="middle" :columns="columnShowColumns" :dataSource="columnInfo" :pagination="false"
:loading="false">
<template slot="dbColumnName" slot-scope="text, record">
<a-input style="width: 120px" v-model="record.dbColumnName" />
</template>
<template slot="columnDescription" slot-scope="text, record">
<a-input style="width: 120px" v-model="record.columnDescription" />
</template>
<template slot="isPrimarykey" slot-scope="text, record">
<a-select key="isPrimarykey" style="width: 120px" placeholder="请选择" has-feedback
@change="e => primarykeyHandleChange(e,record.key)" v-model="record.isPrimarykey">
<a-select-option v-for="(item,index) in selectData" :key="index" :value="item.value">{{ item.text }}
</a-select-option>
</a-select>
</template>
<template slot="isIdentity" slot-scope="text, record">
<a-select key="isIdentity" style="width: 120px" placeholder="请选择" has-feedback v-model="record.isIdentity"
:disabled="record.isPrimarykey==0">
<a-select-option v-for="(item,index) in selectData" :key="index" :value="item.value">{{ item.text }}
</a-select-option>
</a-select>
</template>
<template slot="isNullable" slot-scope="text, record">
<a-select key="isNullable" style="width: 120px" placeholder="请选择" has-feedback
:disabled="record.isPrimarykey==1" v-model="record.isNullable">
<a-select-option v-for="(item,index) in selectData" :key="index" :value="item.value">{{ item.text }}
</a-select-option>
</a-select>
</template>
<template slot="dataType" slot-scope="text, record">
<a-select key="dataType" style="width: 120px" placeholder="请选择"
@change="e => dataTypeHandleChange(e,record.key)" has-feedback v-model="record.dataType">
<a-select-option v-for="(item,index) in dataTypeSelectData" :key="index" :value="item.value">
{{ item.value }}
</a-select-option>
</a-select>
</template>
<template slot="length" slot-scope="text, record">
<a-input-number :disabled="!record.hasLength" v-model="record.length" />
</template>
后面还有 384 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
