Vue从开始到入坑
查看官网和网友的资料总结
1.首先通过vue-cli脚手架快速建立项目(不多介绍)
2.UI使用Vux
- 打开build文件下的webpack.base.conf.js文件,添加官网说明代码
const webpackConfig = module.exports
const vuxLoader = require('vux-loader')
module.exports = vuxLoader.merge(webpackConfig, {
options: {},
plugins: [
{
name: 'vux-ui'
}
]
})
- 打开你要改的后缀为vue的文件
<template>
<div id="app">
11122
<group>
<cell title="title" value="value"></cell>
</group>
<grid>
<grid-item label="Grid" v-for="i in 9">
![](./assets/logo.png)
</grid-item>
</grid>
</div>
</template>
<script>
import { Group, Cell, Grid, GridItem } from 'vux'
export default {
name: 'app',
components: {
Group,
Cell,
Grid,
GridItem
}
}
</script>
- 效果如图
下一步,添加vue-route
©itcong