Introduction to the usage of WeChat applet loading component to display loading animation

不言
Release: 2018-06-26 16:53:58
Original
3681 people have browsed it

This article mainly introduces the usage of WeChat applet loading component to display loading animation, and analyzes the related event operations and attribute setting skills of loading component to display loading animation in the form of examples. It also comes with source code for readers to download and refer to. If needed Friends can refer to

. The example in this article describes the usage of the WeChat applet loading component to display loading animation. Share it with everyone for your reference, the details are as follows:

1. Effect display

##2. Key code

① index.wxml

<loading hidden="{{loadingHidden}}">
 加载中...
</loading>
<button type="default" bindtap="loadingTap">点击弹出loading</button>
Copy after login

② index.js

Page({
  data: {
    loadingHidden: true
  },
  loadingTap: function(){
    this.setData({
     loadingHidden: false
    });
    var that = this;
    setTimeout(function(){
     that.setData({
       loadingHidden: true
     });
     that.update();
    }, 3000);
  }
})
Copy after login

The above is the entire content of this article. I hope it will be helpful to everyone’s study. For more related content, please pay attention to the PHP Chinese website!

Related recommendations:

Introduction to the use of button components in WeChat mini programs

Introduction to video components in WeChat mini programs

WeChat applet uses checkbox to display multiple selection box function [source code attached]

##

The above is the detailed content of Introduction to the usage of WeChat applet loading component to display loading animation. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template