Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| snippets:vue [2025/11/05 12:02] – lingao | snippets:vue [2025/11/05 12:18] (current) – [tsx slots type] lingao | ||
|---|---|---|---|
| Line 319: | Line 319: | ||
| ++++ tsx slots type | | ++++ tsx slots type | | ||
| + | < | ||
| const Component = defineComponent({ | const Component = defineComponent({ | ||
| props: { | props: { | ||
| Line 326: | Line 327: | ||
| }, | }, | ||
| slots: Object as SlotsType< | slots: Object as SlotsType< | ||
| - | default: { foo: string; bar: number } | + | default: |
| }>, | }>, | ||
| setup: (props, { slots }) => { | setup: (props, { slots }) => { | ||
| Line 349: | Line 350: | ||
| </ | </ | ||
| ) | ) | ||
| + | </ | ||
| ++++ | ++++ | ||