From 65f5b529bf4d2f26a6448b3bc8c0867f10374a7f Mon Sep 17 00:00:00 2001 From: jiahao <1634094825@qq.com> Date: Fri, 15 May 2020 13:22:05 +0800 Subject: [PATCH] fix id errors --- lib/components/borderBox11/src/main.vue | 9 ++++++-- lib/components/borderBox12/src/main.vue | 9 ++++++-- lib/components/borderBox13/src/main.vue | 7 ++++++- lib/components/borderBox8/src/main.vue | 13 ++++++++---- lib/components/borderBox9/src/main.vue | 11 +++++++--- lib/components/charts/src/main.vue | 11 +++++++--- lib/components/decoration10/src/main.vue | 21 ++++++++++++------- lib/components/decoration11/src/main.vue | 7 ++++++- lib/components/decoration9/src/main.vue | 9 ++++++-- lib/components/flylineChart/src/main.vue | 15 ++++++++----- .../flylineChartEnhanced/src/main.vue | 11 +++++++--- lib/components/percentPond/src/main.vue | 11 +++++++--- lib/components/waterLevelPond/src/main.vue | 9 ++++++-- src/components/borderBox11/src/main.vue | 9 ++++++-- src/components/borderBox12/src/main.vue | 9 ++++++-- src/components/borderBox13/src/main.vue | 7 ++++++- src/components/borderBox8/src/main.vue | 13 ++++++++---- src/components/borderBox9/src/main.vue | 11 +++++++--- src/components/charts/src/main.vue | 11 +++++++--- src/components/decoration10/src/main.vue | 21 ++++++++++++------- src/components/decoration11/src/main.vue | 7 ++++++- src/components/decoration9/src/main.vue | 9 ++++++-- src/components/flylineChart/src/main.vue | 15 ++++++++----- .../flylineChartEnhanced/src/main.vue | 11 +++++++--- src/components/percentPond/src/main.vue | 11 +++++++--- src/components/waterLevelPond/src/main.vue | 9 ++++++-- 26 files changed, 208 insertions(+), 78 deletions(-) diff --git a/lib/components/borderBox11/src/main.vue b/lib/components/borderBox11/src/main.vue index d4b5a8a..b400661 100644 --- a/lib/components/borderBox11/src/main.vue +++ b/lib/components/borderBox11/src/main.vue @@ -245,10 +245,15 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'border-box-11', - filterId: `border-box-11-filterId-${timestamp}`, + filterId: `border-box-11-filterId-${uuid}`, defaultColor: ['#8aaafb', '#1f33a2'], diff --git a/lib/components/borderBox12/src/main.vue b/lib/components/borderBox12/src/main.vue index 4a9c957..4c9aff0 100644 --- a/lib/components/borderBox12/src/main.vue +++ b/lib/components/borderBox12/src/main.vue @@ -113,10 +113,15 @@ export default { } }, data () { - const timestamp = +new Date() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'border-box-12', - filterId: `borderr-box-12-filterId-${timestamp}`, + filterId: `borderr-box-12-filterId-${uuid}`, defaultColor: ['#2e6099', '#7ce7fd'], diff --git a/lib/components/borderBox13/src/main.vue b/lib/components/borderBox13/src/main.vue index 7f0614d..dadf514 100644 --- a/lib/components/borderBox13/src/main.vue +++ b/lib/components/borderBox13/src/main.vue @@ -61,7 +61,12 @@ export default { } }, data () { - const timestamp = +new Date() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'border-box-13', diff --git a/lib/components/borderBox8/src/main.vue b/lib/components/borderBox8/src/main.vue index 7559334..a5a37c8 100644 --- a/lib/components/borderBox8/src/main.vue +++ b/lib/components/borderBox8/src/main.vue @@ -92,12 +92,17 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'border-box-8', - path: `border-box-8-path-${timestamp}`, - gradient: `border-box-8-gradient-${timestamp}`, - mask: `border-box-8-mask-${timestamp}`, + path: `border-box-8-path-${uuid}`, + gradient: `border-box-8-gradient-${uuid}`, + mask: `border-box-8-mask-${uuid}`, defaultColor: ['#235fa7', '#4fd2dd'], diff --git a/lib/components/borderBox9/src/main.vue b/lib/components/borderBox9/src/main.vue index 75c5ada..5b1f349 100644 --- a/lib/components/borderBox9/src/main.vue +++ b/lib/components/borderBox9/src/main.vue @@ -144,12 +144,17 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'border-box-9', - gradientId: `border-box-9-gradient-${timestamp}`, - maskId: `border-box-9-mask-${timestamp}`, + gradientId: `border-box-9-gradient-${uuid}`, + maskId: `border-box-9-mask-${uuid}`, defaultColor: ['#11eefd', '#0078d2'], diff --git a/lib/components/charts/src/main.vue b/lib/components/charts/src/main.vue index 0ce3347..b7668a1 100644 --- a/lib/components/charts/src/main.vue +++ b/lib/components/charts/src/main.vue @@ -19,10 +19,15 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { - ref: `charts-container-${timestamp}`, - chartRef: `chart-${timestamp}`, + ref: `charts-container-${uuid}`, + chartRef: `chart-${uuid}`, chart: null } diff --git a/lib/components/decoration10/src/main.vue b/lib/components/decoration10/src/main.vue index 1123af7..daf64a2 100644 --- a/lib/components/decoration10/src/main.vue +++ b/lib/components/decoration10/src/main.vue @@ -162,17 +162,22 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'decoration-10', - animationId1: `d10ani1${timestamp}`, - animationId2: `d10ani2${timestamp}`, - animationId3: `d10ani3${timestamp}`, - animationId4: `d10ani4${timestamp}`, - animationId5: `d10ani5${timestamp}`, - animationId6: `d10ani6${timestamp}`, - animationId7: `d10ani7${timestamp}`, + animationId1: `d10ani1${uuid}`, + animationId2: `d10ani2${uuid}`, + animationId3: `d10ani3${uuid}`, + animationId4: `d10ani4${uuid}`, + animationId5: `d10ani5${uuid}`, + animationId6: `d10ani6${uuid}`, + animationId7: `d10ani7${uuid}`, defaultColor: ['#00c2ff', 'rgba(0, 194, 255, 0.3)'], diff --git a/lib/components/decoration11/src/main.vue b/lib/components/decoration11/src/main.vue index 1fe80f2..2ce428e 100644 --- a/lib/components/decoration11/src/main.vue +++ b/lib/components/decoration11/src/main.vue @@ -72,7 +72,12 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'decoration-11', diff --git a/lib/components/decoration9/src/main.vue b/lib/components/decoration9/src/main.vue index 05f318c..fa518f9 100644 --- a/lib/components/decoration9/src/main.vue +++ b/lib/components/decoration9/src/main.vue @@ -106,11 +106,16 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'decoration-9', - polygonId: `decoration-9-polygon-${timestamp}`, + polygonId: `decoration-9-polygon-${uuid}`, svgWH: [100, 100], diff --git a/lib/components/flylineChart/src/main.vue b/lib/components/flylineChart/src/main.vue index 7c9d86d..0e44921 100644 --- a/lib/components/flylineChart/src/main.vue +++ b/lib/components/flylineChart/src/main.vue @@ -171,14 +171,19 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'dv-flyline-chart', unique: Math.random(), - maskId: `flyline-mask-id-${timestamp}`, - maskCircleId: `mask-circle-id-${timestamp}`, - gradientId: `gradient-id-${timestamp}`, - gradient2Id: `gradient2-id-${timestamp}`, + maskId: `flyline-mask-id-${uuid}`, + maskCircleId: `mask-circle-id-${uuid}`, + gradientId: `gradient-id-${uuid}`, + gradient2Id: `gradient2-id-${uuid}`, defaultConfig: { /** diff --git a/lib/components/flylineChartEnhanced/src/main.vue b/lib/components/flylineChartEnhanced/src/main.vue index b6264cc..69829cd 100644 --- a/lib/components/flylineChartEnhanced/src/main.vue +++ b/lib/components/flylineChartEnhanced/src/main.vue @@ -173,12 +173,17 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'dv-flyline-chart-enhanced', unique: Math.random(), - flylineGradientId: `flyline-gradient-id-${timestamp}`, - haloGradientId: `halo-gradient-id-${timestamp}`, + flylineGradientId: `flyline-gradient-id-${uuid}`, + haloGradientId: `halo-gradient-id-${uuid}`, /** * @description Type Declaration * diff --git a/lib/components/percentPond/src/main.vue b/lib/components/percentPond/src/main.vue index f4139d1..642e0ac 100644 --- a/lib/components/percentPond/src/main.vue +++ b/lib/components/percentPond/src/main.vue @@ -57,10 +57,15 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { - gradientId1: `percent-pond-gradientId1-${timestamp}`, - gradientId2: `percent-pond-gradientId2-${timestamp}`, + gradientId1: `percent-pond-gradientId1-${uuid}`, + gradientId2: `percent-pond-gradientId2-${uuid}`, width: 0, height: 0, diff --git a/lib/components/waterLevelPond/src/main.vue b/lib/components/waterLevelPond/src/main.vue index 980fec5..e06b666 100644 --- a/lib/components/waterLevelPond/src/main.vue +++ b/lib/components/waterLevelPond/src/main.vue @@ -53,9 +53,14 @@ export default { default: () => ({}) }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { - gradientId: `water-level-pond-${timestamp}`, + gradientId: `water-level-pond-${uuid}`, defaultConfig: { /** diff --git a/src/components/borderBox11/src/main.vue b/src/components/borderBox11/src/main.vue index dfa2901..487d859 100644 --- a/src/components/borderBox11/src/main.vue +++ b/src/components/borderBox11/src/main.vue @@ -245,10 +245,15 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'border-box-11', - filterId: `border-box-11-filterId-${timestamp}`, + filterId: `border-box-11-filterId-${uuid}`, defaultColor: ['#8aaafb', '#1f33a2'], diff --git a/src/components/borderBox12/src/main.vue b/src/components/borderBox12/src/main.vue index 1b8de85..e88fce7 100644 --- a/src/components/borderBox12/src/main.vue +++ b/src/components/borderBox12/src/main.vue @@ -113,10 +113,15 @@ export default { } }, data () { - const timestamp = +new Date() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'border-box-12', - filterId: `borderr-box-12-filterId-${timestamp}`, + filterId: `borderr-box-12-filterId-${uuid}`, defaultColor: ['#2e6099', '#7ce7fd'], diff --git a/src/components/borderBox13/src/main.vue b/src/components/borderBox13/src/main.vue index 524020f..5df7350 100644 --- a/src/components/borderBox13/src/main.vue +++ b/src/components/borderBox13/src/main.vue @@ -61,7 +61,12 @@ export default { } }, data () { - const timestamp = +new Date() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'border-box-13', diff --git a/src/components/borderBox8/src/main.vue b/src/components/borderBox8/src/main.vue index 968ae0d..3d68295 100644 --- a/src/components/borderBox8/src/main.vue +++ b/src/components/borderBox8/src/main.vue @@ -92,12 +92,17 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'border-box-8', - path: `border-box-8-path-${timestamp}`, - gradient: `border-box-8-gradient-${timestamp}`, - mask: `border-box-8-mask-${timestamp}`, + path: `border-box-8-path-${uuid}`, + gradient: `border-box-8-gradient-${uuid}`, + mask: `border-box-8-mask-${uuid}`, defaultColor: ['#235fa7', '#4fd2dd'], diff --git a/src/components/borderBox9/src/main.vue b/src/components/borderBox9/src/main.vue index e6400f3..51ac709 100644 --- a/src/components/borderBox9/src/main.vue +++ b/src/components/borderBox9/src/main.vue @@ -144,12 +144,17 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'border-box-9', - gradientId: `border-box-9-gradient-${timestamp}`, - maskId: `border-box-9-mask-${timestamp}`, + gradientId: `border-box-9-gradient-${uuid}`, + maskId: `border-box-9-mask-${uuid}`, defaultColor: ['#11eefd', '#0078d2'], diff --git a/src/components/charts/src/main.vue b/src/components/charts/src/main.vue index 2d742ef..01ad5b2 100644 --- a/src/components/charts/src/main.vue +++ b/src/components/charts/src/main.vue @@ -19,10 +19,15 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { - ref: `charts-container-${timestamp}`, - chartRef: `chart-${timestamp}`, + ref: `charts-container-${uuid}`, + chartRef: `chart-${uuid}`, chart: null } diff --git a/src/components/decoration10/src/main.vue b/src/components/decoration10/src/main.vue index 9918732..651bb80 100644 --- a/src/components/decoration10/src/main.vue +++ b/src/components/decoration10/src/main.vue @@ -162,17 +162,22 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'decoration-10', - animationId1: `d10ani1${timestamp}`, - animationId2: `d10ani2${timestamp}`, - animationId3: `d10ani3${timestamp}`, - animationId4: `d10ani4${timestamp}`, - animationId5: `d10ani5${timestamp}`, - animationId6: `d10ani6${timestamp}`, - animationId7: `d10ani7${timestamp}`, + animationId1: `d10ani1${uuid}`, + animationId2: `d10ani2${uuid}`, + animationId3: `d10ani3${uuid}`, + animationId4: `d10ani4${uuid}`, + animationId5: `d10ani5${uuid}`, + animationId6: `d10ani6${uuid}`, + animationId7: `d10ani7${uuid}`, defaultColor: ['#00c2ff', 'rgba(0, 194, 255, 0.3)'], diff --git a/src/components/decoration11/src/main.vue b/src/components/decoration11/src/main.vue index 70ce50f..f86c443 100644 --- a/src/components/decoration11/src/main.vue +++ b/src/components/decoration11/src/main.vue @@ -72,7 +72,12 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'decoration-11', diff --git a/src/components/decoration9/src/main.vue b/src/components/decoration9/src/main.vue index 8728951..64344f2 100644 --- a/src/components/decoration9/src/main.vue +++ b/src/components/decoration9/src/main.vue @@ -106,11 +106,16 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'decoration-9', - polygonId: `decoration-9-polygon-${timestamp}`, + polygonId: `decoration-9-polygon-${uuid}`, svgWH: [100, 100], diff --git a/src/components/flylineChart/src/main.vue b/src/components/flylineChart/src/main.vue index 7ac0a74..a519f70 100644 --- a/src/components/flylineChart/src/main.vue +++ b/src/components/flylineChart/src/main.vue @@ -171,14 +171,19 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'dv-flyline-chart', unique: Math.random(), - maskId: `flyline-mask-id-${timestamp}`, - maskCircleId: `mask-circle-id-${timestamp}`, - gradientId: `gradient-id-${timestamp}`, - gradient2Id: `gradient2-id-${timestamp}`, + maskId: `flyline-mask-id-${uuid}`, + maskCircleId: `mask-circle-id-${uuid}`, + gradientId: `gradient-id-${uuid}`, + gradient2Id: `gradient2-id-${uuid}`, defaultConfig: { /** diff --git a/src/components/flylineChartEnhanced/src/main.vue b/src/components/flylineChartEnhanced/src/main.vue index 5aed57f..d3b630e 100644 --- a/src/components/flylineChartEnhanced/src/main.vue +++ b/src/components/flylineChartEnhanced/src/main.vue @@ -173,12 +173,17 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { ref: 'dv-flyline-chart-enhanced', unique: Math.random(), - flylineGradientId: `flyline-gradient-id-${timestamp}`, - haloGradientId: `halo-gradient-id-${timestamp}`, + flylineGradientId: `flyline-gradient-id-${uuid}`, + haloGradientId: `halo-gradient-id-${uuid}`, /** * @description Type Declaration * diff --git a/src/components/percentPond/src/main.vue b/src/components/percentPond/src/main.vue index df9e143..e57b541 100644 --- a/src/components/percentPond/src/main.vue +++ b/src/components/percentPond/src/main.vue @@ -57,10 +57,15 @@ export default { } }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { - gradientId1: `percent-pond-gradientId1-${timestamp}`, - gradientId2: `percent-pond-gradientId2-${timestamp}`, + gradientId1: `percent-pond-gradientId1-${uuid}`, + gradientId2: `percent-pond-gradientId2-${uuid}`, width: 0, height: 0, diff --git a/src/components/waterLevelPond/src/main.vue b/src/components/waterLevelPond/src/main.vue index 5a7e316..77cb38c 100644 --- a/src/components/waterLevelPond/src/main.vue +++ b/src/components/waterLevelPond/src/main.vue @@ -53,9 +53,14 @@ export default { default: () => ({}) }, data () { - const timestamp = Date.now() + let d = new Date().getTime(); + const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = (d + Math.random()*16)%16 | 0; + d = Math.floor(d/16); + return (c=='x' ? r : (r&0x7|0x8)).toString(16); + }); return { - gradientId: `water-level-pond-${timestamp}`, + gradientId: `water-level-pond-${uuid}`, defaultConfig: { /**