Merge branch 'dd-7' of https://git.oa00.com/xiaowen/swsWecat into dd-7
commit
dad1144c43
@ -1,74 +0,0 @@
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
roomType:{
|
||||
type: String,
|
||||
value:"会议室类型"
|
||||
},
|
||||
selectBox:{
|
||||
type: Array,
|
||||
value:[]
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
levelInd:0,
|
||||
showItems:false,
|
||||
array:[],
|
||||
roomType:'',
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
bindLevelChange(e){
|
||||
let index = e.currentTarget.dataset.ind
|
||||
let showItems = true
|
||||
let array = this.data.selectBox[index].array
|
||||
this.setData({
|
||||
showItems: showItems,
|
||||
array,
|
||||
levelInd:index,
|
||||
roomType:''
|
||||
})
|
||||
},
|
||||
selectItem(e){
|
||||
// console.log(e.currentTarget.dataset.type)
|
||||
let val = e.currentTarget.dataset.type
|
||||
this.data.selectBox[this.data.levelInd].roomType = val
|
||||
let selectBox = this.data.selectBox
|
||||
let data = {
|
||||
type: this.data.levelInd,
|
||||
val: val
|
||||
}
|
||||
this.triggerEvent("bindValue",data)
|
||||
|
||||
|
||||
this.setData({
|
||||
roomType: val,
|
||||
showItems: false,
|
||||
selectBox
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
tapPages(){
|
||||
this.setData({
|
||||
showItems: false,
|
||||
})
|
||||
},
|
||||
showPicker(){
|
||||
this.setData({
|
||||
showItems: true,
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"component": true
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
<view class="page">
|
||||
<view class="allPage" bindtap="tapPages">
|
||||
<view class="selectBox" catchtap='showPicker'>
|
||||
<view class="selectTypeHead" style="justify-content:{{selectBox.length%2==0 ? 'space-around':'space-between' }}">
|
||||
<view class="roomType " wx:for="{{selectBox}}" wx:key="index" data-ind="{{index}}" catchtap="bindLevelChange">
|
||||
<text>{{item.roomType}}</text>
|
||||
<i class="down-arrow"></i>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="selectItems" wx:if="{{showItems}}">
|
||||
<view class="items" wx:for='{{array}}' data-type="{{item}}" catchtap="selectItem">{{item}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
@ -1,58 +0,0 @@
|
||||
.down-arrow{
|
||||
display: inline-block;
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
border-right: 2rpx solid #999;
|
||||
border-bottom: 2rpx solid #999;
|
||||
transform: rotate(45deg);
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.roomType{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
|
||||
}
|
||||
.selectBox{
|
||||
display: flex;
|
||||
}
|
||||
.selectTypeHead{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
padding: 20rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
width: 100vw;
|
||||
}
|
||||
.selectItems{
|
||||
background-color: #fff;
|
||||
animation:transp 0.5s ease-in-out;
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
width: 100vw;
|
||||
height: 80rpx;
|
||||
}
|
||||
.items{
|
||||
height: 100rpx;
|
||||
padding: 10rpx;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1rpx solid #D9D9D9;
|
||||
}
|
||||
@keyframes transp {
|
||||
from{opacity: 0;}
|
||||
to{opacity: 1;}
|
||||
}
|
||||
.allPage{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: transparent;
|
||||
z-index: 100;
|
||||
}
|
||||
.page{
|
||||
height: 88rpx;
|
||||
overflow: hidden;
|
||||
}
|
@ -1,15 +1,13 @@
|
||||
<!--pages/index/total/tatal.wxml-->
|
||||
<view class="content" wx:for="{{content}}" wx:key="">
|
||||
<view class="content" wx:for="{{content}}" wx:key="" id="{{item.id}}" bindtap="derail">
|
||||
<view class="content_event">
|
||||
<view class="content_pinpai">{{item.sourcetime}}
|
||||
</view>
|
||||
<view class="content_title">{{item.title}}
|
||||
</view>
|
||||
<view class="content_text">
|
||||
<view class="content_pinpai">作者:{{item.user_author}}
|
||||
</view>
|
||||
<view class="content_pinpai">媒体:{{item.source}}
|
||||
</view>
|
||||
<view class="content_pinpai">作者:{{item.user_author}} </view>
|
||||
<view class="content_pinpai">媒体:{{item.source}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
Loading…
Reference in new issue