chache/hooks/onShow.js
2024-01-16 22:53:42 +08:00

12 lines
303 B
JavaScript

var e = require("../common/vendor.js"),
o = require("./useState.js");
exports.onShow = function (r) {
var t = o.useState().totalOrderNum;
e.onShow(function () {
t.value > 0
? e.index.showTabBarRedDot({ index: 1 })
: e.index.hideTabBarRedDot({ index: 1 }),
r && r();
});
};