加入脏数据检查机制
This commit is contained in:
parent
8747d18904
commit
eb59d29a44
1692
lib/underscore.js
Normal file
1692
lib/underscore.js
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,10 @@
|
||||
|
||||
function isValidUrl(url) {
|
||||
return /(ht|f)tp(s?):\/\/([^ \\/]*\.)+[^ \\/]*(:[0-9]+)?\/?/.test(url);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
isValidUrl,
|
||||
...require('./underscore'),
|
||||
};
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ Component({
|
||||
},
|
||||
|
||||
isNeedRefresh(newVal, oldVal) {
|
||||
if (!newVal) {
|
||||
if (!newVal || this.isEmpty(newVal) || util.isEqual(newVal, oldVal)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user