Prerequisite: node.js already installed and vue-cli
Environment to build the following steps:
1, set up the project vue init webpack [Name]
2, dependent on the installation (used to install on)
- AnSo element-ui [npm i element-ui -S]
- Installation axios: [npm install axios --save-dev]
- Installation vuex: [npm install vuex --save]
- 安装less:【npm install less less-loader --save-dev】
3. src-> assets less new folder, under the new common style file base.less, only for information
html * {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body,
html {
height: 100%;
}
a {
text-decoration: none;
color: #000;
}
ul ol li {
list-style: none;
}
s,
i,
em {
font-style: normal;
text-decoration: none;
}
img {
border: none;
vertical-align: middle;
}
form,
fieldset,
legend,
input {
border: none;
outline: none;
}
.clearfix:before,
.clearfix:after {
content: "";
display: table;
clear: both;
}
/*隐藏*/
.hide {
display: none;
}
/*版心*/
.w {
width: 1190px;
margin: 0 auto;
}
.fl {
float: left;
}
.fr {
float: right;
}
.tl {
text-align: left;
}
.tc {
text-align: center;
}
.tr {
text-align: right;
}
4. installed above the introduction of the src main.js tool file, common style
At this point, the available environment to build a good ~