mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
add console warn for callback
This commit is contained in:
parent
2952e1b311
commit
064c96cdec
9
dist/quantity/index.js
vendored
9
dist/quantity/index.js
vendored
@ -10,11 +10,14 @@ function handle(e, num) {
|
||||
}
|
||||
|
||||
function callback(componentId, quantity) {
|
||||
quantity = +quantity;
|
||||
var e = { componentId, quantity };
|
||||
console.info('[zui:quantity:change]', e);
|
||||
|
||||
if (this.handleZuiQuantityChange) {
|
||||
quantity = +quantity;
|
||||
var e = { componentId, quantity };
|
||||
console.info('[ZUI:Quantity:Change]', e);
|
||||
this.handleZuiQuantityChange(e);
|
||||
} else {
|
||||
console.warn('页面缺少 handleZuiQuantityChange 回调函数');
|
||||
}
|
||||
}
|
||||
|
||||
|
14
dist/tab/index.js
vendored
14
dist/tab/index.js
vendored
@ -3,18 +3,14 @@ var Tab = {
|
||||
var dataset = e.currentTarget.dataset;
|
||||
var componentId = dataset.componentId;
|
||||
var selectedId = dataset.itemId;
|
||||
var data = { componentId, selectedId };
|
||||
|
||||
console.info('[zui:tab:change]', data);
|
||||
if (this.handleZuiTabChange) {
|
||||
console.info('[ZUI:Tab:Change]', {
|
||||
componentId,
|
||||
selectedId
|
||||
});
|
||||
this.handleZuiTabChange({
|
||||
componentId,
|
||||
selectedId
|
||||
});
|
||||
this.handleZuiTabChange(data);
|
||||
} else {
|
||||
console.warn('页面缺少 handleZuiTabChange 回调函数');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = Tab;
|
||||
|
Loading…
x
Reference in New Issue
Block a user