preview copy.vue 1017 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <!-- -->
  2. <template>
  3. <div class="">
  4. <template v-if="context">
  5. <!-- <Question :context="context" @getData="getData"></Question> -->
  6. </template>
  7. </div>
  8. </template>
  9. <script>
  10. export default {
  11. components: {},
  12. data() {
  13. return {
  14. context: {},
  15. };
  16. },
  17. computed: {},
  18. watch: {},
  19. //方法集合
  20. methods: {
  21. getData(data) {
  22. console.log(data);
  23. },
  24. },
  25. //生命周期 - 创建完成(可以访问当前this实例)
  26. created() {},
  27. //生命周期 - 挂载完成(可以访问DOM元素)
  28. mounted() {},
  29. beforeCreate() {}, //生命周期 - 创建之前
  30. beforeMount() {}, //生命周期 - 挂载之前
  31. beforeUpdate() {}, //生命周期 - 更新之前
  32. updated() {}, //生命周期 - 更新之后
  33. beforeDestroy() {}, //生命周期 - 销毁之前
  34. destroyed() {}, //生命周期 - 销毁完成
  35. activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
  36. };
  37. </script>
  38. <style lang='scss' scoped>
  39. //@import url(); 引入公共css类
  40. </style>