美文网首页
09.Vue对象 (VUE全栈开发学习笔记)

09.Vue对象 (VUE全栈开发学习笔记)

作者: 笑着字太黑 | 来源:发表于2021-05-10 08:08 被阅读0次
09.Vue对象.jpg

Vue对象空框架

export default {
  el:'#app',
  name: 'App',
  data () {
    return {
      key: value
    }
  },
  components: {
    component1,
    component2,
  },
  computed: {
    scheduleTime () {
      return function (schedule) {
      }
    }
  },
  methods: {
    getUserRecords () {
        return []
    }
  },
  filters: {// 使用{{ value | fiterFuc }}
    filterFuc(value){ 
      // return formatedValue 
    }
  },
  watch: {
    $route (val) {// 监视路由变化
      this.isActive = val.path === this.path
    }
    // 深度监听在其他文档专门整理
  }
  async created () { // 生命周期函数在其他文档专门整理
    let userRecords = await this.$lanzyNetwork.getInit(this.$axios, this.$store.state.curDate)
  }
}

相关文章

网友评论

      本文标题:09.Vue对象 (VUE全栈开发学习笔记)

      本文链接:https://www.haomeiwen.com/subject/nqmsdltx.html