Просмотр исходного кода

fix: upgrade vue-code to v1.2.1

Gerald 8 лет назад
Родитель
Сommit
930aff29b4
2 измененных файлов с 2 добавлено и 6 удалено
  1. 1 1
      package.json
  2. 1 5
      src/options/views/code.vue

+ 1 - 1
package.json

@@ -66,6 +66,6 @@
     "core-js": "^2.4.1",
     "sync-promise-lite": "^0.2.3",
     "vue": "^2.2.5",
-    "vue-code": "^1.2.0"
+    "vue-code": "^1.2.1"
   }
 }

+ 1 - 5
src/options/views/code.vue

@@ -1,5 +1,5 @@
 <template>
-  <vue-code class="editor-code" ref="code"
+  <vue-code class="editor-code"
     :options="cmOptions" v-model="content" @ready="onReady"
   />
 </template>
@@ -86,10 +86,6 @@ export default {
       cm.focus();
     },
   },
-  mounted() {
-    // XXX vue-code does not emit `ready` in v1.2.0, call it directly
-    if (!this.cm) this.onReady(this.$refs.code.cm);
-  },
   methods: {
     onReady(cm) {
       this.cm = cm;