edit-wrapper 1.1.5 → 1.1.6

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "edit-wrapper",
3
3
  "description": "A Vue.js project",
4
- "version": "1.1.5",
4
+ "version": "1.1.6",
5
5
  "author": "ycn <13409378589@qq.com>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -31,7 +31,7 @@ export default {
31
31
  ],
32
32
  randomKey: 1,
33
33
  language: 'text',
34
- code: "// 我是code",
34
+ code: "",
35
35
  editor: ""
36
36
  };
37
37
  },
@@ -10,7 +10,7 @@ module.exports = {
10
10
  props: {
11
11
  width: { type: [String, Number], default: '100%' },
12
12
  height: { type: [String, Number], default: '100%' },
13
- code: { type: String, default: '// code \n' },
13
+ code: { type: String, default: '' },
14
14
  srcPath: { type: String },
15
15
  language: { type: String, default: 'javascript' },
16
16
  theme: { type: String, default: 'vs-dark' }, // vs, hc-black
@@ -22,7 +22,9 @@ module.exports = {
22
22
  changeThrottle: { type: Number, default: 0 }
23
23
  },
24
24
  mounted() {
25
- this.fetchEditor();
25
+ setTimeout(() => {
26
+ this.fetchEditor();
27
+ }, 0)
26
28
  },
27
29
  destroyed() {
28
30
  this.destroyMonaco();