From 4574b74864b20d542f766af44ef75fe7ef8b5c71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Thu, 16 Apr 2020 23:41:07 +0200 Subject: [PATCH] refactoring --- src/components/Demo/index.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/Demo/index.vue b/src/components/Demo/index.vue index 74d87ec6..8d64ab26 100644 --- a/src/components/Demo/index.vue +++ b/src/components/Demo/index.vue @@ -30,6 +30,7 @@ export default { components: { ReactRenderer, }, + props: { name: { type: String, @@ -44,8 +45,8 @@ export default { data() { return { - content: null, files: [], + content: null, currentIndex: 0, syntax: { js: 'javascript', @@ -58,7 +59,8 @@ export default { computed: { mainFile() { - const file = this.files.find(item => item.path.endsWith('.vue') || item.path.endsWith('.jsx')) + const file = this.files + .find(item => item.path.endsWith('.vue') || item.path.endsWith('.jsx')) if (!file) { return