Skip to content

Commit 41bbca6

Browse files
bailin0824v_guanglwen
andauthored
feat: skyline模式下的自定义路由 (#177)
* feat: 增加预设路由 * feat: 容器转场动画 * feat: 预设路由效果 * feat: 页面返回手势 * feat: 调整缩进 --------- Co-authored-by: v_guanglwen <[email protected]>
1 parent 3fa80a6 commit 41bbca6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2414
-31
lines changed

miniprogram/app.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,18 @@
298298
"examples/app-bar/pages/detail/index"
299299
]
300300
},
301+
{
302+
"root": "packageSkylineRouter",
303+
"pages": [
304+
"pages/preset-router/index/index",
305+
"pages/preset-router/list/index",
306+
"pages/open-container/index/index",
307+
"pages/open-container/detail/index",
308+
"pages/open-container/other/index",
309+
"pages/page-return-gesture/index/index"
310+
],
311+
"renderer": "skyline"
312+
},
301313
{
302314
"root": "packageXRFrame",
303315
"pages": [
@@ -402,6 +414,12 @@
402414
"packageComponent"
403415
]
404416
},
417+
"page/animation/index": {
418+
"network": "all",
419+
"packages": [
420+
"packageSkylineRouter"
421+
]
422+
},
405423
"page/API/index": {
406424
"network": "all",
407425
"packages": [
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// components/example-card/index.js
2+
Component({
3+
4+
/**
5+
* Component properties
6+
*/
7+
properties: {
8+
9+
},
10+
11+
/**
12+
* Component initial data
13+
*/
14+
data: {
15+
16+
},
17+
18+
/**
19+
* Component methods
20+
*/
21+
methods: {
22+
23+
}
24+
})
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"component": true,
3+
"usingComponents": {}
4+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<view class="container">
2+
<view class="img-wrap center">
3+
<image mode="aspectFit" class="img" src="/assets/play.png"></image>
4+
</view>
5+
6+
<view class="intro">
7+
<view class="title">Title</view>
8+
<view class="sub-title">Secondary text</view>
9+
<view class="content">
10+
Lorem ipsum dolor sit amet, consectetur
11+
adipiscing elit, sed do eiusmod tempor.
12+
</view>
13+
</view>
14+
</view>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/* components/example-card/index.wxss */
2+
.container {
3+
display: flex;
4+
flex-direction: column;
5+
justify-content: space-between;
6+
height: 300px;
7+
border-radius: 4px;
8+
overflow: hidden;
9+
box-shadow: 0px 1px 2px 1px #E3E8E5;
10+
}
11+
12+
.img-wrap {
13+
flex: 1;
14+
width: 100%;
15+
box-sizing: border-box;
16+
background-color: rgba(0, 0, 0, 0.38);
17+
}
18+
19+
.center {
20+
display: flex;
21+
align-items: center;
22+
justify-content: center;
23+
}
24+
25+
.intro {
26+
color: rgba(0, 0, 0, 0.54);
27+
font-size: 14px;
28+
padding: 16px;
29+
font-style: italic;
30+
}
31+
32+
.title {
33+
color: #000;
34+
font-size: 20px;
35+
}
36+
37+
.img {
38+
width: 100px;
39+
height: 100px;
40+
}
41+
42+
.content {
43+
margin-top: 16px;
44+
width: 100%;
45+
color: rgba(0, 0, 0, 0.54);
46+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// components/example-card/index.js
2+
Component({
3+
4+
/**
5+
* Component properties
6+
*/
7+
properties: {
8+
9+
},
10+
11+
/**
12+
* Component initial data
13+
*/
14+
data: {
15+
16+
},
17+
18+
/**
19+
* Component methods
20+
*/
21+
methods: {
22+
23+
}
24+
})
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"component": true,
3+
"usingComponents": {}
4+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<view class="container">
2+
<view class="img-wrap center">
3+
<image mode="aspectFit" class="img" src="/assets/play.png"></image>
4+
</view>
5+
6+
<view class="intro">
7+
<view class="title">Title</view>
8+
<view class="content">
9+
Lorem ipsum dolor sit, consectetur adipiscing elit
10+
</view>
11+
</view>
12+
</view>
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/* components/example-card/index.wxss */
2+
.container {
3+
display: flex;
4+
flex-direction: row;
5+
height: 100px;
6+
border-radius: 4px;
7+
overflow: hidden;
8+
box-shadow: 0px 1px 2px 1px #E3E8E5;
9+
}
10+
11+
.img-wrap {
12+
width: 100px;
13+
height: 100px;
14+
box-sizing: border-box;
15+
background-color: rgba(0, 0, 0, 0.38);
16+
}
17+
18+
.img {
19+
width: 60px;
20+
height: 60px;
21+
}
22+
23+
.center {
24+
display: flex;
25+
align-items: center;
26+
justify-content: center;
27+
}
28+
29+
.intro {
30+
flex: 1;
31+
color: rgba(0, 0, 0, 0.54);
32+
font-size: 14px;
33+
font-style: italic;
34+
display: flex;
35+
flex-direction: column;
36+
justify-content: center;
37+
padding:0 20px;
38+
}
39+
40+
.title {
41+
color: #000;
42+
font-size: 20px;
43+
}
44+
45+
.content {
46+
margin-top: 16px;
47+
width: 100%;
48+
color: rgba(0, 0, 0, 0.54);
49+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// components/float-action-button/index.js
2+
Component({
3+
4+
/**
5+
* Component properties
6+
*/
7+
properties: {
8+
9+
},
10+
11+
options: {
12+
virtualHost: true
13+
},
14+
15+
/**
16+
* Component initial data
17+
*/
18+
data: {
19+
20+
},
21+
22+
/**
23+
* Component methods
24+
*/
25+
methods: {
26+
27+
}
28+
})

0 commit comments

Comments
 (0)