Skip to content

Commit 9d0ba75

Browse files
committed
Build(npm): upgrade dependencies
1 parent 3ead79f commit 9d0ba75

File tree

6 files changed

+3992
-4235
lines changed

6 files changed

+3992
-4235
lines changed

Diff for: docs/zh/guide/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 介绍
22

33
[![Vue](https://img.shields.io/badge/vue-2.6.10-brightgreen.svg)](https://github.com/vuejs/vue)
4-
[![Element-ui](https://img.shields.io/badge/element--ui-2.8.2-brightgreen.svg)](https://github.com/ElemeFE/element)
4+
[![Element-ui](https://img.shields.io/badge/element--ui-2.11.1-brightgreen.svg)](https://github.com/ElemeFE/element)
55
[![Build Status](https://circleci.com/gh/Armour/vue-typescript-admin-template/tree/master.svg?style=shield)](https://circleci.com/gh/Armour/vue-typescript-admin-template/tree/master)
66
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
77
[![Template from jarvis](https://img.shields.io/badge/Hi-Jarvis-ff69b4.svg)](https://github.com/Armour/Jarvis)
@@ -18,7 +18,7 @@
1818
相关项目:
1919
- Javascript 集成样例: [vue-element-admin](https://github.com/armour/vue-typescript-admin-template) (鸣谢: [PanJiaChen](https://github.com/PanJiaChen))
2020
- Javascript 基础摸板: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template) (鸣谢: [PanJiaChen](https://github.com/PanJiaChen))
21-
:::
21+
:::
2222

2323
## 功能
2424

@@ -73,12 +73,12 @@
7373
- 复杂表格
7474
7575
- Excel
76-
- 导出excel
77-
- 导入excel
78-
- 前端可视化excel
76+
- 导出 excel
77+
- 导入 excel
78+
- 前端可视化 excel
7979
8080
- Zip
81-
- 导出zip
81+
- 导出 zip
8282
8383
- PDF
8484
- 下载 pdf

Diff for: docs/zh/guide/essentials/layout.md

+16-14
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
`vue-typescript-admin-template` 中大部分页面都是基于这个 `layout` 的,除了个别页面如:`login` , `404`, `401` 等页面没有使用该`layout`。如果你想在一个项目中有多种不同的`layout`也是很方便的,只要在一级路由那里选择不同的`layout`组件就行。
2020

2121
```js
22-
// Without layout
22+
// 不含 layout
2323
{
2424
path: '/401',
2525
component: () => import('@/views/error-page/401.vue')
2626
}
2727

28-
// With layout
28+
// 含有 layout
2929
{
3030
path: '/documentation',
3131
// 你可以选择不同的layout组件
@@ -70,30 +70,31 @@
7070

7171
<img :src="$withBase('/images/share-router.jpeg')" alt="共享路由">
7272

73-
`创建``编辑`的页面使用的是同一个 component,默认情况下这两个页面切换时并不会触发 vue 的 created 或者 mounted 钩子,[官方说](https://router.vuejs.org/zh/guide/advanced/data-fetching.html#%E6%95%B0%E6%8D%AE%E8%8E%B7%E5%8F%96)你可以通过 watch $route 的变化来进行处理,但说真的还是蛮麻烦的。后来发现其实可以简单的在 `router-view` 上加上一个唯一的 key,来保证路由切换时都会重新渲染触发钩子了。这样简单的多了。
73+
`创建``编辑` 的页面使用的是同一个 component,默认情况下这两个页面切换时并不会触发 vue 的 created 或者 mounted 钩子,[官方文档说](https://router.vuejs.org/zh/guide/advanced/data-fetching.html#%E6%95%B0%E6%8D%AE%E8%8E%B7%E5%8F%96)你可以通过 watch $route 的变化来进行处理,但说真的还是蛮麻烦的。后来发现其实可以简单的在 `router-view` 上加上一个唯一的 key,来保证路由切换时都会重新渲染触发钩子了,这样简单多了。
74+
75+
```html
76+
<router-view :key="key" />
77+
```
7478

7579
```js
76-
<router-view :key="key"></router-view>
77-
78-
computed: {
79-
key() {
80-
// 只要保证 key 唯一性就可以了,保证不同页面的 key 不相同
81-
return this.$route.path
82-
}
83-
}
80+
get key() {
81+
// 只要保证 key 唯一性就可以了,保证不同页面的 key 不相同
82+
return this.$route.path
83+
}
8484
```
8585

86-
::: tip
86+
::: tip 示例
8787
或者可以像本项目中 `editForm``createForm` 那样声明两个不同的 view 但引入同一个 component。
8888

89-
示例代码[@/views/example](https://github.com/armour/vue-typescript-admin-template/tree/master/src/views/example)
89+
代码[@/views/example](https://github.com/armour/vue-typescript-admin-template/tree/master/src/views/example)
9090
:::
9191

9292
```html
9393
<!-- create.vue -->
9494
<template>
9595
<article-detail :is-edit="false" />
9696
</template>
97+
9798
<script lang="ts">
9899
import ArticleDetail from './components/ArticleDetail.vue'
99100
</script>
@@ -102,6 +103,7 @@ import ArticleDetail from './components/ArticleDetail.vue'
102103
<template>
103104
<article-detail :is-edit="true" />
104105
</template>
106+
105107
<script lang="ts">
106108
import ArticleDetail from './components/ArticleDetail.vue'
107109
</script>
@@ -111,4 +113,4 @@ import ArticleDetail from './components/ArticleDetail.vue'
111113

112114
`element-ui` 官方对自己的定位是桌面端后台框架,而且对于管理后台这种重交互的项目来说是不能通过简单的适配来满足桌面端和移动端两端不同的交互,所以真要做移动版后台,建议重新做一套系统。
113115

114-
所以本项目也不会适配移动端,只是用`media query`做了一点简单的响应式布局,有需求请自行修改。
116+
所以本项目也不会适配移动端,只是用 `media query` 做了一点简单的响应式布局,有需求请自行修改。

Diff for: docs/zh/guide/essentials/router-and-nav.md

+15-12
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
路由和侧边栏是组织起一个后台应用的关键骨架。
88

9-
本项目侧边栏和路由是绑定在一起的,所以你只要在 `@/router/index.js` 下面配置对应的路由,侧边栏就能动态的生成了。大大减轻了手动重复编辑侧边栏的工作量。当然这样就需要在配置路由的时候遵循一些约定的规则。
9+
本项目侧边栏和路由是绑定在一起的,所以你只要在 `@/router/index.ts` 下面配置对应的路由,侧边栏就能动态的生成了。大大减轻了手动重复编辑侧边栏的工作量。当然这样就需要在配置路由的时候遵循一些约定的规则。
1010

1111
## 配置项
1212

@@ -100,13 +100,13 @@ meta: {
100100

101101
这里的路由分为两种,`constantRoutes``asyncRoutes`
102102

103-
**constantRoutes:** 代表那些不需要动态判断权限的路由,如登录页、404、等通用页面。
103+
**constantRoutes:** 不需要动态判断权限的路由,如登录页、404、等通用页面。
104104

105-
**asyncRoutes:** 代表那些需求动态判断权限并通过 `addRoutes` 动态添加的页面。
105+
**asyncRoutes:** 需求动态判断权限并通过 `addRoutes` 动态添加的页面。
106106

107107
具体的会在 [权限验证](permission.md) 页面介绍。
108108

109-
::: tip
109+
::: tip 路由懒加载
110110
这里所有的路由页面都使用 `路由懒加载` 了 ,具体介绍见[文档](/zh/guide/advanced/lazy-loading.html)
111111

112112
如果你想了解更多关于 browserHistory 和 hashHistory,请参看 [构建和发布](/zh/guide/essentials/deploy.html)
@@ -115,7 +115,7 @@ meta: {
115115
其它的配置和 [vue-router](https://router.vuejs.org/zh-cn/) 官方并没有区别,自行查看文档。
116116

117117
::: warning 注意事项
118-
如果这里有一个需要非常注意的地方就是 `404` 页面一定要最后加载,如果放在 constantRoutes 一同声明了 `404` ,后面的所有页面都会被拦截到`404`
118+
如果这里有一个需要非常注意的地方就是 `404` 页面一定要最后加载,如果放在 constantRoutes 一同声明了 `404` ,后面的所有页面都会被拦截到 `404`
119119
:::
120120

121121
## 侧边栏
@@ -183,14 +183,14 @@ meta: {
183183
```
184184

185185
::: tip unique-opened
186-
你可以在[Sidebar/index.vue](https://github.com/armour/vue-typescript-admin-template/blob/master/src/layout/components/Sidebar/index.vue)中设置 `unique-opened` 来控制侧边栏,是否只保持一个子菜单的展开。
186+
你可以在 [Sidebar/index.vue](https://github.com/armour/vue-typescript-admin-template/blob/master/src/layout/components/Sidebar/index.vue) 中设置 `unique-opened` 来控制侧边栏,是否只保持一个子菜单的展开。
187187
:::
188188

189189
## 多级目录(嵌套路由)
190190

191191
如果你的路由是多级目录,如本项目 [@/views/nested](https://github.com/armour/vue-typescript-admin-template/tree/master/src/views/nested) 那样, 有三级路由嵌套的情况下,不要忘记还要手动在二级目录的根文件下添加一个 `<router-view>`
192192

193-
如:[@/views/nested/menu1/index.vue](https://github.com/armour/vue-typescript-admin-template/blob/master/src/views/nested/menu1/index.vue),原则上有多少级路由嵌套就需要多少个`<router-view>`
193+
如:[@/views/nested/menu1/index.vue](https://github.com/armour/vue-typescript-admin-template/blob/master/src/views/nested/menu1/index.vue),原则上有多少级路由嵌套就需要多少个 `<router-view>`
194194

195195
## 点击侧边栏 刷新当前路由
196196

@@ -220,7 +220,7 @@ ps:不要忘了在 `router-view` 加上一个特定唯一的 `key`,如 `<route
220220

221221
<img :src="$withBase('/images/resize-text.jpg')" alt="改变字体大小">
222222

223-
点击图片所示的全局 size 大小切换按钮,你会发现 页面 `app-main` 区域进行了刷新。它就是运用了重定向到 `Redirect` 页面之后再重定向回原始页面的方法。
223+
点击图片所示的全局 size 大小切换按钮,你会发现页面 `app-main` 区域进行了刷新。它就是运用了重定向到 `Redirect` 页面之后再重定向回原始页面的方法。
224224

225225
点击的时候重定向页面至 `/redirect`
226226

@@ -234,10 +234,9 @@ this.$nextTick(() => {
234234
})
235235
```
236236

237-
`redirect` 页面在重定向回原始页面
237+
`redirect` 页面再重定向回原始页面
238238

239239
```js
240-
// https://github.com/armour/vue-typescript-admin-template/blob/master/src/views/redirect/index.vue
241240
created() {
242241
const { params, query } = this.$route
243242
const { path } = params
@@ -249,14 +248,18 @@ render() {
249248
}
250249
```
251250

251+
::: tip 代码地址
252+
[@/views/redirect/index.vue](https://github.com/armour/vue-typescript-admin-template/blob/master/src/views/redirect/index.vue)
253+
:::
254+
252255
## 面包屑
253256

254257
本项目中也封装了一个面包屑导航,它也是通过 `watch $route` 变化动态生成的。它和 menu 也一样,也可以通过之前那些配置项控制一些路由在面包屑中的展现。大家也可以结合自己的业务需求增改这些自定义属性。比如可以在路由中声明`breadcrumb:false`,让其不在 breadcrumb 面包屑显示。
255258

256259
<img :src="$withBase('/images/breadcrumb.gif')" alt="面包屑">
257260

258261
::: tip 代码地址
259-
[@/components/Breadcrumb](https://github.com/armour/vue-typescript-admin-template/blob/master/src/components/Breadcrumb/index.vue)
262+
[@/components/Breadcrumb/index.vue](https://github.com/armour/vue-typescript-admin-template/blob/master/src/components/Breadcrumb/index.vue)
260263
:::
261264

262265
## 侧边栏滚动问题
@@ -276,7 +279,7 @@ overflow-y: scroll;
276279
所以现版本中使用了 `el-scrollbar` 来处理侧边栏滚动问题。
277280

278281
::: tip 代码地址
279-
[@/components/Sidebar](https://github.com/armour/vue-typescript-admin-template/blob/master/src/layout/components/Sidebar/index.vue)
282+
[@/components/Sidebar/index.vue](https://github.com/armour/vue-typescript-admin-template/blob/master/src/layout/components/Sidebar/index.vue)
280283
:::
281284

282285
## 侧边栏 外链

Diff for: docs/zh/guide/other/faq.md

+10-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 常见问题
22

33
::: tip
4-
提问之前,请先查阅下面的常见问题。
4+
开 issue 提问之前,请先查阅下面的常见问题。
55
:::
66

77
## vue-typescript-admin-template, vue-element-admin 和 vue-admin-template 有什么区别?
@@ -11,11 +11,9 @@
1111

1212
[vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template)(本项目) 是基于 typescript 重写的版本, [master](https://github.com/Armour/vue-typescript-admin-template/tree/master) 分支对应着 vue-element-admin 的完整功能,而 [minimal](https://github.com/Armour/vue-typescript-admin-template/tree/minimal) 分支对应着 vue-admin-template 的基础功能。
1313

14-
## 首先有任何报错,最简单的方法是把报错信息复制到浏览器里面搜索一下
14+
## 遇到不懂的问题第一件要做的事
1515

16-
[google 点我](http://lmgtfy.com/?q=%E6%90%9C%E4%B8%80%E6%90%9C)
17-
18-
[百度点我](http://www.baidu-x.com/?q=%E6%90%9C%E4%B8%80%E6%90%9C)
16+
自己动手把**报错信息的核心部分**先复制到浏览器里面搜索一下,可以使用 Google / 百度 / Bing 等搜索引擎。
1917

2018
## 代码下载慢?
2119

@@ -27,14 +25,14 @@ npm 或者 github 有时候因为中国墙的原因,网速会不稳定。有
2725
npm install --registry=https://registry.npm.taobao.org
2826
```
2927

30-
- 使用 yarn 代替 npm
28+
- 尝试使用 yarn 代替 npm
3129

3230
- [yarn 介绍](https://github.com/yarnpkg/yarn)
3331
- [安装](https://yarn.bootcss.com/docs/install/#mac-stable)
3432

3533
`yarn install`
3634

37-
- 自己了解一下如何科学上网
35+
- 了解一下如何科学上网
3836

3937
## npm install 总是失败?
4038

@@ -89,20 +87,20 @@ module.exports = {
8987

9088
## 图片 background url() 引用问题?
9189

92-
https://github.com/vuejs/vue-loader/issues/481
90+
[https://github.com/vuejs/vue-loader/issues/481](https://github.com/vuejs/vue-loader/issues/481)
9391

94-
https://github.com/vuejs/vue-cli/issues/112
92+
[https://github.com/vuejs/vue-cli/issues/112](https://github.com/vuejs/vue-cli/issues/112)
9593

9694
## @ 或者如为什么他的项目可以`src/xxx/` 这样写,而我的却报路径错误?
9795

9896
这种情况很有可能人家在配置了 webpack 的 alias
9997

100-
`@` 是 webpack 的 [alias](https://webpack.js.org/configuration/resolve/#resolve-alias) 不懂得请自行研究。
98+
`@` 是 webpack 的 [alias](https://webpack.docschina.org/configuration/resolve/#resolve-alias) 不懂得请自行研究。
10199

102-
## can't not find 'xxModule' - 找不到某些依赖或者模块
100+
## Can't not find 'xxx Module' - 找不到某些依赖或者模块
103101

104102
这种情况一般报错信息可以看到是哪个包抛出的信息.
105-
一般卸载这个模块,安装重新安装下即可.
103+
一般卸载这个模块(如果已经安装了), 用 npm 重新安装下即可.
106104

107105
## 我用了 axios , 为什么 IE 浏览器不识别(IE9+)
108106

@@ -118,7 +116,3 @@ require("es6-promise").polyfill();
118116
## 其它任何关于 vue 的问题 ?
119117

120118
请你首先仔细阅读 vue [官方文档](https://cn.vuejs.org/index.html), 但部分问题其实看报错就能知道原因了!
121-
122-
## 辅助文章
123-
124-
[Vue 脱坑记 - 查漏补缺(汇总下群里高频询问的 xxx 及给出不靠谱的解决方案)](https://juejin.im/post/59fa9257f265da43062a1b0e)

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
},
1111
"devDependencies": {
1212
"prettier": "1.18.2",
13-
"vuepress": "1.0.2",
14-
"lint-staged": "9.0.2"
13+
"vuepress": "1.0.3",
14+
"lint-staged": "9.2.1"
1515
},
1616
"bugs": {
1717
"url": "https://github.com/armour/vue-typescript-admin-docs/issues"

0 commit comments

Comments
 (0)