🐛 修改组件 ID 时间戳的生成方式

This commit is contained in:
Xiaoleng123 committed 2019-09-09 21:17:50 +08:00
1 parent b511e3d786
commit 856e43dc09
8 files changed
+31 -23

No files matched your search

+4 -3
View File
@@ -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 || {})
}