// vue 2.x 项目中的 types/options.d.ts export interface ComponentOptions< V extends Vue, Data=DefaultData<V>, Methods=DefaultMethods<V>, Computed=DefaultComputed, PropsDef=PropsDefinition<DefaultProps>, Props=DefaultProps> { data?: Data; props?: PropsDef; propsData?: object; computed?: Acce...
-- child component --><template><slot:text="greetingMessage":count="1"></slot></template> <ChildComponent><template#header="headerProps">{{ headerProps }}</template><template#default="defaultProps">{{ defaultProps }}</template><template#footer="footerProps">{{ footerProps }}</template></...
You may also change default props per-component, to do so just pass the componentDefaultProps key to plugin settings. Important: these props are not validated, so make sure you define them with right values. import { createApp } from 'vue'; import { plugin as vueTransitionsPlugin } from ...
// vue 2.x 项目中的 types/options.d.ts export interface ComponentOptions< V extends Vue, Data=DefaultData<V>, Methods=DefaultMethods<V>, Computed=DefaultComputed, PropsDef=PropsDefinition<DefaultProps>, Props=DefaultProps> { data?: Data; props?: PropsDef; propsData?: object; computed?: ...
Props=DefaultProps> { data?: Data; props?: PropsDef; propsData?: object; computed?: Accessors<Computed>; methods?: Methods; watch?: Record<string, WatchOptionsWithHandler<any> | WatchHandler<any>>; el?: Element | string; template?: string; ...
You may also change default props per-component, to do so just pass the componentDefaultProps key to plugin settings. Important: these props are not validated, so make sure you define them with right values. import { createApp } from 'vue'; import { plugin as vueTransitionsPlugin } from ...