mirror of
https://github.com/weilanwl/coloruicss.git
synced 2026-03-07 23:04:01 +08:00
26 lines
450 B
JavaScript
26 lines
450 B
JavaScript
// pages/element/loading/loading.js
|
|
Page({
|
|
data: {
|
|
loading: true
|
|
},
|
|
showLoading: function () {
|
|
var that = this;
|
|
this.setData({
|
|
showLoading: true
|
|
})
|
|
|
|
setTimeout(function () {
|
|
that.setData({
|
|
showLoading: false
|
|
})
|
|
}, 2000)
|
|
},
|
|
// onLoad: function () {
|
|
// var that = this;
|
|
// setTimeout(function () {
|
|
// that.setData({
|
|
// loading: true
|
|
// })
|
|
// }, 3000)
|
|
// }
|
|
}) |