Pārlūkot izejas kodu

修复this作用域

liyongli 3 gadi atpakaļ
vecāks
revīzija
1276d088db
2 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 1 1
      src/pages/privacy/Index.vue
  2. 1 1
      src/pages/userProtocol/Index.vue

+ 1 - 1
src/pages/privacy/Index.vue

@@ -27,7 +27,7 @@ export default {
     }
     }
   },
   },
   mounted() {
   mounted() {
-    window.$privacy = function(html) {
+    window.$privacy = html => {
       this.content = html;
       this.content = html;
     };
     };
     this.$pageParams = currentUrlToParams();
     this.$pageParams = currentUrlToParams();

+ 1 - 1
src/pages/userProtocol/Index.vue

@@ -27,7 +27,7 @@ export default {
     }
     }
   },
   },
   mounted() {
   mounted() {
-    window.$userProtocol = function(html) {
+    window.$userProtocol = html => {
       this.content = html;
       this.content = html;
     };
     };
     this.$pageParams = currentUrlToParams();
     this.$pageParams = currentUrlToParams();