“{ $: ComponentInternalInstance; $data: {}; $props: Partial<{}> & Omit<Readonly<ExtractPropTypes<{}>> & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>; ... 10 more ...; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => ...”上不存在属性“list”。
时间: 2023-05-30 11:07:44 浏览: 1868
; $attrs: {}; $refs: {}; $slots: {}; $root: ComponentInternalInstance; $parent: ComponentInternalInstance | null; $emit: Function; $el: Element; $options: ComponentOptions; $nextTick: Function; }”
This is a type definition for a Vue.js component instance object. It includes several properties that are commonly used within Vue components:
- `$data`: an object representing the component's data properties
- `$props`: a partial object representing the component's props (which may be defined in the component's options)
- `$attrs`: an object representing any non-prop attributes passed to the component
- `$refs`: an object representing any named references to child components or elements within the component's template
- `$slots`: an object representing any named slots within the component's template
- `$root`: the root component instance of the current component hierarchy
- `$parent`: the parent component instance (if any) of the current component
- `$emit`: a function for emitting custom events from the component
- `$el`: the root DOM element of the component
- `$options`: the options object used to define the component (including its data, methods, computed properties, etc.)
- `$nextTick`: a function for scheduling a callback to run after the next DOM update cycle.
阅读全文