zoukankan      html  css  js  c++  java
  • 小程序清除缓存功能如何实现

    小程序清除缓存功能如何实现

     

    Wxml:

    <button type="primary" class="clear" bindtap="clearStorage" loading="{{loading}}" disabled="{{disabled}}">清空缓存</button>

    Js:

    clearStorage: function(){

            var that = this;

            that.setData({

                loading:true,

                disabled:true

            });

            that.update();

            wx.clearStorage({

                success:function(){

                    that.setData({

                        loading:false,

                        disabled:false,

                        toast1Hidden:false

                    });

                    that.update();

                }

            });

        },

    文章来源:刘俊涛的博客

    欢迎关注,有问题一起学习欢迎留言、评论。

  • 相关阅读:
    Linux
    Other
    Linux
    VIM
    Linux
    其他
    Win10
    Win10
    IDE
    其他
  • 原文地址:https://www.cnblogs.com/lovebing/p/9474308.html
Copyright © 2011-2022 走看看