mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-05 19:41:45 +08:00
* add src dir && add build * add build watch && change dir name * bower ignore package.json
27 lines
560 B
JavaScript
27 lines
560 B
JavaScript
function handle(e) {
|
|
var dataset = e.currentTarget.dataset;
|
|
var componentId = dataset.componentId;
|
|
var value = e.detail.value;
|
|
|
|
callback.call(this, componentId, value);
|
|
}
|
|
|
|
function callback(componentId, value) {
|
|
var e = { componentId, value };
|
|
console.info('[zan:Select:change]', e);
|
|
|
|
if (this.handleZanSelectChange) {
|
|
this.handleZanSelectChange(e);
|
|
} else {
|
|
console.warn('页面缺少 handleZanSelectChange 回调函数');
|
|
}
|
|
}
|
|
|
|
var Select = {
|
|
_handleZanSelectChange(e) {
|
|
handle.call(this, e);
|
|
},
|
|
};
|
|
|
|
module.exports = Select;
|