创建VUE项目+Hbuilder

1.cmd命令行创建项目

vue init webpack stuvue
npm i -g @vue/cli-init

.验证创建是否成功

 2.打开项目并运行:

cd +项目名
npm run dev

网页输入网址,显示下图即成功

3.将文件夹的项目拖曳进Hbuilder

扫描二维码关注公众号,回复: 15106583 查看本文章

 4.安装Element

npm i element-ui -S

5.在VUE项目的main.js里引入Element


import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(ElementUI);

6.安装axios

main.js里引入:

import axios from 'axios'
Vue.prototype.$axios = axios    //全局注册,使用方法为:this.$axios

7.在element网页里引入表格组件

在components目录下,新建vue文件,把代码复制进去。

改变router目录下的路由路径

猜你喜欢

转载自blog.csdn.net/weixin_44198288/article/details/130561037