当前位置:网站首页>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 .
边栏推荐
- [机缘参悟-37]:人感官系统的结构决定了人类是以自我为中心
- Mycms we media mall v3.4.1 release, user manual update
- Asp. Net core1.1 without project JSON, so as to generate cross platform packages
- Qt学习24 布局管理器(三)
- Qt学习18 登录对话框实例分析
- windos 创建cordova 提示 因为在此系统上禁止运行脚本
- MySQL 数据处理值增删改
- pytorch 载入历史模型时更换gpu卡号,map_location设置
- 网上开户哪家证券公司佣金最低,我要开户,网上客户经理开户安全吗
- Qt学习21 Qt 中的标准对话框(下)
猜你喜欢

Richview trvstyle liststyle list style (bullet number)

常见的几种最优化方法Matlab原理和深度分析

Implementation of Muduo accept connection, disconnection and sending data

3D vision - 2 Introduction to pose estimation - openpose includes installation, compilation and use (single frame, real-time video)

Go language web development series 28: solve cross domain access of CORS with gin contrib / CORS

NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线

MySQL 数据增删改查综合案例

Go language web development series 30: gin: grouping by version for routing
![Mysql:insert date:SQL 错误 [1292] [22001]: Data truncation: Incorrect date value:](/img/2f/33504391a661ecb63d42d75acf3a37.png)
Mysql:insert date:SQL 错误 [1292] [22001]: Data truncation: Incorrect date value:

解决MySql 1045 Access denied for user ‘root‘@‘localhost‘ (using password: YES)
随机推荐
【电脑插入U盘或者内存卡显示无法格式化FAT32如何解决】
Qt学习23 布局管理器(二)
RichView TRVStyle ListStyle 列表样式(项目符号编号)
mysql中的字段问题
Replace the GPU card number when pytorch loads the historical model, map_ Location settings
ThreadPoolExecutor realizes multi-threaded concurrency and obtains the return value (elegant and concise way)
Go language unit test 4: go language uses gomonkey to test functions or methods
Static linked list (subscript of array instead of pointer)
Can newly graduated European college students get an offer from a major Internet company in the United States?
又一个行业被中国芯片打破空白,难怪美国模拟芯片龙头降价抛售了
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
Comprehensive case of MySQL data addition, deletion, modification and query
Realize the recognition and training of CNN images, and process the cifar10 data set and other methods through the tensorflow framework
3D视觉——2.人体姿态估计(Pose Estimation)入门——OpenPose含安装、编译、使用(单帧、实时视频)
Thrift threadmanager and three monitors
Solve MySQL 1045 access denied for user 'root' @ 'localhost' (using password: yes)
Asp. Net core1.1 without project JSON, so as to generate cross platform packages
网上开户哪家证券公司佣金最低,我要开户,网上客户经理开户安全吗
JS convert pseudo array to array
Go language unit test 3: go language uses gocovey library to do unit test