File tree Expand file tree Collapse file tree 3 files changed +35
-3
lines changed Expand file tree Collapse file tree 3 files changed +35
-3
lines changed Original file line number Diff line number Diff 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 : [
Original file line number Diff line number Diff line change 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/ )
Original file line number Diff line number Diff line change 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+
You can’t perform that action at this time.
0 commit comments