<template>
    <div>
        <van-nav-bar
                title="star"
                left-arrow
                @click-left="back"
        />
        <div class="page">
            <ul>
                <li class="section">
                    <y-star score="4.5"></y-star>
                </li>
                <li class="section">
                    <y-star score="3"></y-star>
                </li>
                <li class="section">
                    <y-star score="3.2"></y-star>
                </li>
                <li class="section">
                    <y-star score="2.6"></y-star>
                </li>
                <li class="section">
                    <y-star score="5.8"></y-star>
                </li>
            </ul>
        </div>
    </div>
</template>

<script>
    import {NavBar} from 'vant';
    import yStar from '../components/yStar'

    export default {
        components: {
            [NavBar.name]: NavBar,
            yStar
        },
        data:()=>{
            return {
                index:0,
                tipsShow:false
            }
        },
        methods:{
            fnClick(type){
                //yToast.success("success");
                //yToast.error("error");
                yToast.loading();
                switch (type) {
                    case 1:
                        yToast.loading("SDfsadf");
                        break;
                    case 2:
                        yToast.success();
                        break;
                    case 3:
                        yToast.error();
                        break;
                }
                setTimeout(yToast.clear,100000);
            },
            back:()=>{
                window.history.go(-1);
            }
        },
    }
</script>

<style scoped>
    .page {
        padding: 10px;
    }
</style>
