2021-05-27

先安装了VUE-CLI。

创建hellovue项目,

vue create hellovue
cd hellovue
vue add vuetify

vue add vuetify居然报错了?An unexpected error occurred: "https://registry.npm.taobao.org/vue-cli-plugin-vuetity: Not found".。搜了一下,说更改源,于是yarn config set registry https://registry.npmjs.org --global,再执行,还是一样的?试了好多次不行。
我关闭了terminal窗口然后好像好了?
yarn serve貌似跑起来了。

这个地方遇到一个坑,router.js里Vue.use(VueRouter),是VueRouter,不是router。否则浏览器console会报unknown customer element: <router-view>错误。

import Vue from 'vue'
import VueRouter from 'vue-router'
import Assets from './components/Assets.vue';
import MapView from './components/MapView.vue';

Vue.use(VueRouter);

const routes = [
  { path: '/assets', component: Assets },
  { path: '/mapview', component: MapView }
];

const router = new VueRouter({
  routes
});

export default router
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值