From a92e36067ba0132c43b1ab0ec72c4458d63a64b8 Mon Sep 17 00:00:00 2001 From: jiaming743 <743192023@qq.com> Date: Mon, 22 Jul 2019 18:56:49 +0800 Subject: [PATCH] Fix potential namespace conflicts --- src/components/digitalFlop/src/main.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/digitalFlop/src/main.vue b/src/components/digitalFlop/src/main.vue index 118a126..c2415d3 100644 --- a/src/components/digitalFlop/src/main.vue +++ b/src/components/digitalFlop/src/main.vue @@ -23,7 +23,7 @@ export default { }, data () { return { - render: null, + renderer: null, defaultConfig: { /** @@ -100,7 +100,7 @@ export default { initRender () { const { $refs } = this - this.render = new CRender($refs['digital-flop']) + this.renderer = new CRender($refs['digital-flop']) }, mergeConfig () { const { defaultConfig, config } = this @@ -108,14 +108,14 @@ export default { this.mergedConfig = deepMerge(deepClone(defaultConfig, true), config || {}) }, initGraph () { - const { getShape, getStyle, render, mergedConfig } = this + const { getShape, getStyle, renderer, mergedConfig } = this const { animationCurve, animationFrame } = mergedConfig const shape = getShape() const style = getStyle() - this.graph = render.add({ + this.graph = renderer.add({ name: 'numberText', animationCurve, animationFrame, @@ -126,7 +126,7 @@ export default { getShape () { const { number, content, toFixed, textAlign } = this.mergedConfig - const [w, h] = this.render.area + const [w, h] = this.renderer.area const position = [w / 2, h / 2]