From 856e43dc0973f7f83f371caf58e1ce3f35902d64 Mon Sep 17 00:00:00 2001 From: Xiaoleng123 <896054682@qq.com> Date: Mon, 9 Sep 2019 21:17:50 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E6=94=B9=E7=BB=84=E4=BB=B6=20?= =?UTF-8?q?ID=20=E6=97=B6=E9=97=B4=E6=88=B3=E7=9A=84=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/borderBox8/src/main.vue | 7 ++++--- src/components/borderBox9/src/main.vue | 5 +++-- src/components/charts/src/main.vue | 5 +++-- src/components/decoration10/src/main.vue | 15 ++++++++------- src/components/decoration9/src/main.vue | 3 ++- src/components/flylineChart/src/main.vue | 9 +++++---- src/components/percentPond/src/main.vue | 7 ++++--- src/components/waterLevelPond/src/main.vue | 3 ++- 8 files changed, 31 insertions(+), 23 deletions(-) diff --git a/src/components/borderBox8/src/main.vue b/src/components/borderBox8/src/main.vue index 0bed631..e35dfe8 100644 --- a/src/components/borderBox8/src/main.vue +++ b/src/components/borderBox8/src/main.vue @@ -68,11 +68,12 @@ export default { name: 'DvBorderBox8', mixins: [autoResize], data () { + const timestamp = Date.now() return { ref: 'border-box-8', - path: `border-box-8-path-${(new Date()).getTime()}`, - gradient: `border-box-8-gradient-${(new Date()).getTime()}`, - mask: `border-box-8-mask-${(new Date()).getTime()}` + path: `border-box-8-path-${timestamp}`, + gradient: `border-box-8-gradient-${timestamp}`, + mask: `border-box-8-mask-${timestamp}` } }, computed: { diff --git a/src/components/borderBox9/src/main.vue b/src/components/borderBox9/src/main.vue index c2a7e1b..bae0bf5 100644 --- a/src/components/borderBox9/src/main.vue +++ b/src/components/borderBox9/src/main.vue @@ -89,11 +89,12 @@ export default { name: 'DvBorderBox9', mixins: [autoResize], data () { + const timestamp = Date.now() return { ref: 'border-box-9', - gradientId: `border-box-9-gradient-${(new Date()).getTime()}`, - maskId: `border-box-9-mask-${(new Date()).getTime()}` + gradientId: `border-box-9-gradient-${timestamp}`, + maskId: `border-box-9-mask-${timestamp}` } } } diff --git a/src/components/charts/src/main.vue b/src/components/charts/src/main.vue index 80e3773..cda8d70 100644 --- a/src/components/charts/src/main.vue +++ b/src/components/charts/src/main.vue @@ -19,9 +19,10 @@ export default { } }, data () { + const timestamp = Date.now() return { - ref: `charts-container-${(new Date()).getTime()}`, - chartRef: `chart-${(new Date()).getTime()}`, + ref: `charts-container-${timestamp}`, + chartRef: `chart-${timestamp}`, chart: null } diff --git a/src/components/decoration10/src/main.vue b/src/components/decoration10/src/main.vue index 46b34a0..872e20d 100644 --- a/src/components/decoration10/src/main.vue +++ b/src/components/decoration10/src/main.vue @@ -152,16 +152,17 @@ export default { name: 'DvDecoration10', mixins: [autoResize], data () { + const timestamp = Date.now() return { ref: 'decoration-10', - animationId1: `d10ani1${(new Date()).getTime()}`, - animationId2: `d10ani2${(new Date()).getTime()}`, - animationId3: `d10ani3${(new Date()).getTime()}`, - animationId4: `d10ani4${(new Date()).getTime()}`, - animationId5: `d10ani5${(new Date()).getTime()}`, - animationId6: `d10ani6${(new Date()).getTime()}`, - animationId7: `d10ani7${(new Date()).getTime()}` + animationId1: `d10ani1${timestamp}`, + animationId2: `d10ani2${timestamp}`, + animationId3: `d10ani3${timestamp}`, + animationId4: `d10ani4${timestamp}`, + animationId5: `d10ani5${timestamp}`, + animationId6: `d10ani6${timestamp}`, + animationId7: `d10ani7${timestamp}` } } } diff --git a/src/components/decoration9/src/main.vue b/src/components/decoration9/src/main.vue index ad2b15d..4ffbd23 100644 --- a/src/components/decoration9/src/main.vue +++ b/src/components/decoration9/src/main.vue @@ -90,10 +90,11 @@ export default { name: 'DvDecoration9', mixins: [autoResize], data () { + const timestamp = Date.now() return { ref: 'decoration-9', - polygonId: `decoration-9-polygon-${(new Date()).getTime()}`, + polygonId: `decoration-9-polygon-${timestamp}`, svgWH: [100, 100], diff --git a/src/components/flylineChart/src/main.vue b/src/components/flylineChart/src/main.vue index 4e25574..7ac0a74 100644 --- a/src/components/flylineChart/src/main.vue +++ b/src/components/flylineChart/src/main.vue @@ -171,13 +171,14 @@ export default { } }, data () { + const timestamp = Date.now() return { ref: 'dv-flyline-chart', unique: Math.random(), - maskId: `flyline-mask-id-${(new Date()).getTime()}`, - maskCircleId: `mask-circle-id-${(new Date()).getTime()}`, - gradientId: `gradient-id-${(new Date()).getTime()}`, - gradient2Id: `gradient2-id-${(new Date()).getTime()}`, + maskId: `flyline-mask-id-${timestamp}`, + maskCircleId: `mask-circle-id-${timestamp}`, + gradientId: `gradient-id-${timestamp}`, + gradient2Id: `gradient2-id-${timestamp}`, defaultConfig: { /** diff --git a/src/components/percentPond/src/main.vue b/src/components/percentPond/src/main.vue index f85a32b..df9e143 100644 --- a/src/components/percentPond/src/main.vue +++ b/src/components/percentPond/src/main.vue @@ -57,9 +57,10 @@ export default { } }, data () { + const timestamp = Date.now() return { - gradientId1: `percent-pond-gradientId1-${(new Date()).getTime()}`, - gradientId2: `percent-pond-gradientId2-${(new Date()).getTime()}`, + gradientId1: `percent-pond-gradientId1-${timestamp}`, + gradientId2: `percent-pond-gradientId2-${timestamp}`, width: 0, height: 0, @@ -239,7 +240,7 @@ export default { this.height = dom.clientHeight }, mergeConfig () { - let { config, defaultConfig } = this + const { config, defaultConfig } = this this.mergedConfig = deepMerge(deepClone(defaultConfig, true), config || {}) } diff --git a/src/components/waterLevelPond/src/main.vue b/src/components/waterLevelPond/src/main.vue index e281fc8..5a7e316 100644 --- a/src/components/waterLevelPond/src/main.vue +++ b/src/components/waterLevelPond/src/main.vue @@ -53,8 +53,9 @@ export default { default: () => ({}) }, data () { + const timestamp = Date.now() return { - gradientId: `water-level-pond-${(new Date()).getTime()}`, + gradientId: `water-level-pond-${timestamp}`, defaultConfig: { /**