Browse Source

添加轮播图背景色

master
xuwenbo 4 years ago
parent
commit
fccbed6f49
  1. 6
      src/views/shop/set/form.vue
  2. 4
      src/views/shop/set/index.vue

6
src/views/shop/set/form.vue

@ -13,6 +13,9 @@
<el-form-item label="图片(750*375)"> <el-form-item label="图片(750*375)">
<MaterialList v-model="form.imageArr" style="width: 300px" type="image" :num="1" :width="150" :height="150" /> <MaterialList v-model="form.imageArr" style="width: 300px" type="image" :num="1" :width="150" :height="150" />
</el-form-item> </el-form-item>
<el-form-item label="轮播背景色">
<el-color-picker v-model="form.color"></el-color-picker>
</el-form-item>
<el-form-item label="排序"> <el-form-item label="排序">
<el-input v-model="form.sort" style="width: 300px;" /> <el-input v-model="form.sort" style="width: 300px;" />
</el-form-item> </el-form-item>
@ -120,7 +123,8 @@ export default {
pic: '', pic: '',
imageArr: [], imageArr: [],
sort: 0, sort: 0,
status: 1 status: 1,
color: null
} }
} }
} }

4
src/views/shop/set/index.vue

@ -27,6 +27,7 @@
<a :href="scope.row.map.pic" style="color: #42b983" target="_blank"><img :src="scope.row.map.pic" alt="点击打开" class="el-avatar"></a> <a :href="scope.row.map.pic" style="color: #42b983" target="_blank"><img :src="scope.row.map.pic" alt="点击打开" class="el-avatar"></a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="map.color" label="轮播背景色" />
<el-table-column prop="sort" label="排序" /> <el-table-column prop="sort" label="排序" />
<el-table-column label="状态" align="center"> <el-table-column label="状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -128,7 +129,8 @@ export default {
pic: data.map.pic, pic: data.map.pic,
imageArr: data.map.pic ? data.map.pic.split(',') : [], imageArr: data.map.pic ? data.map.pic.split(',') : [],
sort: data.sort, sort: data.sort,
status: data.status status: data.status,
color: data.color
} }
_this.dialog = true _this.dialog = true
} }

Loading…
Cancel
Save