From 6a6f920a97c5332b0d74f4ae112ebfed98473f11 Mon Sep 17 00:00:00 2001 From: FairyEver <1711467488@qq.com> Date: Mon, 6 Jul 2020 11:21:16 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20:sparkles:=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E6=97=A0=E7=94=A8=E7=9A=84=20get=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/d2-container/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/d2-container/index.js b/src/components/d2-container/index.js index ced6e2ac..ab579c96 100644 --- a/src/components/d2-container/index.js +++ b/src/components/d2-container/index.js @@ -1,4 +1,3 @@ -import { get } from 'lodash' import d2Source from './components/d2-source.vue' const containers = { @@ -29,7 +28,7 @@ export default { computed: { // 始终返回渲染组件 component () { - return get(containers, `${this.type}${this.betterScroll ? 'bs' : ''}`, 'div') + return containers[`${this.type}${this.betterScroll ? 'bs' : ''}`] || 'div' } }, render (h) {