Skip to content

Commit 420c46e

Browse files
committed
feat: about 页补充示例获取方式说明
1 parent 73b5321 commit 420c46e

2 files changed

Lines changed: 66 additions & 8 deletions

File tree

‎platforms/app-plus/about/about.vue‎

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,19 @@
99
<text class="code">uni-app</text>
1010
是一个使用 <text class="code">Vue.js</text> 开发跨平台应用的前端框架 。
1111
</view>
12-
<button type="primary" @tap="share">分享</button>
12+
<view class="source">
13+
<view class="title">本示例源码获取方式:</view>
14+
<view class="source-list">
15+
<view class="source-cell">
16+
<text space="nbsp">1. </text>
17+
<text>下载 HBuilderX,新建 uni-app 项目时选择 <text class="code">Hello uni-app</text> 模板。</text>
18+
</view>
19+
<view class="source-cell">
20+
<text space="nbsp">2. </text><text @click="openLink" class="link">{{sourceLink}}</text>
21+
</view>
22+
</view>
23+
</view>
24+
<button type="primary" @click="share">分享</button>
1325
</view>
1426
<view class="version">
1527
当前版本:{{version}}
@@ -22,7 +34,8 @@
2234
data(){
2335
return {
2436
providerList:[],
25-
version:''
37+
version:'',
38+
sourceLink: 'https://github.com/dcloudio/hello-uniapp'
2639
}
2740
},
2841
onLoad() {
@@ -114,6 +127,9 @@
114127
});
115128
}
116129
})
130+
},
131+
openLink() {
132+
plus.runtime.openURL(this.sourceLink)
117133
}
118134
}
119135
}
@@ -130,8 +146,8 @@
130146
background-color: #FFFFFF;
131147
}
132148
image{
133-
width: 400upx;
134-
height: 400upx;
149+
width: 360upx;
150+
height: 360upx;
135151
}
136152
.about{
137153
flex-direction: column;
@@ -166,4 +182,15 @@
166182
justify-content: center;
167183
color: #ccc;
168184
}
185+
.source {
186+
margin-top: 30upx;
187+
flex-direction: column;
188+
}
189+
190+
.source-list {
191+
flex-direction: column;
192+
}
193+
.link {
194+
color: #007AFF;
195+
}
169196
</style>

‎platforms/h5/about/about.vue‎

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,19 @@
77
</view>
88
<view class="desc">
99
<text class="code">uni-app</text>
10-
是一个使用 <text class="code">Vue.js</text> 开发跨平台应用的前端框架 。
10+
是一个使用 <text class="code">Vue.js</text> 开发跨平台应用的前端框架。
11+
</view>
12+
<view class="source">
13+
<view class="title">本示例源码获取方式:</view>
14+
<view class="source-list">
15+
<view class="source-cell">
16+
<text space="nbsp">1. </text>
17+
<text>下载 HBuilderX,新建 uni-app 项目时选择 <text class="code">Hello uni-app</text> 模板。</text>
18+
</view>
19+
<view class="source-cell">
20+
<text space="nbsp">2. </text><text @click="openLink" class="link">{{sourceLink}}</text>
21+
</view>
22+
</view>
1123
</view>
1224
</view>
1325
</view>
@@ -16,7 +28,14 @@
1628
<script>
1729
export default {
1830
data() {
19-
return {};
31+
return {
32+
sourceLink: 'https://github.com/dcloudio/hello-uniapp'
33+
};
34+
},
35+
methods:{
36+
openLink() {
37+
window.open(this.sourceLink);
38+
}
2039
}
2140
}
2241
</script>
@@ -33,8 +52,8 @@
3352
}
3453
3554
image {
36-
width: 400upx;
37-
height: 400upx;
55+
width: 360upx;
56+
height: 360upx;
3857
}
3958
4059
.about {
@@ -68,4 +87,16 @@
6887
color: #e96900;
6988
background-color: #f8f8f8;
7089
}
90+
91+
.source {
92+
margin-top: 30upx;
93+
flex-direction: column;
94+
}
95+
96+
.source-list {
97+
flex-direction: column;
98+
}
99+
.link {
100+
color: #007AFF;
101+
}
71102
</style>

0 commit comments

Comments
 (0)