This commit is contained in:
dongqing 2019-12-05 09:54:40 +08:00
parent e5bcc32b90
commit bc24dab84e

View File

@ -66,7 +66,7 @@ Component({
action: { action: {
type: Object, type: Object,
observer: function (newVal, oldVal) { observer: function (newVal, oldVal) {
if (newVal) { if (newVal && !this.isEmpty(newVal)) {
this.doAction(newVal, (callbackInfo) => { this.doAction(newVal, (callbackInfo) => {
this.movingCache = callbackInfo this.movingCache = callbackInfo
}, false, true) }, false, true)
@ -268,7 +268,7 @@ Component({
} }
if (newVal && newVal.url && doView.url && newVal.url !== doView.url) { if (newVal && newVal.url && doView.url && newVal.url !== doView.url) {
downloader.download(newVal.url, this.properties.LRU).then((path) => { downloader.download(newVal.url, this.properties.LRU).then((path) => {
if (newVal.url.startsWidth('https')) { if (newVal.url.startsWith('https')) {
doView.originUrl = newVal.url doView.originUrl = newVal.url
} }
doView.url = path; doView.url = path;
@ -283,8 +283,9 @@ Component({
this.reDraw(doView, callback, isMoving) this.reDraw(doView, callback, isMoving)
} }
}) })
}).catch(() => { }).catch((error) => {
// 未下载成功,直接绘制 // 未下载成功,直接绘制
console.error(error)
this.reDraw(doView, callback, isMoving) this.reDraw(doView, callback, isMoving)
}) })
} else { } else {