暑期项目实训第三周(二)
今天将学生端界面进行完善。因为刚开始我们是和教师端同步进行的,现在需要将教师端和学生端进行分离了,学生端界面和教师端界面是有所不同的。比如教师能发布专题,而学生不能发布,因此个人界面就需要进行修改和完善。
以下是代码片段
<div class="blog">
<el-button type="primary" plain icon="el-icon-edit" >
<el-link href="/#/blog/add" style="color: #333333;text-decoration: none">新建博客</el-link>
</el-button>
<el-table
:data="tableData"
style="width: 100%">
<el-table-column type="expand">
<template slot-scope="props">
<el-form label-position="left" inline class="demo-table-expand">
<el-form-item label="博客简介">
<span>{{ props.row.summary }}</span>
</el-form-item>
</el-form>
</template>
</el-table-column>
<el-table-column
label="博客名称">
<template slot-scope="props">
<el-button type="text" @click="getarticle(props.row.aid)"><span content="name" >
{{props.row.title}}
</span></el-button>
</template>
</el-table-column>
<el-table-column
label="编辑时间"
>
<template slot-scope="props">
<span content="time">
{{props.row.editTime}}
</span>
</template>
</el-table-column>
<el-table-column
label="操作">
<template slot-scope="scope">
<el-button-group>
<el-button type="primary"plain icon="el-icon-edit" @click="ChangeArticle(scope.row.aid)"></el-button>
<el-button type="primary"plain icon="el-icon-delete" @click="DeleteArticle(scope.row.aid)"></el-button>
</el-button-group>
</template>
</el-table-column>
</el-table>
</div>