营销管理-轮播图

master
panqihua 2 years ago
parent c28d24b185
commit 194ac97041
  1. 75
      src/views/platform/marketing_management/carousel.vue

@ -0,0 +1,75 @@
<template>
<div class="app-container">
<el-button type="primary" @click="open = true">新增</el-button>
<el-button>批量删除</el-button>
<el-table :data="dataList" border class="table">
<el-table-column type="selection" align="center"></el-table-column>
<el-table-column label="序号" type="index" align="center"></el-table-column>
<el-table-column label="封面" align="center">
<img src="http://www.dummyimage.com/50x50" />
</el-table-column>
<el-table-column label="位置" align="center">首页</el-table-column>
<el-table-column label="创建时间" align="center">2022-12-31 12:31</el-table-column>
<el-table-column label="更新时间" align="center">2022-12-31 12:31</el-table-column>
<el-table-column label="操作" align="center">
<el-button type="text">编辑</el-button>
<el-button type="text">删除</el-button>
</el-table-column>
</el-table>
<el-dialog :visible.sync="open" title="新增">
<el-form :inline="true">
<el-form-item label="封面">
<el-upload :on-remove="onChange" :file-list="form.fileList" :on-change="onChange"
list-type="picture" action="#" :auto-upload="false" :limit="1">
<i class="el-icon-plus" v-if="form.fileList.length === 0"></i>
</el-upload>
</el-form-item>
<br />
<el-form-item label="位置">
<el-select v-model="form.position" placeholder="请选择" clearable>
<el-option v-for="dict in dict.type.carousel_position" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
<br />
<el-form-item label="序号">
<el-input placeholder="数字越小排名越靠前"></el-input>
</el-form-item>
</el-form>
<div class="text-center">
<el-button type="primary" @click="save">保存</el-button>
<el-button>重置</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'Carousel',
dicts: ['carousel_position'],
data() {
return {
open: false,
dataList: [{}],
form: {
position: undefined,
fileList: []
}
}
},
methods: {
save() {
this.$modal.msgSuccess('保存成功')
this.open = false
},
onChange(file, fileList) {
this.form.fileList = fileList
}
}
}
</script>
<style scoped lang="scss">
.table {
margin-top: 10px;
}
</style>
Loading…
Cancel
Save