SOURCE

console 命令行工具 X clear

                    
>
console
var vm = new Vue({
  el: "#a",
  data: {
    show: true
  },
  methods: {
    handleClick: function(){
      this.show = !this.show;
    }
  }
})
<div id="a">
    <transition name="fade">
        <div v-if="show">hello world</div>
    </transition>
    <button @click="handleClick">切换</button>
</div>
.fade-enter{
  opacity: 0;
}
.fade-enter-active{
  transition: opacity 3s;
}
.fade-leave-to{
  opacity: 0;
}
.fade-leave-active{
  transition: opacity 3s;
}

本项目引用的自定义外部资源