網站首頁 編程語言 正文
按鈕據右邊邊框距離設置:
document.getElementsByClassName('uni-btn-icon')[2].style.marginRight = '22px'
監聽按鈕狀態:
onNavigationBarButtonTap(e) {
if (e.index === 1|| e.index === 2) {
this.isfilter = !this.isfilter
if (this.isfilter == false) {
document.getElementsByClassName('uni-btn-icon')[3].innerText = '篩選';
document.getElementsByClassName('uni-btn-icon')[2].style.color = '#333333'
document.getElementsByClassName('uni-btn-icon')[3].style.color = '#333333'
} else {
document.getElementsByClassName('uni-btn-icon')[3].innerText = '已篩選';
document.getElementsByClassName('uni-btn-icon')[2].style.color = '#E86951'
document.getElementsByClassName('uni-btn-icon')[3].style.color = '#E86951'
}
}else if(e.index == 0){
uni.switchTab({
url
})
}
}
page.json
"app-plus": {
"titleNView": {
"titleColor": "#333333",
"backgroundColor": "#FFFFFF",
"buttons": [{
"type":"back",
"fontSize": "27px",
"float": "left"
},
{
"fontSrc": "/static/iconfont/iconfont.ttf",
"text": "\ue732",
"fontSize": "27px",
"margin":"30upx",
"width":"auto"
},{
"text": "篩選",
"fontSize": "14px",
"width":"auto"
}]
}
}
原文鏈接:https://blog.csdn.net/weixin_44433499/article/details/115204348
相關推薦
- 2023-01-10 Qt實現可以計算大數的簡單計算器_C 語言
- 2022-04-20 深入理解go緩存庫freecache的使用_Golang
- 2022-09-26 車載藍牙PIN碼是什么
- 2022-09-04 Python?Matplotlib繪制箱線圖boxplot()函數詳解_python
- 2022-08-20 pip安裝路徑修改的詳細方法步驟_python
- 2022-04-10 解析React?中的Virtual?DOM_MsSql
- 2023-02-02 redis中的配置以及密碼設置方式_Redis
- 2021-12-01 阻止谷歌瀏覽器彈出記住密碼的彈框
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支