提交 4c6dbef3 编写于 作者: 郭胜强

Merge branch 'master' of github.com:dcloudio/uni-app

......@@ -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;
}
......@@ -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;
......@@ -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;}
\ No newline at end of file
.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;
}
\ No newline at end of file
......@@ -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: {
......@@ -33,7 +33,8 @@ export default {
}
},
data() {
return {
return {
setTime:null,
h: '00',
i: '00',
s: '00',
......@@ -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();
......
......@@ -14,11 +14,6 @@
"color": "#999999"
}]
}
},
"h5": {
"titleNView": {
"buttons": []
}
}
}
},
......@@ -35,11 +30,6 @@
"color": "#999999"
}]
}
},
"h5": {
"titleNView": {
"buttons": []
}
}
}
},
......@@ -56,11 +46,6 @@
"color": "#999999"
}]
}
},
"h5": {
"titleNView": {
"buttons": []
}
}
}
},
......@@ -485,6 +470,12 @@
"navigationBarTitleText": "关于"
}
},
{
"path": "platforms/h5/about/about",
"style": {
"navigationBarTitleText": "关于"
}
},
{
"path": "platforms/app-plus/tabbar/tabbar",
"style": {
......
......@@ -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: {
......
......@@ -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) {
......@@ -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: {
......
......@@ -191,12 +191,12 @@
}, {
name: '倒计时',
url: 'countdown'
}
},
// #ifdef APP-PLUS
, {
{
name: '聊天窗口 chat',
url: 'im-chat'
}
},
// #endif
]
}
......@@ -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: {
......
......@@ -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">
......@@ -89,10 +89,6 @@
padding-top: 60upx;
}
page {
background: #efeff4;
}
.list-collapse {
padding-left: 36upx;
box-sizing: border-box;
......@@ -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>
......@@ -57,13 +57,9 @@
}
.page {
padding-top: 60upx;
padding-top: 60upx; background: #efeff4;
}
page {
background: #efeff4;
}
.image-view {
height: 480upx;
overflow: hidden;
......
......@@ -17,46 +17,73 @@
</template>
<script>
import graceCountd from "../../../components/graceCountd.vue";
//模拟3个时间
var dateObj = new Date();
var currentTime = dateObj.getTime();
var timer1 = formatDateTime((currentTime + 1000 * 2000));
var timer2 = formatDateTime((currentTime + 1000 * 3000));
var timer3 = formatDateTime((currentTime + 1000 * 5000));
//时间戳 转 YY-mm-dd HH:ii:ss
function formatDateTime(inputTime){
var date = new Date(inputTime);
var y = date.getFullYear();
var m = date.getMonth() + 1;
m = m < 10 ? ('0' + m) : m;
var d = date.getDate();
d = d < 10 ? ('0' + d) : d;
var h = date.getHours();
h = h < 10 ? ('0' + h) : h;
var minute = date.getMinutes();
var second = date.getSeconds();
minute = minute < 10 ? ('0' + minute) : minute;
second = second < 10 ? ('0' + second) : second;
return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
};
export default {
data(){
return {
title : '倒计时',
timer1 : timer1,
timer2 : timer2,
timer3 : timer3
}
},
components:{
graceCountd
data() {
var dateObj = new Date();
var currentTime = dateObj.getTime();
var timer1 = this.formatDateTime((currentTime + 1000 * 2000));
var timer2 = this.formatDateTime((currentTime + 1000 * 3000));
var timer3 = this.formatDateTime((currentTime + 1000 * 5000));
return {
title: '倒计时',
timer1: timer1,
timer2: timer2,
timer3: timer3
}
},
components: {
graceCountd
},
methods: {
formatDateTime(inputTime) { //时间戳 转 YY-mm-dd HH:ii:ss
var date = new Date(inputTime);
var y = date.getFullYear();
var m = date.getMonth() + 1;
m = m < 10 ? ('0' + m) : m;
var d = date.getDate();
d = d < 10 ? ('0' + d) : d;
var h = date.getHours();
h = h < 10 ? ('0' + h) : h;
var minute = date.getMinutes();
var second = date.getSeconds();
minute = minute < 10 ? ('0' + minute) : minute;
second = second < 10 ? ('0' + second) : second;
return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
}
},
}
}
</script>
<style>
view{display:flex; width:100%; flex-wrap:wrap; justify-content:center;}
.uni-countdown{padding:2rpx 0; flex-wrap:nowrap; justify-content:center;}
.uni-countdown-splitor{width:auto !important; justify-content:center; line-height:44upx; padding:0 5upx;}
.uni-countdown-numbers{line-height:44upx; width:auto !important; padding:0 10upx; justify-content:center; height:44upx; border-radius:8upx; margin:0 5upx; border:1px solid #000000; font-size:22upx;}
</style>
\ No newline at end of file
view {
display: flex;
width: 100%;
flex-wrap: wrap;
justify-content: center;
}
.uni-countdown {
padding: 2rpx 0;
flex-wrap: nowrap;
justify-content: center;
}
.uni-countdown-splitor {
width: auto !important;
justify-content: center;
line-height: 44upx;
padding: 0 5upx;
}
.uni-countdown-numbers {
line-height: 44upx;
width: auto !important;
padding: 0 10upx;
justify-content: center;
height: 44upx;
border-radius: 8upx;
margin: 0 5upx;
border: 1px solid #000000;
font-size: 22upx;
}
</style>
......@@ -6,9 +6,9 @@
<view class="uni-list-cell" hover-class="uni-list-cell-hover">
<view class="uni-triplex-row">
<view class="uni-triplex-left">
<text class="uni-h4 uni-ellipsis">列表主标题</text>
<text class="uni-h5">列表副标题</text>
<text class="uni-h6 uni-ellipsis">列表内容文字,列表内容文字,列表内容文字,列表内容文字,列表内容文字,列表内容文字</text>
<text class="uni-title uni-ellipsis">列表主标题</text>
<text class="uni-text">列表副标题</text>
<text class="uni-text-small uni-ellipsis">列表内容文字,列表内容文字,列表内容文字,列表内容文字,列表内容文字,列表内容文字</text>
</view>
<view class="uni-triplex-right">
<text class="uni-h5">12:15</text>
......
......@@ -44,17 +44,15 @@
</view>
</view>
<view class="title">卡片列表</view>
<view class="uni-card">
<view class="uni-list">
<view class="uni-list-cell" hover-class="uni-list-cell-hover" v-for="(value,key) in list" :key="key">
<view class="uni-media-list uni-pull-right">
<view class="uni-media-list-logo">
<image v-if="showImg" :src="value.img"></image>
</view>
<view class="uni-media-list-body">
<view class="uni-media-list-text-top">{{value.title}}</view>
<view class="uni-media-list-text-bottom uni-ellipsis">{{value.content}}</view>
</view>
<view class="uni-list">
<view class="uni-list-cell" hover-class="uni-list-cell-hover" v-for="(value,key) in list" :key="key">
<view class="uni-media-list uni-pull-right">
<view class="uni-media-list-logo">
<image v-if="showImg" :src="value.img"></image>
</view>
<view class="uni-media-list-body">
<view class="uni-media-list-text-top">{{value.title}}</view>
<view class="uni-media-list-text-bottom uni-ellipsis">{{value.content}}</view>
</view>
</view>
</view>
......
<template>
<view class="page">
<page-head :title="title"></page-head>
<view class="product-list">
<view class="product" v-for="(product,index) in productList" :key="index">
<view class="uni-product-list">
<view class="uni-product" v-for="(product,index) in productList" :key="index">
<view class="image-view">
<image v-if="renderImage" class="product-image" :src="product.image"></image>
<image v-if="renderImage" class="uni-product-image" :src="product.image"></image>
</view>
<view class="product-title">{{product.title}}</view>
<view class="product-price">
<text class="product-price-favour">{{product.originalPrice}}</text>
<text class="product-price-original">{{product.favourPrice}}</text>
<text class="product-tip">{{product.tip}}</text>
<view class="uni-product-title">{{product.title}}</view>
<view class="uni-product-price">
<text class="uni-product-price-favour">{{product.originalPrice}}</text>
<text class="uni-product-price-original">{{product.favourPrice}}</text>
<text class="uni-product-tip">{{product.tip}}</text>
</view>
</view>
</view>
......@@ -22,7 +22,7 @@ export default {
data() {
return {
title: 'product-list',
productList: [],
productList: [],
renderImage: false
};
},
......@@ -102,64 +102,5 @@ export default {
</script>
<style>
.product-list {
display: flex;
width: 100%;
flex-wrap: wrap;
flex-direction: row;
}
.product {
padding: 10upx 20upx;
display: flex;
flex-direction: column;
}
.image-view {
height: 330upx;
width: 330upx;
margin:12upx 0;
}
.product-image {
height: 330upx;
width: 330upx;
}
.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;
}
.product-price {
margin-top:10upx;
font-size: 28upx;
line-height:1.5;
position: relative;
}
.product-price-original {
color: #e80080;
}
.product-price-favour {
color: #888888;
text-decoration: line-through;
margin-left: 10upx;
}
.product-tip {
position: absolute;
right: 10upx;
background-color: #ff3333;
color: #ffffff;
padding: 0 10upx;
border-radius: 5upx;
}
</style>
<template>
<view class="about">
<view class="content">
<view class="qrcode">
<image src="https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/app_download.png"></image>
<text class="tip">扫码体验uni-app</text>
</view>
<view class="desc">
<text class="code">uni-app</text>
是一个使用 <text class="code">Vue.js</text> 开发跨平台应用的前端框架 。
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {};
}
}
</script>
<style>
page,
view {
display: flex;
}
page {
min-height: 100%;
background-color: #FFFFFF;
}
image {
width: 400upx;
height: 400upx;
}
.about {
flex-direction: column;
flex: 1;
}
.content {
flex: 1;
padding: 30upx;
flex-direction: column;
justify-content: center;
}
.qrcode {
display: flex;
align-items: center;
flex-direction: column;
}
.qrcode .tip {
margin-top: 20upx;
}
.desc {
margin-top: 30upx;
display: block;
}
.code {
color: #e96900;
background-color: #f8f8f8;
}
</style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册