letter-list.vue 898 Bytes
<template>
    <ul class="list-box">
        <li v-for="item in items"><a href="#{{item.id}}">{{item.name}}</a></li>
    </ul>
</template>
<style>
    body {
        background: #000;
    }

    .list-box {
        position: fixed;
        height: 100%;
        width: 30px;
        margin: 0;
        padding: 6px;
        right: 0;
        border-radius: 8px;
        background: #fff;
        opacity: 0.8;

        li {
            list-style: none;
        }
    }

</style>
<script>
    var $ = require('yoho-jquery');

    module.exports = {
        data: function () {
            return {
                items: []
            }
        },
        init() {
            $.ajax({
                url: '/brand/letterList'
            }).then(result => {
                this.items = result;
        }).fail(() => {
                tip('网络错误');
        });
        }
    };

</script>