From 47e86f543415585ab1e1b2b1ed1d98830817a1be Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期一, 19 九月 2022 09:41:07 +0800
Subject: [PATCH] 2022.9.16
---
component/switchtab/switchtab.js | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/component/switchtab/switchtab.js b/component/switchtab/switchtab.js
index 48f52b6..a3b3469 100644
--- a/component/switchtab/switchtab.js
+++ b/component/switchtab/switchtab.js
@@ -8,6 +8,14 @@
* 缁勪欢鐨勫睘鎬у垪琛�
*/
properties: {
+ extClass: {
+ type: String,
+ value: ''
+ },
+ extClassOn: {
+ type: String,
+ value: ''
+ },
tabList: {
type: Array,
value: []
@@ -29,6 +37,17 @@
// pageheight: '600px',
},
+ pageLifetimes: {
+ // 缁勪欢鎵�鍦ㄩ〉闈㈢殑鐢熷懡鍛ㄦ湡鍑芥暟
+ show: function () {
+ // this.refreshHeight(true)
+
+ },
+ hide: function () { },
+ resize: function () {
+ },
+ },
+
/**
* 缁勪欢鐨勬柟娉曞垪琛�
*/
@@ -38,6 +57,7 @@
if (e) {
setTimeout(() => {
const p = `.page${this.data.currentTab}`
+ // console.log(p);
this.tabsHeight(p);
}, 50);
}
@@ -45,7 +65,7 @@
//璁$畻swiper楂樺害鏂规硶锛堝湪鍒囨崲鐨勬椂鍊欒皟鐢級
tabsHeight(element) {
let that = this;
- let query = this.createSelectorQuery(); //蹇呴』瑕佸厛鍒涘缓涓�涓煡璇�
+ let query = this.createSelectorQuery().in(this); //蹇呴』瑕佸厛鍒涘缓涓�涓煡璇�
query.select(element).boundingClientRect(function (rect) {
that.setData({
pageheight: rect.height + 'px'
--
Gitblit v1.9.3