diff options
Diffstat (limited to 'plugins/vue/demo/components/name.js')
-rw-r--r-- | plugins/vue/demo/components/name.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/plugins/vue/demo/components/name.js b/plugins/vue/demo/components/name.js index ec1de62..7189349 100644 --- a/plugins/vue/demo/components/name.js +++ b/plugins/vue/demo/components/name.js @@ -1,10 +1,10 @@ export const Name = { - props: ["of", "objects"], + props: ["of"], - computed: { - name() { - const nameObjects = this.objects + methods: { + name(objects) { + const nameObjects = objects .filter(o=> 'name' in o && 'of' in o && @@ -20,7 +20,10 @@ export const Name = { } }, - template: '{{name}}' + template: ` + <graffiti-objects :tags="[of]" v-slot="{objects}"> + {{ name(objects) }} + </graffiti-objects>` } export const SetMyName = { |