Vue写UI之使用 Vite 搭建官网

271 阅读1分钟

准备阶段

安装

$ yarn global add create-vite-app
//或者
$ npm i -g create-vite-app

我这里用的是@1.18.0

创建项目目录

$ cva guli-ui
//或者
$ create-vite-app guli-ui //文件名自取

引入Vue Router 4

1、使用命令行查看vue-router的版本号

$ npm info vur-router versions

2、安装

$ yarn add vue-router@4.0.0-beta.3

优化过程

zxjdzxb/UI- (github.com)

问题 :

bool 不是 v-model:value 的有效值

解决

用 model-value 来代替 v-model,不能用v-model,否则会报错