From 1462b7db6e4384191c14f079826f012be5a22b4c Mon Sep 17 00:00:00 2001 From: Peter Joles Date: Wed, 20 May 2020 07:16:58 -0700 Subject: [PATCH] Move SimpleTable into its own component --- src/components/ChatTeneoResponse.vue | 50 ++------------------------ src/components/SimpleTable.vue | 53 ++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 47 deletions(-) create mode 100644 src/components/SimpleTable.vue diff --git a/src/components/ChatTeneoResponse.vue b/src/components/ChatTeneoResponse.vue index 086e6918..9708503a 100644 --- a/src/components/ChatTeneoResponse.vue +++ b/src/components/ChatTeneoResponse.vue @@ -132,30 +132,7 @@ - - - + @@ -433,7 +410,8 @@ export default { Video: () => import("@/components/Video"), Vimeo: () => import("@/components/Vimeo"), YouTube: () => import("@/components/YouTube"), - Form: () => import("@/components/Form") + Form: () => import("@/components/Form"), + SimpleTable: () => import("@/components/SimpleTable") }, props: { item: { @@ -447,17 +425,6 @@ export default { }, data() { return { - simpleTable: { - name: "displaySimpleTable", - dense: false, - maxHeight: null, - fixedHeader: false, - headers: ["Account", "Balance"], - rows: [ - ["Current", "$1271.21"], - ["Private", "$137.54"] - ] - }, snackbar: false, snackBarTimeout: 1500, snackBarText: "Success", @@ -816,17 +783,6 @@ export default { } }, methods: { - hasHeaders(extension) { - let hasHeaders = false; - if (extension.headers) { - extension.headers.forEach(header => { - if (header.trim() !== "") { - hasHeaders = true; - } - }); - } - return hasHeaders; - }, addAccessibilityPrefix(text) { const prefix508 = `Chat bot said.`; if (!isHtml(text)) { diff --git a/src/components/SimpleTable.vue b/src/components/SimpleTable.vue new file mode 100644 index 00000000..5e062f7d --- /dev/null +++ b/src/components/SimpleTable.vue @@ -0,0 +1,53 @@ + + + + \ No newline at end of file