Эх сурвалжийг харах

解决页面初始化控制台报getAtribute错误

lkk 8 сар өмнө
parent
commit
1c41a75ef7
1 өөрчлөгдсөн 2 нэмэгдсэн , 4 устгасан
  1. 2 4
      src/views/viewer.vue

+ 2 - 4
src/views/viewer.vue

@@ -464,10 +464,8 @@ export default {
     beforeCreate() { }, //生命周期 - 创建之前
     created() { }, //生命周期 - 创建完成(可以访问当前this实例)
     beforeMount() { }, //生命周期 - 挂载之前
-    async mounted() {
-
-
-        this.$nextTick((res) => {
+    mounted() {
+        this.$nextTick(() => {
             cockpit.init(viewer);
 
             this.pick_xzqh();