Skip to content

Commit a8cd419

Browse files
committed
新增了cover-view示例
修改了组件里一些示例的描述
1 parent f475201 commit a8cd419

8 files changed

Lines changed: 55 additions & 11 deletions

File tree

pages.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@
8282
}
8383
},
8484
// #ifndef MP-TOUTIAO
85+
{
86+
"path" : "pages/component/cover-view/cover-view",
87+
"style" : {
88+
"navigationBarTitleText": "cover-view"
89+
}
90+
},
8591
{
8692
"path": "pages/component/movable-view/movable-view",
8793
"style": {
@@ -544,7 +550,7 @@
544550
"navigationBarTitleText": "震动"
545551
}
546552
}
547-
],
553+
],
548554
"subPackages": [{
549555
"root": "pages/extUI",
550556
"pages": [{

pages/component/audio/audio.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<template>
22
<view>
3-
<page-head :title="title"></page-head>
3+
<page-head title="audio"></page-head>
44
<view class="uni-padding-wrap uni-common-mt">
55
<view class="uni-center">
66
<audio style="text-align: left" :src="current.src" :poster="current.poster" :name="current.name" :author="current.author"
77
:action="audioAction" controls></audio>
8+
<view class="">audio组件不再维护,建议使用能力更强的uni.createInnerAudioContext()</view>
89
</view>
910
</view>
1011
</view>
@@ -13,7 +14,6 @@
1314
export default {
1415
data() {
1516
return {
16-
title: 'audio',
1717
current: {
1818
poster: 'https://img-cdn-qiniu.dcloud.net.cn/uniapp/audio/music.jpg',
1919
name: '致爱丽丝',
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<template>
2+
<view>
3+
<page-head title="cover-view用于覆盖map、video等原生组件"></page-head>
4+
<view class="uni-common-mt">
5+
<view>
6+
<map>
7+
<cover-view class="cover-view">简单的cover-view</cover-view>
8+
<cover-image class="cover-image" src="/static/uni.png"></cover-image>
9+
</map>
10+
</view>
11+
</view>
12+
</view>
13+
</template>
14+
15+
<script>
16+
export default {
17+
data() {
18+
return {
19+
};
20+
}
21+
}
22+
</script>
23+
24+
<style>
25+
map{
26+
width: 750upx;
27+
}
28+
.cover-view{
29+
width: 375upx;
30+
text-align: center;
31+
background-color: #DDDDDD;
32+
}
33+
.cover-image{
34+
position: absolute;
35+
left: 300upx;
36+
width: 96px;
37+
height: 96px;
38+
}
39+
</style>

pages/component/movable-view/movable-view.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<view class="page-body">
3-
<page-head title="movable-view"></page-head>
3+
<page-head title="movable-view,可拖动视图"></page-head>
44
<view class="uni-padding-wrap uni-common-mt">
55
<view class="uni-title uni-common-mt">
66
示例 1

pages/component/scroll-view/scroll-view.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<view>
3-
<page-head :title="title"></page-head>
3+
<page-head title="scroll-view,区域滚动视图"></page-head>
44
<view class="uni-padding-wrap uni-common-mt">
55
<view class="uni-title uni-common-mt">
66
Vertical Scroll
@@ -36,7 +36,6 @@
3636
export default {
3737
data() {
3838
return {
39-
title: 'scroll-view',
4039
scrollTop: 0,
4140
old: {
4241
scrollTop: 0

pages/component/swiper/swiper.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<view>
3-
<page-head :title="title"></page-head>
3+
<page-head title="swiper,可滑动视图"></page-head>
44
<view class="uni-padding-wrap">
55
<view class="page-section swiper">
66
<view class="page-section-spacing">
@@ -48,7 +48,6 @@
4848
export default {
4949
data() {
5050
return {
51-
title: 'swiper',
5251
background: ['color1', 'color2', 'color3'],
5352
indicatorDots: true,
5453
autoplay: true,

pages/component/view/view.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<view>
3-
<page-head :title="title"></page-head>
3+
<page-head title="view"></page-head>
44
<view class="uni-padding-wrap uni-common-mt">
55
<view class="uni-hello-text">
66
Flex是Flexible Box的缩写,意为“弹性布局”,用来为盒状模型提供最大的灵活性。当设置display: flex后,继续给view等容器组件设置flex-direction: row或column,就可以在该容器内按行或列排布子组件。uni-app默认全局使用flex布局(在App.vue里预设了)。因为flex布局有利于跨更多平台,尤其是采用原生渲染的平台。
@@ -105,7 +105,6 @@
105105
export default {
106106
data() {
107107
return {
108-
title: 'view'
109108
}
110109
}
111110
}

pages/tabBar/component/component.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@
3434
pages: [
3535
'view',
3636
'scroll-view',
37-
'swiper',
37+
'swiper'
3838
// #ifndef MP-TOUTIAO
39+
,
3940
'movable-view',
41+
'cover-view'
4042
// #endif
4143
]
4244
}, {

0 commit comments

Comments
 (0)