初始化
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
|
||||
|
||||
Component({
|
||||
options: {
|
||||
addGlobalClass: true,
|
||||
multipleSlots: true
|
||||
},
|
||||
properties: {
|
||||
tabIndex: {
|
||||
type: Number,
|
||||
value: 0
|
||||
}
|
||||
},
|
||||
relations: {
|
||||
'../vtabs/vtabs': {
|
||||
type: 'parent'
|
||||
}
|
||||
},
|
||||
lifetimes: {
|
||||
attached: function attached() {}
|
||||
},
|
||||
methods: {
|
||||
calcHeight: function calcHeight(callback) {
|
||||
const query = this.createSelectorQuery()
|
||||
query.select('.weui-vtabs-content__item').boundingClientRect(function (rect) {
|
||||
callback && callback(rect)
|
||||
}).exec()
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<view class="weui-vtabs-content__item" id="weui-vtabs-content__{{tabIndex}}">
|
||||
<slot ></slot>
|
||||
</view>
|
||||
@@ -0,0 +1,4 @@
|
||||
.weui-tabs-content__item {
|
||||
width: 100%;
|
||||
height: 100%
|
||||
}
|
||||
Reference in New Issue
Block a user