Vue加Element的基本运用
`
SSM阶段机试,ts={{ts}}
<el-button type="primary" icon="el-icon-search" @click="search()">搜索
<el-button type="primary" @click="dialogVisible = true">添加
<el-table :data="tableData" style="width: 100%">
<el-table-column prop="dictId" label="ID">
</el-table-column>
<el-table-column prop="dictCode" label="字典名称">
</el-table-column>
<el-table-column prop="dictValue" label="字典值">
</el-table-column>
<el-table-column prop="dictType" label="字典类型">
</el-table-column>
<el-table-column prop="dictRemark" label="字典备注">
</el-table-column>
<el-table-column prop="" label="操作">
</el-table-column>
</el-table>
<el-dialog title="新增" :visible.sync="dialogVisible" width="50%" @close="handleClose">
<span></span>
<el-form :rules="rules" ref="ruleForm" label-width="80px" :model="formData">
<el-form-item label="ID" prop="dictId">
<el-input v-model="formData.dictId"></el-input>
</el-form-item>
<el-form-item label="字典名称" prop="dictCode">
<el-input v-model="formData.dictCode"></el-input>
</el-form-item>
<el-form-item label="字典值" prop="dictValue">
<el-input v-model="formData.dictValue"></el-input>
</el-form-item>
<el-form-item label="字典类型" prop="dictType">
<el-input v-model="formData.dictType"></el-input>
</el-form-item>
<el-form-item label="字典备注" prop="dictRemark">
<el-input v-model="formData.dictRemark"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="onSubmit">确 定</el-button>
</span>
</el-dialog>
</div>
posted on 2021-01-02 19:08 New·Object 阅读(90) 评论(0) 编辑 收藏 举报