picker.js
567 Bytes
function init(ctx) {
let data = {};
let view = ctx.data.pickerData.view;
data.sourceType = ctx.data.pickerData.sourceType;
data.view = view;
ctx.setData({
pickerData: data
});
}
function pickerShow(ctx) {
let data = ctx.data.pickerData;
data.view.isShow = !data.view.isShow;
ctx.setData({
pickerData: data
});
}
function pickerHide(ctx) {
let data = ctx.data.pickerData;
data.view.isShow = false;
ctx.setData({
pickerData: data
});
}
module.exports = {
init: init,
pickerShow: pickerShow,
pickerHide: pickerHide
};