From 015a89fe2bee88fe55f0ea987d11ef76e4f4c6e2 Mon Sep 17 00:00:00 2001 From: Timo Hocker Date: Sun, 2 Aug 2020 11:38:46 +0200 Subject: [PATCH] started config editor --- src/components/ConfigEditor.vue | 82 +++++++++++++++++++++++++++++++++ src/template.js | 34 ++++++++++++++ src/views/AppView.vue | 26 +++++------ 3 files changed, 128 insertions(+), 14 deletions(-) create mode 100644 src/components/ConfigEditor.vue create mode 100644 src/template.js diff --git a/src/components/ConfigEditor.vue b/src/components/ConfigEditor.vue new file mode 100644 index 0000000..f4e6b27 --- /dev/null +++ b/src/components/ConfigEditor.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/src/template.js b/src/template.js new file mode 100644 index 0000000..98df67e --- /dev/null +++ b/src/template.js @@ -0,0 +1,34 @@ +export default { + type: 'array', + child: { + type: 'object', + properties: [ + { + type: 'string', + name: 'type' + }, + { + name: 'columns', + type: 'array', + child: { type: 'string' } + }, + { + name: 'x', + type: 'string' + }, + { + name: 'y', + type: 'array', + child: { + type: 'object', + properties: [ + { type: 'string', name: 'label' }, + { type: 'string', name: 'field' }, + { type: 'string', name: 'color' }, + { type: 'string', name: 'fill' } + ] + } + } + ] + } +}; diff --git a/src/views/AppView.vue b/src/views/AppView.vue index 0fb3874..491e962 100644 --- a/src/views/AppView.vue +++ b/src/views/AppView.vue @@ -2,9 +2,12 @@
-