安装node(默认带有npm)
npm i cnpm -g下载cnpm(下载包可能出错)
用npm下包安全(推荐使用)
配置vue脚手架
若PC端 推荐使用element-ui
若移动端推荐使用vant或者mint-ui(mui不是基于vue的)
基于脚手架写项目 现将APP渲染到页面(脚手架包含)
创建页面.vue文件
配置路由规则 将页面显示出来
写页面结构,动态获取数据,
将数据保存到data里
将data数据渲染到页面 {{插值表达式}} 输入框v-model v-for
安装vuter插件之后 找到用户代码片段 替换其中的代码 vuec+tab键自动生成页面结构
{
"Print to console": {
"prefix": "vuec",
"body": [
"<template>",
" <div>",
" $0",
" </div>",
"</template>",
"",
"<script>",
"export default {",
"",
" data () {",
" return {",
" }",
" },",
"",
" methods: {},",
"",
" created () {",
" }",
"}",
"</script>",
"",
"<style lang='less' scoped>",
"",
"</style>",
""
],
"description": "Log output to console"
}
}