首页 > Web开发 > 详细

16.xadmin可视化上传图片

时间:2021-01-10 22:32:34      阅读:23      评论:0      收藏:0      [点我收藏+]

xadmin可视化上传图片

# 1.管理员登入录入数据

Banner.vue组件改造

<!-- 修改Banner.vue组件 -->
<template>
    <el-carousel height="520px" :interval="3000" arrow="always">
        <el-carousel-item v-for="item in banner_list">
            <a :href="item.link">
                <img :src="item.image" >
            </a>
        </el-carousel-item>
    </el-carousel>
</template>
<script>
    export default {
        name: "Banner",
        data: function () {
            return {
                banner_list: []
            }
        },
        created: function () {
            let _this = this;
            this.$axios({
                url: this.$settings.Host + ‘/home/banner/‘,
            }).then(function (response) {
                _this.banner_list = response.data;
            }).catch(function (error) {
                console.log(error)
            })
        }
    }
</script>

<style scoped>
    .el-carousel__item h3 {
        color: #475669;
        font-size: 18px;
        opacity: 0.75;
        line-height: 300px;
        margin: 0;
    }

    .el-carousel__item:nth-child(2n) {
        background-color: #99a9bf;
    }

    .el-carousel__item:nth-child(2n+1) {
        background-color: #d3dce6;
    }
    img {
        text-align: center;
        height: 520px;
    }
</style>

16.xadmin可视化上传图片

原文:https://www.cnblogs.com/abdm-989/p/14259764.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!