phpstorm+vue+elementUI+axios开发项目

phpstorm调用terminal命令行安装vue

npm install -g @vue/cli

创建项目

vue create <项目名称> #若是以当前目录作为项目名称,写法为vue create .

自定义配置

label,router,css Pre-processors

安装elementUi

npm i element-ui -S

安装axios

npm install axios

安装完成后,在main.js中引入ElementUI及样式文件,使用Vue.use(ElementUI)

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

Vue.config.productionTip = false

Vue.use(ElementUI);

组件的name属性值,使用驼峰命名法,在引用时可以使用下面两种中任意一种写法


若不写name属性,则只能使用第二种

 

你可能感兴趣的:(vue,PHPstorm)