|
|
@@ -75,7 +75,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item style="float: right">
|
|
|
<el-button
|
|
|
- @click="(dialogVisible = true), (dialogTitle = '新增Banner图')"
|
|
|
+ @click="form1={},(dialogVisible = true), (dialogTitle = '新增Banner图')"
|
|
|
type="primary"
|
|
|
>新增Banner图</el-button
|
|
|
>
|
|
|
@@ -85,31 +85,33 @@
|
|
|
<el-table
|
|
|
class="table"
|
|
|
:data="list"
|
|
|
- height="50vh"
|
|
|
+ height="57vh"
|
|
|
border
|
|
|
v-loading="loading"
|
|
|
default-expand-all
|
|
|
row-key="id"
|
|
|
style="width: 100%"
|
|
|
>
|
|
|
- <el-table-column prop="name" label="Banner标题"> </el-table-column>
|
|
|
- <el-table-column label="Banner图">
|
|
|
+ <el-table-column prop="name" label="Banner标题" align="center"> </el-table-column>
|
|
|
+ <el-table-column label="Banner图" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<img :src="scope.row.img" alt="" width="220" height="80" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="is_active" label="是否开启">
|
|
|
+ <el-table-column prop="is_active" align="center" label="是否开启">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-switch v-model="scope.row.is_active"> </el-switch>
|
|
|
+ <el-tag v-if="scope.row.is_active">开启</el-tag>
|
|
|
+ <el-tag v-else type="info">关闭</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="is_active" label="是否跳转">
|
|
|
+ <el-table-column prop="is_active" align="center" label="是否跳转">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-switch v-model="scope.row.is_jump"> </el-switch>
|
|
|
+ <el-tag v-if="scope.row.is_jump">跳转</el-tag>
|
|
|
+ <el-tag v-else type="info">不跳转</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="url" label="跳转链接"> </el-table-column>
|
|
|
- <el-table-column prop="zip" width="150" label="操作">
|
|
|
+ <el-table-column prop="url" align="center" label="跳转链接"> </el-table-column>
|
|
|
+ <el-table-column prop="zip" align="center" width="150" label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button class="edit" type="text" @click="edit(scope.row.id)"
|
|
|
>编辑</el-button
|
|
|
@@ -145,7 +147,7 @@
|
|
|
:show-file-list="false"
|
|
|
:on-success="handleAvatarSuccess"
|
|
|
>
|
|
|
- <img v-if="form1.img" :src="form1.img" class="avatar" />
|
|
|
+ <img v-if="form1.img" height="100%" :src="form1.img" class="avatar" />
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
</el-upload>
|
|
|
<span style="font-size: 12px; color: #999999"
|
|
|
@@ -193,7 +195,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
handleAvatarSuccess(res, file) {
|
|
|
- this.form1.img = file.response.data;
|
|
|
+ // this.form1.img = file.response.data;
|
|
|
this.$set(this.form1,"img",file.response.data)
|
|
|
},
|
|
|
search() {
|