feat: 修改配置文件

This commit is contained in:
fonghehe 2022-10-14 18:45:43 +08:00
parent 6256c72851
commit 9819f7a3d6
6 changed files with 68 additions and 62 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
node_modules
node_modules
dist

View File

@ -1,3 +1,5 @@
import menu from "./menu";
module.exports = {
lang: "zh-CN",
title: "Vue-H5-Template",
@ -11,7 +13,7 @@ module.exports = {
themeConfig: {
nav: nav(),
sidebar: {
"/guide/": sidebarGuide(),
"/guide/": menu,
},
socialLinks: [
{ icon: "github", link: "https://github.com/sunniejs/vue-h5-template" },
@ -37,67 +39,9 @@ function nav() {
return [
{ text: "介绍", link: "/guide/" },
{ text: "加入我们", link: "/guide/about/" },
{ text: "github仓库", link: "https://github.com/sunniejs/vue-h5-template" },
];
}
function sidebarGuide() {
return [
{
text: "前言",
collapsible: true,
items: [
{ text: "介绍", link: "/guide/" },
{ text: "快速上手", link: "/guide/start" },
{ text: "参与编辑", link: "/guide/edit" },
],
},
{
text: "vue3-template",
collapsible: true,
items: [
{ text: "启动项目", link: "/guide/vue3/start" },
{ text: "vite.config.ts 基础配置", link: "/guide/vue3/base" },
{ text: "vite插件集成", link: "/guide/vue3/vite" },
{ text: "多环境变量", link: "/guide/vue3/env" },
{ text: "viewport 适配方案", link: "/guide/vue3/viewport" },
{ text: "UI组件库", link: "/guide/vue3/ui" },
{ text: "Pinia 状态管理", link: "/guide/vue3/pinia" },
{ text: "vue-router", link: "/guide/vue3/router" },
{ text: "axios 封装及接口管理", link: "/guide/vue3/axios" },
{ text: "alias", link: "/guide/vue3/alias" },
{ text: "proxy 跨域", link: "/guide/vue3/proxy" },
{ text: "多语言解决方案", link: "/guide/vue3/i18n" },
{
text: "统一开发规范",
link: "/guide/vue3/lint",
},
],
},
{
text: "vue2-template",
collapsible: true,
collapsed: true,
items: [
{ text: "启动项目", link: "/guide/vue2/start" },
{ text: "多环境变量", link: "/guide/vue2/env" },
{ text: "rem 适配方案", link: "/guide/vue2/rem" },
{ text: "vw 适配方案", link: "/guide/vue2/vw" },
{ text: "VantUI 组件按需加载", link: "/guide/vue2/vant" },
{ text: "Sass 全局样式", link: "/guide/vue2/sass" },
{ text: "Vuex 状态管理", link: "/guide/vue2/vuex" },
{ text: "Vue-router", link: "/guide/vue2/router" },
{ text: "Axios 封装及接口管理", link: "/guide/vue2/axios" },
{ text: "vue.config.js 基础配置", link: "/guide/vue2/base" },
{ text: "配置 alias 别名", link: "/guide/vue2/alias" },
{ text: "配置 proxy 跨域", link: "/guide/vue2/proxy" },
{ text: "配置 打包分析", link: "/guide/vue2/bundle" },
{ text: "配置 externals 引入 cdn 资源", link: "/guide/vue2/externals" },
{ text: "去掉 console.log", link: "/guide/vue2/console" },
{ text: "splitChunks 打包第三方模块", link: "/guide/vue2/chunks" },
{ text: "添加 IE 兼容", link: "/guide/vue2/ie" },
{ text: "统一开发规范", link: "/guide/vue2/lint" },
],
text: "github仓库",
link: "https://github.com/sunniejs/vue-h5-template",
},
];
}

View File

@ -0,0 +1,5 @@
import preface from "./preface";
import vue2 from "./vue2";
import vue3 from "./vue3";
export default [preface, vue3, vue2];

View File

@ -0,0 +1,9 @@
export default {
text: "前言",
collapsible: true,
items: [
{ text: "介绍", link: "/guide/" },
{ text: "快速上手", link: "/guide/start" },
{ text: "参与编辑", link: "/guide/edit" },
],
};

View File

@ -0,0 +1,25 @@
export default {
text: "vue2-template",
collapsible: true,
collapsed: true,
items: [
{ text: "启动项目", link: "/guide/vue2/start" },
{ text: "多环境变量", link: "/guide/vue2/env" },
{ text: "rem 适配方案", link: "/guide/vue2/rem" },
{ text: "vw 适配方案", link: "/guide/vue2/vw" },
{ text: "VantUI 组件按需加载", link: "/guide/vue2/vant" },
{ text: "Sass 全局样式", link: "/guide/vue2/sass" },
{ text: "Vuex 状态管理", link: "/guide/vue2/vuex" },
{ text: "Vue-router", link: "/guide/vue2/router" },
{ text: "Axios 封装及接口管理", link: "/guide/vue2/axios" },
{ text: "vue.config.js 基础配置", link: "/guide/vue2/base" },
{ text: "配置 alias 别名", link: "/guide/vue2/alias" },
{ text: "配置 proxy 跨域", link: "/guide/vue2/proxy" },
{ text: "配置 打包分析", link: "/guide/vue2/bundle" },
{ text: "配置 externals 引入 cdn 资源", link: "/guide/vue2/externals" },
{ text: "去掉 console.log", link: "/guide/vue2/console" },
{ text: "splitChunks 打包第三方模块", link: "/guide/vue2/chunks" },
{ text: "添加 IE 兼容", link: "/guide/vue2/ie" },
{ text: "统一开发规范", link: "/guide/vue2/lint" },
],
};

View File

@ -0,0 +1,22 @@
export default {
text: "vue3-template",
collapsible: true,
items: [
{ text: "启动项目", link: "/guide/vue3/start" },
{ text: "vite.config.ts 基础配置", link: "/guide/vue3/base" },
{ text: "vite插件集成", link: "/guide/vue3/vite" },
{ text: "多环境变量", link: "/guide/vue3/env" },
{ text: "viewport 适配方案", link: "/guide/vue3/viewport" },
{ text: "UI组件库", link: "/guide/vue3/ui" },
{ text: "Pinia 状态管理", link: "/guide/vue3/pinia" },
{ text: "vue-router", link: "/guide/vue3/router" },
{ text: "axios 封装及接口管理", link: "/guide/vue3/axios" },
{ text: "alias", link: "/guide/vue3/alias" },
{ text: "proxy 跨域", link: "/guide/vue3/proxy" },
{ text: "多语言解决方案", link: "/guide/vue3/i18n" },
{
text: "统一开发规范",
link: "/guide/vue3/lint",
},
],
};