小程序清除緩存功能如何實現
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();
}
});
},
文章來源:劉俊濤的博客
歡迎關注,有問題一起學習歡迎留言、評論。