handsome-vue-echarts
v2.1.4
Published
## Project setup ``` yarn install ```
Downloads
15
Readme
vue-cli3-spa
Project setup
yarn install
Compiles and hot-reloads for development
yarn run dev
Compiles and minifies for production
yarn run build
Run your tests
yarn run test
Lints and fixes files
yarn run lint
Run your unit tests
yarn run test:unit
Customize configuration
初始化配置
- 本项目指定IDE--vsCode(如果使用typescript, vux主题色会导致.vue文件报错问题)
- 运行项目--npm run dev(执行此命令,项目根路径下生成模版文件template-overrides.js,修改作者名为自己的名称)
- 本项目没有导入router和vuex,需自行下载(目前是这样,后期会有改动)
- npm run generator pages [name] -- 初始化项目目录
- 创建新的项目下的组件文件需按照以下操作 ** 快捷键(shift+command+p) --> 选择首选项:配置用户代码片段 ** 选择vue.json ** 用以下代码覆盖
{
// Place your snippets for vue here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Print to console": {
"prefix": "template",
"body": [
"<template>",
" <section class=\"${TM_FILENAME_BASE}\">",
"",
" </section>",
"</template>",
"",
"<script lang=\"ts\">",
"import { Vue, Component } from 'vue-property-decorator';",
"",
"/**",
" * @author: wukangjun",
" * @since: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}",
" * @router('/${TM_FILENAME_BASE}')",
" */",
"@Component",
"export default class ${TM_FILENAME_BASE} extends Vue {",
" public static NAME: string = '${TM_FILENAME_BASE}';",
"}",
"",
"</script>",
"",
"<style lang=\"scss\">",
"",
"</style>"
],
"description": "vue template generator"
}
}
** 创建好.vue文件, 在文件内部输入template + (快捷键:tab), 初始化代码自动生成
download router or vuex
npm install -g @vue/cli vue -V(版本号大于3,说明安装成功)
注意事项
- import CONFIG from '@/api/config'; 配置文件的引入规则