提交 e1bb936f 编写于 作者: H hulinneil

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

......@@ -39,6 +39,14 @@ form {
.uni-inline-item{
display: flex;
flex-direction: row;
align-items:center;
}
.uni-inline-item text{
margin-right: 20upx;
}
.uni-inline-item text:last-child{
margin-right: 0upx;
margin-left: 20upx;
}
/* page */
......@@ -779,6 +787,8 @@ radio-group label, checkbox-group label{
display: flex;
flex-direction: row;
font-size:28upx;
padding: 22upx 30upx;
justify-content: space-between;
}
.uni-input-group .uni-input-row:after {
......@@ -792,11 +802,6 @@ radio-group label, checkbox-group label{
background-color: #c8c7cc;
}
.uni-input-row {
padding: 22upx 30upx;
justify-content: space-between;
}
.uni-input-row label {
line-height: 70upx;
}
......
<template>
<div class="mpvue-picker">
<div :class="{'pickerMask':showPicker}" @click="maskClick" catchtouchmove="true"></div>
<div class="mpvue-picker-content " :class="{'mpvue-picker-view-show':showPicker}">
<div class="mpvue-picker__hd" catchtouchmove="true">
<div class="mpvue-picker__action" @click="pickerCancel">取消</div>
<div class="mpvue-picker__action" :style="{color:themeColor}" @click="pickerConfirm">确定</div>
</div>
<view class="mpvue-picker">
<view :class="{'pickerMask':showPicker}" @click="maskClick" catchtouchmove="true"></view>
<view class="mpvue-picker-content " :class="{'mpvue-picker-view-show':showPicker}">
<view class="mpvue-picker__hd" catchtouchmove="true">
<view class="mpvue-picker__action" @click="pickerCancel">取消</view>
<view class="mpvue-picker__action" :style="{color:themeColor}" @click="pickerConfirm">确定</view>
</view>
<!-- 单列 -->
<picker-view indicator-style="height: 40px;" class="mpvue-picker-view" :value="pickerValue" @change="pickerChange" v-if="mode==='selector' && pickerValueSingleArray.length > 0">
<block>
<picker-view-column>
<div class="picker-item" v-for="(item,index) in pickerValueSingleArray" :key="index">{{item.label}}</div>
<view class="picker-item" v-for="(item,index) in pickerValueSingleArray" :key="index">{{item.label}}</view>
</picker-view-column>
</block>
</picker-view>
......@@ -18,10 +18,10 @@
<picker-view indicator-style="height: 40px;" class="mpvue-picker-view" :value="pickerValue" @change="pickerChange" v-if="mode==='timeSelector'">
<block>
<picker-view-column>
<div class="picker-item" v-for="(item,index) in pickerValueHour" :key="index">{{item.label}}</div>
<view class="picker-item" v-for="(item,index) in pickerValueHour" :key="index">{{item.label}}</view>
</picker-view-column>
<picker-view-column>
<div class="picker-item" v-for="(item,index) in pickerValueMinute" :key="index">{{item.label}}</div>
<view class="picker-item" v-for="(item,index) in pickerValueMinute" :key="index">{{item.label}}</view>
</picker-view-column>
</block>
</picker-view>
......@@ -29,7 +29,7 @@
<picker-view indicator-style="height: 40px;" class="mpvue-picker-view" :value="pickerValue" @change="pickerChange" v-if="mode==='multiSelector'">
<block v-for="(n,index) in pickerValueMulArray.length" :key="index">
<picker-view-column>
<div class="picker-item" v-for="(item,index1) in pickerValueMulArray[n]" :key="index1">{{item.label}}</div>
<view class="picker-item" v-for="(item,index1) in pickerValueMulArray[n]" :key="index1">{{item.label}}</view>
</picker-view-column>
</block>
</picker-view>
......@@ -37,10 +37,10 @@
<picker-view indicator-style="height: 40px;" class="mpvue-picker-view" :value="pickerValue" @change="pickerChangeMul" v-if="mode==='multiLinkageSelector' && deepLength===2">
<block>
<picker-view-column>
<div class="picker-item" v-for="(item,index) in pickerValueMulTwoOne" :key="index">{{item.label}}</div>
<view class="picker-item" v-for="(item,index) in pickerValueMulTwoOne" :key="index">{{item.label}}</view>
</picker-view-column>
<picker-view-column>
<div class="picker-item" v-for="(item,index) in pickerValueMulTwoTwo" :key="index">{{item.label}}</div>
<view class="picker-item" v-for="(item,index) in pickerValueMulTwoTwo" :key="index">{{item.label}}</view>
</picker-view-column>
</block>
</picker-view>
......@@ -48,18 +48,18 @@
<picker-view indicator-style="height: 40px;" class="mpvue-picker-view" :value="pickerValue" @change="pickerChangeMul" v-if="mode==='multiLinkageSelector' && deepLength===3">
<block>
<picker-view-column>
<div class="picker-item" v-for="(item,index) in pickerValueMulThreeOne" :key="index">{{item.label}}</div>
<view class="picker-item" v-for="(item,index) in pickerValueMulThreeOne" :key="index">{{item.label}}</view>
</picker-view-column>
<picker-view-column>
<div class="picker-item" v-for="(item,index) in pickerValueMulThreeTwo" :key="index">{{item.label}}</div>
<view class="picker-item" v-for="(item,index) in pickerValueMulThreeTwo" :key="index">{{item.label}}</view>
</picker-view-column>
<picker-view-column>
<div class="picker-item" v-for="(item,index) in pickerValueMulThreeThree" :key="index">{{item.label}}</div>
<view class="picker-item" v-for="(item,index) in pickerValueMulThreeThree" :key="index">{{item.label}}</view>
</picker-view-column>
</block>
</picker-view>
</div>
</div>
</view>
</view>
</template>
<script>
......
......@@ -31,7 +31,7 @@
},
methods: {
setNaivgationBarTitle: function (e) {
var title = e.target.value.title
let title = e.detail.value.title
uni.setNavigationBarTitle({
title: title,
success: () => {
......@@ -45,4 +45,4 @@
}
}
</script>
<template>
<view class="page">
<scroll-view class="scrollList" scroll-y :scroll-into-view="scrollViewId" :style="{height:winHeight + 'px;'}">
<scroll-view class="scrollList" scroll-y :scroll-into-view="scrollViewId" :style="{height:winHeight + 'px'}">
<view class="uni-list">
<block v-for="(list,key) in lists" :key="key" v-if="list.data[0]">
<view class="uni-list-cell-divider" :id="list.letter">
{{list.letter}}
</view>
<view class="uni-list-cell" hover-class="uni-list-cell-hover" v-for="(item,index) in list.data" :key="index" :class="list.data.length -1 == index ? 'uni-list-cell-last' : ''">
<view class="uni-list-cell" hover-class="uni-list-cell-hover" v-for="(item,index) in list.data" :key="index"
:class="list.data.length -1 == index ? 'uni-list-cell-last' : ''">
<view class="uni-list-cell-navigate">
{{item}}
</view>
......@@ -14,9 +15,10 @@
</block>
</view>
</scroll-view>
<view class="uni-indexed-list-bar" :class="touchmove ? 'active' : ''" @touchstart="touchStart" @touchmove="touchMove" @touchend="touchEnd" @touchcancel="touchCancel" :style="{height:winHeight + 'px;'}">
<view class="uni-indexed-list-bar" :class="touchmove ? 'active' : ''" @touchstart="touchStart" @touchmove="touchMove"
@touchend="touchEnd" @touchcancel="touchCancel" :style="{height:winHeight + 'px'}">
<text v-for="(list,key) in lists" :key="key" class="uni-indexed-list-text" :class="touchmoveIndex == key ? 'active' : ''"
:style="{heigth:itemHeight + 'px',lineHeight:itemHeight + 'px'}">{{list.letter}}</text>
:style="{heigth:itemHeight + 'px',lineHeight:itemHeight + 'px'}">{{list.letter}}</text>
</view>
<view class="uni-indexed-list-alert" v-if="touchmove">
{{lists[touchmoveIndex].letter}}
......@@ -35,7 +37,7 @@
touchmove: false,
touchmoveIndex: -1,
itemHeight: 0,
winHeight:0,
winHeight: 0,
scrollViewId: "A"
}
},
......@@ -49,20 +51,26 @@
this.touchmove = true;
let pageY = e.touches[0].pageY;
let index = Math.floor(pageY / this.itemHeight);
this.scrollViewId = this.lists[index].letter;
this.touchmoveIndex = index;
let item = this.lists[index];
if (item) {
this.scrollViewId = item.letter;
this.touchmoveIndex = index;
}
},
touchMove(e) {
let pageY = e.touches[0].pageY;
let index = Math.floor(pageY / this.itemHeight);
this.scrollViewId = this.lists[index].letter;
this.touchmoveIndex = index;
let item = this.lists[index];
if (item) {
this.scrollViewId = item.letter;
this.touchmoveIndex = index;
}
},
touchEnd() {
this.touchmove = false;
this.touchmoveIndex = -1;
},
touchCancel(){
touchCancel() {
this.touchmove = false;
this.touchmoveIndex = -1;
}
......@@ -124,4 +132,4 @@
color: #fff;
background-color: rgba(0, 0, 0, 0.5);
}
</style>
</style>
......@@ -99,7 +99,7 @@
position: relative;
}
.uni-media-list-logo wx-image {
.uni-media-list-logo image {
position: absolute;
left: 0;
top: 0;
......
......@@ -8,7 +8,7 @@
</view>
</scroll-view>
<scroll-view class="nav-right" scroll-y :scroll-top="scrollTop" @scroll="scroll" :style="'height:'+height+'px'" scroll-with-animation>
<view :id="index==0?'first':''" class="nav-right-item" v-for="item in subCategoryList" :key="item">
<view :id="index===0?'first':''" class="nav-right-item" v-for="(item,index) in subCategoryList" :key="index">
<image :src="item.LOGO" />
<view>{{item.NAME}}</view>
</view>
......
......@@ -3,6 +3,8 @@
<page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-title">
<uni-icon size="16" type="info"></uni-icon>说明 : </view>
<view class="uni-helllo-text">
<view>在App端可在pages.json里配置buttons,暂不支持动态改变buttons的样式,使用onNavigationBarButtonTap可监听buttons的点击事件。</view>
<view>在微信小程序端,不支持配置buttons,故按钮不见了。</view>
</view>
......@@ -10,6 +12,7 @@
</view>
</template>
<script>
import uniIcon from '../../../components/uni-icon.vue'
export default {
data() {
return {
......@@ -21,6 +24,9 @@
title: e.index === 0 ? "你点了分享按钮" : "你点了收藏按钮",
icon: "none"
})
},
components:{
uniIcon
}
}
</script>
......
<template>
<view class="page">
<page-head :title="title"></page-head>
<view class="uni-padding-wrap">
<view class="uni-hello-text uni-common-mt">默认</view>
<view class="uni-hello-items">
<view class="uni-input-group uni-common-mt">
<view class="uni-input-row">
<label>默认</label>
<number-box></number-box>
</view>
<view class="uni-hello-text uni-common-mt">限定最小值和最大值(0~9)</view>
<view class="uni-hello-items">
<view class="uni-input-row">
<label>限定最小值和最大值</label>
<number-box :min="0" :max="9"></number-box>
</view>
<view class="uni-hello-text uni-common-mt">设定步长值(步长10)</view>
<view class="uni-hello-items">
<view class="uni-input-row">
<label>设定步长值(步长10)</label>
<number-box :step="10"></number-box>
</view>
<view class="uni-hello-text uni-common-mt">获取输入框的值</view>
<view class="uni-hello-items">
<view class="uni-inline-item">
<number-box v-on:change="onNumberChange"></number-box>
<text class="item-label-right">当前的值为:{{numberValue}}</text>
</view>
</view>
<view class="uni-hello-text uni-common-mt">输入框只读</view>
<view class="uni-hello-items">
<view class="uni-input-row">
<label>输入框只读</label>
<number-box :disabled="true"></number-box>
</view>
<view class="uni-hello-text uni-common-mt">在行内</view>
<view class="uni-hello-items">
<view class="uni-inline-item">
<text class="item-label">购买数量:</text>
<number-box></number-box>
</view>
<view class="uni-input-row">
<label>获取输入的值 : {{numberValue}}</label>
<number-box v-on:change="onNumberChange"></number-box>
</view>
<view class="uni-input-row">
<label>设置默认值</label>
<number-box :value="numberValue2"></number-box>
</view>
<view class="uni-hello-text uni-common-mt">在表单中</view>
<view class="uni-input-group">
<view class="uni-input-row">
<label>数字框一</label>
<number-box></number-box>
</view>
<view class="uni-input-row">
<label>数字框二</label>
<number-box></number-box>
</view>
</view>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-title">行内应用</view>
<view class="uni-inline-item">
<text>购买数量 : </text>
<number-box v-on:change="onNumberChange3"></number-box>
<text>{{numberValue3}}</text>
</view>
</view>
<view style="height:80upx;"></view>
......@@ -60,7 +45,9 @@
data() {
return {
title: 'number-box',
numberValue: 0
numberValue: 0,
numberValue2 : 5,
numberValue3 : 0
}
},
components: {
......@@ -69,23 +56,13 @@
methods: {
onNumberChange(value) {
this.numberValue = value;
},
onNumberChange3(value) {
this.numberValue3 = value;
console.log('购买数量 : ' + value);
}
}
}
</script>
<style>
.uni-hello-items{
padding:10upx 0;
}
.item-label {
line-height: 70upx;
font-size:28upx;
}
.item-label-right {
font-size:28upx;
line-height: 70upx;
margin-left: 20upx;
}
</style>
</style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册