当前位置:网站首页>Uniapp skills - dom display and hiding
Uniapp skills - dom display and hiding
2022-07-03 13:54:00 【Cloud and cloud discoloration 1】
There is a new demand today , Just need someone dom Do not display when loading , wait until 5 Seconds later . Looking for some ways , Finally, I found that it can still pass js To achieve , It's just the method and h5+js Time is slightly different , The method is as follows :
1、dom Attribute added
<view :class="isShow" > Content </view>
2、data add isShow The default value is
data() {
return{
isShow: "domhide",
}
}
3、 stay style In a statement domhide and domshow Two class
.domhide{display: none;}
.domshow{display: block;}
4、 stay load Add timing program
onLoad() {
if (this.timer) {
clearInterval(this.timer);
}
this.timer = setInterval(() => {
this.isShow= "domshow";
}, 5000);
},
above
Compared with direct use h5+js Please , Make a note of .
There are other simpler ways , Can you tell me about your exchange .
边栏推荐
- Comprehensive evaluation of double chain notes remnote: fast input, PDF reading, interval repetition / memory
- The shadow of the object at the edge of the untiy world flickers, and the shadow of the object near the far point is normal
- 【电脑插入U盘或者内存卡显示无法格式化FAT32如何解决】
- Using registered classes to realize specific type matching function template
- Static linked list (subscript of array instead of pointer)
- PHP maze game
- Stack application (balancer)
- 使用Tensorflow进行完整的深度神经网络CNN训练完成图片识别案例2
- Ocean CMS vulnerability - search php
- PhpMyAdmin stage file contains analysis traceability
猜你喜欢
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
When updating mysql, the condition is a query
双向链表(我们只需要关注插入和删除函数)
GoLand 2021.1.1: configure the multi line display of the tab of the open file
Unable to stop it, domestic chips have made another breakthrough, and some links have reached 4nm
Brief analysis of tensorboard visual processing cases
从零开始的基于百度大脑EasyData的多人协同数据标注
Qt学习19 Qt 中的标准对话框(上)
如何使用lxml判断网站公告是否更新
Go language web development series 25: Gin framework: using MD5 to verify the signature for the interface station
随机推荐
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
Unity render streaming communicates with unity through JS
Use docker to build sqli lab environment and upload labs environment, and the operation steps are provided with screenshots.
Using registered classes to realize specific type matching function template
SQL Injection (GET/Search)
The network card fails to start after the cold migration of the server hard disk
网上开户哪家证券公司佣金最低,我要开户,网上客户经理开户安全吗
3D视觉——2.人体姿态估计(Pose Estimation)入门——OpenPose含安装、编译、使用(单帧、实时视频)
pytorch 载入历史模型时更换gpu卡号,map_location设置
User and group command exercises
Record 405 questions about bank callback post request
ThreadPoolExecutor realizes multi-threaded concurrency and obtains the return value (elegant and concise way)
Which securities company has the lowest Commission for opening an account online? I want to open an account. Is it safe for the online account manager to open an account
Red hat satellite 6: better management of servers and clouds
Go language unit test 5: go language uses go sqlmock and Gorm to do database query mock
如何使用lxml判断网站公告是否更新
使用Tensorflow进行完整的深度神经网络CNN训练完成图片识别案例2
MySQL 数据增删改查综合案例
The solution of Chinese font garbled code in keil5
[understanding by chance-37]: the structure of human sensory system determines that human beings are self-centered