Skip to content

Commit

Permalink
Merge branch 'master' of github.com:dcloudio/uni-app
Browse files Browse the repository at this point in the history
  • Loading branch information
zhetengbiji committed Nov 15, 2018
2 parents 7ba75cf + 8266b2e commit 4c6dbef
Show file tree
Hide file tree
Showing 13 changed files with 324 additions and 228 deletions.
77 changes: 75 additions & 2 deletions examples/hello-uniapp/common/uni.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,14 @@ form {
padding:20upx 0;
line-height:1.5;
}
.uni-title text{font-size:24upx; color:#888;}
.uni-text{
font-size:28upx;
}
.uni-title text{
font-size:24upx;
color:#888;
}

.uni-text-gray{
color: #ccc;
}
Expand Down Expand Up @@ -515,6 +522,10 @@ radio-group label, checkbox-group label{
.uni-triplex-left {
width: 84%;
}
.uni-triplex-left .uni-title{
padding:8upx 0;
}
.uni-triplex-left .uni-text, .uni-triplex-left .uni-text-small{color:#999999;}
.uni-triplex-right {
width: 16%;
text-align: right;
Expand Down Expand Up @@ -894,4 +905,66 @@ radio-group label, checkbox-group label{
.uni-swiper-msg-icon{width:50upx; margin-right:20upx;}
.uni-swiper-msg-icon image{width:100%; flex-shrink:0;}
.uni-swiper-msg swiper{width:100%; height:50upx;}
.uni-swiper-msg swiper-item{line-height:50upx;}
.uni-swiper-msg swiper-item{line-height:50upx;}

/* product */
.uni-product-list {
display: flex;
width: 100%;
flex-wrap: wrap;
flex-direction: row;
}

.uni-product {
padding: 20upx;
display: flex;
flex-direction: column;
}

.image-view {
height: 330upx;
width: 330upx;
margin:12upx 0;
}

.uni-product-image {
height: 330upx;
width: 330upx;
}

.uni-product-title {
width: 300upx;
word-break: break-all;
display: -webkit-box;
overflow: hidden;
line-height:1.5;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}

.uni-product-price {
margin-top:10upx;
font-size: 28upx;
line-height:1.5;
position: relative;
}

.uni-product-price-original {
color: #e80080;
}

.uni-product-price-favour {
color: #888888;
text-decoration: line-through;
margin-left: 10upx;
}

.uni-product-tip {
position: absolute;
right: 10upx;
background-color: #ff3333;
color: #ffffff;
padding: 0 10upx;
border-radius: 5upx;
}
10 changes: 7 additions & 3 deletions examples/hello-uniapp/components/graceCountd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<view class="grace-countdown-numbers" :style="{borderColor:borderColor, color:fontColor, background:bgrColor}">{{s}}</view>
</view>
</template>
<script>
<script>
export default {
name: "graceCountd",
props: {
Expand All @@ -33,7 +33,8 @@ export default {
}
},
data() {
return {
return {
setTime:null,
h: '00',
i: '00',
s: '00',
Expand Down Expand Up @@ -62,9 +63,12 @@ export default {
this.setInterValFunc(this);
}
},
beforeDestroy(){
clearInterval(this.setTime)
},
methods: {
setInterValFunc:function(obj){
setInterval(function(){ obj.countDown(obj);}, 1000);
this.setTime = setInterval(function(){ obj.countDown(obj);}, 1000);
},
countDown: function (self){
var leftTime = self.leftTime - new Date();
Expand Down
21 changes: 6 additions & 15 deletions examples/hello-uniapp/pages.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
"color": "#999999"
}]
}
},
"h5": {
"titleNView": {
"buttons": []
}
}
}
},
Expand All @@ -35,11 +30,6 @@
"color": "#999999"
}]
}
},
"h5": {
"titleNView": {
"buttons": []
}
}
}
},
Expand All @@ -56,11 +46,6 @@
"color": "#999999"
}]
}
},
"h5": {
"titleNView": {
"buttons": []
}
}
}
},
Expand Down Expand Up @@ -485,6 +470,12 @@
"navigationBarTitleText": "关于"
}
},
{
"path": "platforms/h5/about/about",
"style": {
"navigationBarTitleText": "关于"
}
},
{
"path": "platforms/app-plus/tabbar/tabbar",
"style": {
Expand Down
7 changes: 6 additions & 1 deletion examples/hello-uniapp/pages/tabBar/API/API.vue
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,12 @@
},
onNavigationBarButtonTap(e) {
uni.navigateTo({
url: '/platforms/app-plus/about/about'
// #ifdef APP-PLUS
url: '/platforms/app-plus/about/about',
// #endif
// #ifdef H5
url: '/platforms/h5/about/about',
// #endif
})
},
methods: {
Expand Down
103 changes: 56 additions & 47 deletions examples/hello-uniapp/pages/tabBar/component/component.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,58 +28,62 @@
data() {
return {
lists: [{
id: 'view',
name: '视图容器',
open: false,
pages: [
'view',
'scroll-view',
'swiper',
//#ifndef H5
'movable-view',
//#endif
]
}, {
id: 'content',
name: '基础内容',
open: false,
pages: ['text', 'rich-text', 'icon', 'progress']
}, {
id: 'form',
name: '表单组件',
open: false,
pages: ['button', 'checkbox', 'form', 'input', 'label', 'picker', 'picker-view', 'radio',
'slider',
'switch', 'textarea'
]
}, {
id: 'nav',
name: '导航',
open: false,
pages: ['navigator']
}, {
id: 'media',
name: '媒体组件',
open: false,
pages: ['image', 'audio', 'video']
}, {
id: 'map',
name: '地图',
open: false,
pages: ['map']
id: 'view',
name: '视图容器',
open: false,
pages: [
'view',
'scroll-view',
'swiper',
//#ifndef H5
'movable-view',
//#endif
]
}, {
id: 'content',
name: '基础内容',
open: false,
pages: ['text', 'rich-text', 'icon', 'progress']
}, {
id: 'form',
name: '表单组件',
open: false,
pages: ['button', 'checkbox', 'form', 'input', 'label', 'picker', 'picker-view', 'radio',
'slider',
'switch', 'textarea'
]
}, {
id: 'nav',
name: '导航',
open: false,
pages: ['navigator']
}, {
id: 'media',
name: '媒体组件',
open: false,
pages: ['image', 'audio', 'video']
}, {
id: 'map',
name: '地图',
open: false,
pages: ['map']
},
// #ifndef H5
}, {
id: 'web-view',
name: '网页',
open: false,
pages: ['web-view'],
{
id: 'web-view',
name: '网页',
open: false,
pages: ['web-view'],
},
// #endif
}]
]
}
},
onLoad() {
// #ifdef APP-PLUS
//web-view组件支持本地html,依赖最新版的客户端基座
// web-view组件支持本地html,依赖最新版的客户端基座
var innerversion = plus.runtime.innerVersion;
var _v = innerversion.substring(innerversion.lastIndexOf('.') + 1, innerversion.length);
if (_v && parseInt(_v) >= 53650) {
Expand All @@ -103,7 +107,12 @@
},
onNavigationBarButtonTap(e) {
uni.navigateTo({
url: '/platforms/app-plus/about/about'
// #ifdef APP-PLUS
url: '/platforms/app-plus/about/about',
// #endif
// #ifdef H5
url: '/platforms/h5/about/about',
// #endif
})
},
methods: {
Expand Down
13 changes: 9 additions & 4 deletions examples/hello-uniapp/pages/tabBar/template/template.vue
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,12 @@
}, {
name: '倒计时',
url: 'countdown'
}
},
// #ifdef APP-PLUS
, {
{
name: '聊天窗口 chat',
url: 'im-chat'
}
},
// #endif
]
}
Expand All @@ -209,7 +209,12 @@
},
onNavigationBarButtonTap(e) {
uni.navigateTo({
url: '/platforms/app-plus/about/about'
// #ifdef APP-PLUS
url: '/platforms/app-plus/about/about',
// #endif
// #ifdef H5
url: '/platforms/h5/about/about',
// #endif
})
},
methods: {
Expand Down
34 changes: 5 additions & 29 deletions examples/hello-uniapp/pages/template/accordion/accordion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
</swiper-item>
</swiper>
<view v-if="list.type === 'font'" class="page-pd">
<view class="size-5">hello uni-app</view>
<view class="size-4">hello uni-app</view>
<view class="size-3">hello uni-app</view>
<view class="size-2">hello uni-app</view>
<view class="size-1">hello uni-app</view>
<view class="uni-h1">hello uni-app</view>
<view class="uni-h2">hello uni-app</view>
<view class="uni-h3">hello uni-app</view>
<view class="uni-h4">hello uni-app</view>
<view class="uni-h5">hello uni-app</view>
</view>
<view v-if="list.type === 'list'">
<view class="uni-list">
Expand Down Expand Up @@ -89,10 +89,6 @@
padding-top: 60upx;
}
page {
background: #efeff4;
}
.list-collapse {
padding-left: 36upx;
box-sizing: border-box;
Expand All @@ -105,24 +101,4 @@
.page-pd {
padding: 36upx;
}
.size-5 {
font-size: 50upx;
}
.size-4 {
font-size: 40upx;
}
.size-3 {
font-size: 30upx;
}
.size-2 {
font-size: 20upx;
}
.size-1 {
font-size: 10upx;
}
</style>
Loading

0 comments on commit 4c6dbef

Please sign in to comment.