I've read the Component Data docs and have looked through 3rd party implementations of attributes.json and tags.json, but I couldn't find a way to allow for auto-completion and suggestion of custom events, I've tried prefixing props with v-on: and @ but it's not quite the same when you type @ and it brings up a list of all available events to listen on.
I think the current format is very limited. See https://github.com/vuejs/vetur/issues/2090 for something more complete.
I don't find it too limiting, for instance I can generate docs for attributes per specific tag by providing a key of "tag-name/attribute-name", what I'm desperately trying to find is how to generate docs for events, I can't find any examples of that.
Documentation is definitely lacking, I was going through the source code to perhaps figure it out myself, but no luck on that front yet.
I'll close after adding some doc and a schema file.
For now, you can add type: "event" to any attributes.
Thanks @octref , just to clarify, an event type would allow for auto-completion and suggestions with v-on and @?
@michaeltintiuc Yes, sorry for the lack of documentation now...Take a look at https://github.com/vuejs/vetur/pull/2180/commits/1ccb6ba88898f003f484842be66c70c7e9c37d9d
and the setup here: https://github.com/vuejs/vetur/blob/813a3b52157e7a79a17383a320eac88f85b2050f/test/componentData/fixture/package.json#L10-L13
I'll make a release this week.
Cool modeling btw 馃帺
Thanks a lot @octref !
Is this scheduled for an upcoming release? If there's anything I can help with I'd be happy to
I was also wondering if there's any reason to support events prop in tags.json same it's done for attributes, i.e.:
{
"foo": {
"description": "Foo tag",
"attributes": ["bar"],
"events": ["baz"]
}
}