weapp版本升级到1.11.7

"version": "1.11.7"
This commit is contained in:
Abin committed 2026-01-07 13:54:40 +08:00
1 parent a3c886146a
commit 66ba21dd7b
67 files changed
+566 -365

No files matched your search

+15
View File
@@ -7,5 +7,20 @@ export const basic = Behavior({
this.setData(data);
return new Promise((resolve) => wx.nextTick(resolve));
},
// high performance setData
setView(data, callback) {
const target = {};
let hasChange = false;
Object.keys(data).forEach((key) => {
if (data[key] !== this.data[key]) {
target[key] = data[key];
hasChange = true;
}
});
if (hasChange) {
return this.setData(target, callback);
}
return callback && callback();
},
},
});