<template><div>{{apps}}</div></template>
<script>
  export default {
    name:'',
    components: {},
    props:[''],
    data () {
      return {
        test: 0,
        app: 0
      };
    },
    beforeCreate() {
      console.log('beforeCreate')
      // this.app = 1
    },
    created() {
      console.log('created')
      this.test = 1
    },
    watch: {
      test() {
        console.log('watch')
      }
    },
    beforeMount() {
      console.log('beforeMount')
    },
    mounted() {
      console.log('mounted')
    },
    methods: {},
    computed: {
      apps() {
        console.log('computed')
        return this.app + 2;
      }
    }
  }
</script>
执行结果
beforeCreate
created
beforeMount
computed
mounted
watch