23.前端如何查文档?

44 阅读1分钟

前端如何查文档? 学会查阅文档解决下面的 // 等学完ts再看这个文档研究watch可以传递什么参数 这个问题?

<template>
 <h1>正在登录中...</h1> 
</template>

<script>
export default {
    created(){
        // 等学完ts再看这个文档研究watch可以传递什么参数
        this.unWatch = this.$store.watch(
            ()=> this.$store.getters["loginUser/status"],
            (status)=>{
                if(status !== "loading"){
                    this.$router.push(this.$router.query.returnurl || "/home").catch(()=>{});
                }
            },{
                immediate: true,
            }
        );
    },
    destroyed() {
       this.unWatch();
    },

}
</script>

<style>

</style>