优化代码

This commit is contained in:
lVAL 2020-10-29 09:06:58 +08:00
parent 13416a06a1
commit 6b688c4dc3
2 changed files with 4 additions and 6 deletions

View File

@ -1,6 +1,6 @@
<template>
<drawer :visible.sync="drawer" direction="rtl" :width="600" @before-close="e => drawer=false">
<template slot="title">修改站信息</template>
<template slot="title">修改站信息</template>
<div class="container" v-if="model">
<el-form class="form" :model="model" :rules="rules" ref="form" label-width="100px" >
<el-form-item label="车站名称" prop="name">

View File

@ -5,14 +5,12 @@
<template slot-scope="{data}">
<span class="flex" >
<span><i :class="data.isPlan? 'el-icon-document': 'el-icon-folder'"/>&ensp;{{data.name}}</span>
<el-button
<span
v-if="!data.isPlan"
class="btn-text"
type="danger"
size="mini"
@click.stop="onDelete(data)">
<i class="el-icon-delete" />
</el-button>
</span>
<span v-else>
<el-link :underline="false" :type="data.isModify?'warning':'info'"><code>{{data.isModify? 'edit': 'read'}}</code></el-link>
</span>
@ -73,7 +71,7 @@ export default {
}
.btn-text {
color: #fff;
color: red;
padding: 5px 10px;
}
</style>