未验证 提交 176a8cf5 编写于 作者: H hulin 提交者: GitHub

Merge pull request #59 from zhetengbiji/master

更新示例
......@@ -14,7 +14,17 @@
vnode.data.on.click = this._change;
}
}
return createElement('scroller', {//如果需要左右滑动用scroller,不需要的话用div就行,添加个属性需要时将scroller添加 children
return createElement('div', {//如果需要左右滑动用scroller,不需要的话用div就行,添加个属性需要时将scroller添加 children
style: {
height:'100px',
width:'750px',
flexDirection:'row',
borderBottomWidth: "1px",
borderColor: "#c8c7cc",
borderBottomStyle: "solid"
}
}, [
createElement('scroller', {
attrs: {
scrollDirection:'horizontal',
showScrollbar:'false'
......@@ -23,10 +33,9 @@
height:'100px',
width:'750px',
flexDirection:'row'
// justifyContent: 'space-around',
// alignItems:'center'
}
}, this.$slots.default)
])
},
methods:{
_change(e){
......
......@@ -44,8 +44,8 @@
if (!newVNode.data.on) {
newVNode.data.on = Object.create(null)
}
newVNode.data.attrs.index = this.tabIndex
newVNode.data.props.index = this.tabIndex
newVNode.data.attrs.index = this.index
newVNode.data.props.index = this.index
newVNode.data.on.change = this._change
newVNodes.push(newVNode)
}
......
<template>
<view class="uni-drawer" :class="{'uni-drawer-visible':visible,'uni-drawer-right':rightMode}">
<view class="uni-drawer" :catchtouchmove="catchtouchmove" :class="{'uni-drawer-visible':visible,'uni-drawer-right':rightMode}">
<view v-if="showMask" class="uni-drawer-mask" @tap="close"></view>
<view class="uni-drawer-content">
<slot></slot>
......@@ -31,7 +31,8 @@
},
data() {
return {
rightMode: false
rightMode: false,
catchtouchmove: false
}
},
computed: {
......@@ -41,6 +42,9 @@
},
created() {
this.rightMode = this.mode === 'right'
//#ifdef MP-WEIXIN
this.catchtouchmove = true
//#endif
},
methods: {
close() {
......
......@@ -55,10 +55,12 @@
"<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>"
]
},
"ios" : {},
/* ios打包配置 */
"sdkConfigs" : {},
/* SDK配置 */
"ios" : {/* ios打包配置 */
"UIBackgroundModes":["audio"]
},
"sdkConfigs" : {/* SDK配置 */
},
"orientation" : [ "portrait-primary" ]
}
},
......
......@@ -585,7 +585,8 @@
"fontSize" : "22px"
}
]
}
},
"bounce" : "none"
}
}
},
......
<template>
<div class="root">
<tabs class="tabs" @change="changeTab" :index="tabIndex">
<tab-bar class="tab-bar" scroll="true">
<div>
<tabs @change="changeTab" :index="tabIndex">
<tab-bar>
<div class="tab-bar-item" v-for="(tabBar, t) in tabBars" :key="t" :ref="tabBar.id + t">
<text class="tab-bar-title" :class="[tabIndex === t ? 'active' : '']">{{tabBar.name}}</text>
</div>
</tab-bar>
<tab-content class="item-tabcnt">
<tab-content>
<list class="list" @loadmore="loadMore(index1)" loadmoreoffset="10" v-for="(tab,index1) in newsitems" :key="index1">
<refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown" :display="refreshing ? 'show' : 'hide'">
<!-- <loading-indicator class="indicator"></loading-indicator> -->
<text class="refresh-text">{{refreshText}}</text>
</refresh>
<cell v-for="(newsitem,index2) in tab.data" :key="index2">
......@@ -174,17 +173,14 @@
}
},
close(index1,index2){
console.log(963)
uni.showModal({
content: '是否删除本条信息?',
success:(res) => {
console.log(123)
if (res.confirm) {
console.log("999")
this.newsitems[index1].data.splice(index2,1);
}
}
});
})
},
async changeTab(e) {
this.tabIndex = e.index;
......@@ -226,33 +222,6 @@
</script>
<style>
.root {
flex-direction: column;
}
.title {
height: 88px;
background-color: #F8F8F8;
justify-content: center;
}
.title-text {
font-size: 34px;
text-align: center;
}
.tabs {
flex: 1;
}
.tab-bar {
border-bottom-width: 1px;
border-color: #c8c7cc;
border-bottom-style: solid;
background-color: #fff;
height: 100px;
}
.tab-bar-item {
width: 150px;
height: 100px;
......@@ -272,31 +241,19 @@
color: #007AFF;
}
.tab-list {
width: 100%;
width: 600px;
height: 90px;
margin-left: 75px;
margin-top: 20px;
.loadmore {
height: 70px;
width: 750px;
flex-direction: column;
justify-content: center;
border-width: 1px;
border-style: solid;
border-color: rgb(162, 217, 192);
background-color: rgba(162, 217, 192, 0.2);
}
.loadmore-text {
font-size: 30px;
text-align: center;
color: #999999;
}
.loadmore {
height: 70px;
flex-direction: column;
justify-content: center;
}
.refresh {
width: 750px;
height: 70px;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册