实例 Vue renderTracked 生命周期钩子实例

x
 
<template>
  <h1>The 'renderTracked' Lifecycle Hook</h1>
  <p>The 'renderTracked' lifecycle hook is used for debugging.</p>
  <p><mark>This example only works in development mode, so to see the hook run, you must copy this code and run it on you own computer in development mode.</mark></p>
  <div>
    <comp-one></comp-one>
  </div>
</template>
<style scoped>
  div {
    border: dashed black 1px;
    border-radius: 10px;
    padding: 20px;
    margin-top: 10px;
    background-color: lightgreen;
  }
</style>                  

输出结果