当前位置:网站首页>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 .
边栏推荐
- 顺序表(C语言实现)
- Go language unit test 4: go language uses gomonkey to test functions or methods
- Resource Cost Optimization Practice of R & D team
- ThreadPoolExecutor realizes multi-threaded concurrency and obtains the return value (elegant and concise way)
- Another industry has been broken by Chinese chips. No wonder the leading analog chip companies in the United States have cut prices and sold off
- 树的深入和广度优先遍历(不考虑二叉树)
- IBEM 数学公式检测数据集
- Implementation of Muduo asynchronous logging
- [développement technologique - 24]: caractéristiques des technologies de communication Internet des objets existantes
- Go language unit test 3: go language uses gocovey library to do unit test
猜你喜欢

MySQL 数据处理值增删改

Go language web development series 30: gin: grouping by version for routing

TensorBoard可视化处理案例简析

Unity embeddedbrowser browser plug-in event communication

Several common optimization methods matlab principle and depth analysis

PhpMyAdmin stage file contains analysis traceability

MySQL data processing value addition, deletion and modification

Go language web development series 25: Gin framework: using MD5 to verify the signature for the interface station

全面发展数字经济主航道 和数集团积极推动UTONMOS数藏市场
![[redis] cache warm-up, cache avalanche and cache breakdown](/img/df/81f38087704de36946b470f68e8004.jpg)
[redis] cache warm-up, cache avalanche and cache breakdown
随机推荐
静态链表(数组的下标代替指针)
Brief analysis of tensorboard visual processing cases
Record 405 questions about bank callback post request
又一个行业被中国芯片打破空白,难怪美国模拟芯片龙头降价抛售了
User and group command exercises
[how to earn a million passive income]
如何使用lxml判断网站公告是否更新
[bw16 application] instructions for firmware burning of Anxin Ke bw16 module and development board update
Asp. Net core1.1 without project JSON, so as to generate cross platform packages
Flutter dynamic | fair 2.5.0 new version features
实现CNN图像的识别和训练通过tensorflow框架对cifar10数据集等方法的处理
Logback log sorting
Realize the recognition and training of CNN images, and process the cifar10 data set and other methods through the tensorflow framework
MySQL 数据处理值增删改
mysql中的字段问题
[technology development-24]: characteristics of existing IOT communication technology
Mobile phones and computers can be used, whole people, spoof code connections, "won't you Baidu for a while" teach you to use Baidu
[556. Next larger element III]
解决MySql 1045 Access denied for user ‘root‘@‘localhost‘ (using password: YES)
Flutter dynamic | fair 2.5.0 new version features