|
@@ -0,0 +1,59 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <el-button type="primary" icon="el-icon-plus" size="mini" @click="getDialog('新增')">新增</el-button>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <el-table>
|
|
|
+ <el-table-column type="index" label="序号" align="center" />
|
|
|
+ <el-table-column label="分类名称" align="center" />
|
|
|
+ <el-table-column label="更新时间" align="center" />
|
|
|
+ <el-table-column label="操作" align="center">
|
|
|
+ <template>
|
|
|
+ <el-button type="text" @click="getDialog('编辑', id)">编辑</el-button>
|
|
|
+ <el-button type="delete">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <!-- 弹窗 -->
|
|
|
+ <el-dialog :visible.sync="dialogVisible" :title="title" width="500px">
|
|
|
+ <el-form label-width="auto">
|
|
|
+ <el-form-item label="分类名称:">
|
|
|
+ <el-input placeholder="请输入分类名称" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer">
|
|
|
+ <el-button>取消</el-button>
|
|
|
+ <el-button type="primary">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ // 弹窗
|
|
|
+ dialogVisible: false,
|
|
|
+ // 弹窗名称
|
|
|
+ title: '新增'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 新增 编辑
|
|
|
+ getDialog(title, id) {
|
|
|
+ this.dialogVisible = true
|
|
|
+ this.title = title
|
|
|
+ },
|
|
|
+
|
|
|
+ // 列表
|
|
|
+ getList() {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped></style>
|