@ComponentClass Mandatory
This decorator is mandatory to make your class a Vue
component decorator. That's what makes it visible to VueTypeScript
.
Options
Option | Description |
---|---|
Name of the component for Vue . Only used if you use the VueBuilder to create your app. | |
Template string of the component. Or false to explicitly ask for the component to have no template. In which case a render function returning nothing will be added.If the string a the exact value inherit , the template of the parent component will be used instead (must be a VueTypescript component). | |
The "emits" option as expected by Vue. | |
Other components used by the component. Can be an array if you want to use the name given in the decorators.Or an object if you want to rename them. | |
Directives used by the component. Same as components, can be either an array or an object depending if you want to rename them or not. | |
Group(s) on which the component should be registered in the VueBuilder. | |
Custom factory function that will be called each time a new instance of the component is created. | |
Define if external attributes that don't resolve to props should be forwarded to the root element of the component. Default is true . |
Examples
import { IconExpandMore } from "@banquette/vue-material-icons/expand-more";
@Component({
name: 'my-button',
components: [IconMaterialExpandMore]
})
class Button {
}
TIP
You can pass a string
instead of an object if you only need to define the name
option:
@Component('my-button')
class Button {
}