From ae2b88c2f032e6a8bbfe04a80975515ce65acdfa Mon Sep 17 00:00:00 2001 From: theia Date: Thu, 2 Feb 2023 11:13:32 -0500 Subject: No wrapping components with graffiti-objects --- plugins/vue/demo/components/chat.js | 61 ++++++++++++++++++------------------- plugins/vue/demo/components/name.js | 13 +++++--- plugins/vue/demo/index.html | 12 ++------ 3 files changed, 40 insertions(+), 46 deletions(-) diff --git a/plugins/vue/demo/components/chat.js b/plugins/vue/demo/components/chat.js index 800ac45..b8537db 100644 --- a/plugins/vue/demo/components/chat.js +++ b/plugins/vue/demo/components/chat.js @@ -4,25 +4,22 @@ export default { components: { Name }, - props: ['tags', 'objects'], + props: ['tags'], data: ()=> ({ message: '' }), - computed: { - messages() { - return this.objects - .filter(o=> - 'message' in o && - 'timestamp' in o && - typeof o.message == 'string' && - typeof o.timestamp == 'number') - .sortBy('timestamp') - } - }, - methods: { + messageObjects(objects) { + return objects.filter(o=> + 'message' in o && + 'timestamp' in o && + typeof o.message == 'string' && + typeof o.timestamp == 'number') + .sortBy('timestamp') + }, + sendMessage() { if (!this.message) return this.$graffitiUpdate({ @@ -35,25 +32,25 @@ export default { }, template: ` -