1
0
mirror of https://github.com/sahadev/vue-component-creater-ui.git synced 2025-06-07 21:54:05 +08:00

update: JS逻辑注入正常

This commit is contained in:
shangbin 2021-12-06 19:11:40 +08:00
parent 870b865df0
commit 1cbe8fff43
2 changed files with 11 additions and 9 deletions

View File

@ -50,12 +50,7 @@ import 'codemirror/addon/fold/indent-fold.js'
import 'codemirror/addon/fold/markdown-fold.js'
import 'codemirror/addon/fold/xml-fold.js'
// require(['axios'], axios => {
// self.axios = axios.create({
// baseURL: '',
// timeout: 1000,
// });
// });
import axios from 'axios';
export default {
props: ['initCode', 'mode'],
@ -64,6 +59,14 @@ export default {
components: {
Codemirror
},
created() {
self.axios = axios.create({
baseURL: '',
timeout: 1000,
});
},
computed: {
code: {
get() {
@ -75,7 +78,7 @@ export default {
}
},
watch: {
initCode(){
initCode() {
this.codeStore = this.initCode;
}
},

File diff suppressed because one or more lines are too long