Skip to content

Commit 68ed5d3

Browse files
committed
添加测试文档的链接
1 parent 61b838f commit 68ed5d3

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

docs/.vuepress/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ module.exports = {
44
serviceWorker: false,
55
themeConfig: {
66
nav: [
7-
{ text: "Home", link: "/" },
8-
{ text: "documents", link: "/posts/" },
7+
{ text: "首页", link: "/" },
8+
{ text: "文档", link: "/posts/" },
99
{ text: "github", link: "https://github.com/zepang/lai-ui" }
1010
],
1111
sidebar: [

docs/posts/tutorial/8.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
# 组件测试
1+
# 组件测试
2+
3+
考虑到测试的部分内容可能会比较多,我已经讲内容转移到博客。
4+
5+
- [已完成] Vue组件测试相关第一章: [https://zepang.github.io/2019/06/11/Vue%E7%BB%84%E4%BB%B6%E6%B5%8B%E8%AF%95%E7%9B%B8%E5%85%B3%E7%AC%AC%E4%B8%80%E7%AB%A0/](https://zepang.github.io/2019/06/11/Vue%E7%BB%84%E4%BB%B6%E6%B5%8B%E8%AF%95%E7%9B%B8%E5%85%B3%E7%AC%AC%E4%B8%80%E7%AB%A0/)
6+
7+
- [进行中] Vue组件测试相关第二章: [https://zepang.github.io/2019/06/13/Vue%E7%BB%84%E4%BB%B6%E6%B5%8B%E8%AF%95%E7%9B%B8%E5%85%B3%E7%AC%AC%E4%BA%8C%E7%AB%A0/](https://zepang.github.io/2019/06/13/Vue%E7%BB%84%E4%BB%B6%E6%B5%8B%E8%AF%95%E7%9B%B8%E5%85%B3%E7%AC%AC%E4%BA%8C%E7%AB%A0/)

src/components/tree/utils.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
export function genTree (width, deep) {
2+
let root = {
3+
id: 0,
4+
root: true,
5+
children: []
6+
}
7+
8+
for (let i = 0; i < width; i++) {
9+
let node = {
10+
id: i,
11+
parent: root
12+
}
13+
if (deep) {
14+
node.children = []
15+
for (let j = 0; j < deep; j++) {
16+
node.children.push({
17+
id: j,
18+
parent: node
19+
})
20+
}
21+
}
22+
root.children.push(node)
23+
}
24+
return root
25+
}
26+

0 commit comments

Comments
 (0)