From ff72273c7cd5fd33173615ac188fc03bfc1a1ad7 Mon Sep 17 00:00:00 2001 From: quanyawei <401863037@qq.com> Date: Sun, 04 Feb 2024 13:44:46 +0800 Subject: [PATCH] fix:修改成16位风向值 --- src/mixins/downLoadNotice.js | 39 ++++++++++++++++++++++++++++----------- 1 files changed, 28 insertions(+), 11 deletions(-) diff --git a/src/mixins/downLoadNotice.js b/src/mixins/downLoadNotice.js index 16801eb..a5d202d 100644 --- a/src/mixins/downLoadNotice.js +++ b/src/mixins/downLoadNotice.js @@ -2,7 +2,8 @@ export const mixins = { data: function () { return { - notify: {} // ������������������������������������������ + notify: {}, // ������������������������������������������ + downLoading: false } }, computed: { @@ -21,8 +22,13 @@ if (domList.find(i => i.className === item.path)) { // ���������������������������������������������������������������������progress if (item.progress) { - domList.find(i => i.className === item.path).innerHTML = - item.progress + '%' + // if (this.downLoadingNumber >= 90) { + // this.downLoadingNumber = 99 + // } else { + // this.downLoadingNumber += 1 + // } + domList.find(i => i.className === item.path).innerHTML = '' + // this.downLoadingNumber + '%' } if (item.progress === null) { // ��������������������������������������������������������������������������������� @@ -33,19 +39,25 @@ }) } } else { - // ������������������������������������������������������������������������������������notify���������������������������������������������������������path(������������path������������)���������������$notify(element ui������������������)������������ - this.notify[item.path] = this.$notify.success({ - // title: 'info', - dangerouslyUseHTMLString: true, - customClass: 'progress-notify', - message: `<p style="width: 100px;">������������<span class="${item.path}" style="float: right">${item.progress}%</span></p>`, // ������������������������������������������������path(���������������������������������) - duration: 0 - }) + if (!this.downLoading) { + // ������������������������������������������������������������������������������������notify���������������������������������������������������������path(������������path������������)���������������$notify(element ui������������������)������������ + this.notify[item.path] = this.$notify.success({ + // title: 'info', + dangerouslyUseHTMLString: true, + customClass: 'progress-notify', + message: `<div style="width: 100px;">������������<span class="${item.path}" style="float: right"></span></div>`, // ������������������������������������������������path(���������������������������������) + duration: 5000, + onClose: () => { + this.downLoading = true + } + }) + } } if (item.progress == 100) { // ������������������������100%������������������������������notify������������������������ this.notify[item.path].close() + this.downLoading = false // delete this.notify[item.path] ���������close()���������������������������������������������������������setTimeout��������������������������������� setTimeout(() => { delete this.notify[item.path] @@ -56,5 +68,10 @@ }, deep: true } + }, + methods: { + onClose() { + console.log('������') + } } } -- Gitblit v1.8.0