无法启动Vue

时间:2019-12-03 10:26:01

标签: vue.js

如果我要启动Vue项目,有时控制台中会出现错误:Uncaught TypeError :(中间值)。mount不是函数。为什么在那儿?我该如何摆脱呢?有趣的是,我本来可以开始这个项目,然后突然停止了。我的main.js是:

import Vue from 'vue'
import App from './App'
import router from './router/index'
import Vuetify from 'vuetify'
import axios from 'axios'
import 'vuetify/dist/vuetify.min.css';
import store from './store/index'

window.axios=axios

window.token= localStorage.getItem('token');
window.user= localStorage.getItem('user');

axios.defaults.baseURL = 'http://localhost:8000/api';
axios.defaults.headers.common['Authorization'] = "Bearer " + window.token;

axios.defaults.headers.post['Content-Type'] = 'application/json';

Vue.use(Vuetify)

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  router,
  store,
  render: h => h(App),
}).mount("#app")

0 个答案:

没有答案