Skip to content

Latest commit

 

History

History
33 lines (31 loc) · 785 Bytes

Loading.md

File metadata and controls

33 lines (31 loc) · 785 Bytes

Loading

props

prop name description required default
loading [Boolean]是否开启 Loading Yes /

DEMO Codes

//template
    <Loading :loading="loading" />

//script
export default {
    data(){
        return{
            loading:false
        }
    },
    created(){
        this.loading = true;
        // 请求数据
        this.$http.post('test/productDetail',{})
            .then(res => {
                // 如果数据加载完毕,就让loading消失
                ...
                this.loading = false
            })
            .catch(err => {
                console.log(err)
            })
    }
}