Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
snippets:vue [2025/11/05 12:02] lingaosnippets:vue [2025/11/05 12:18] (current) – [tsx slots type] lingao
Line 319: Line 319:
  
 ++++ tsx slots type | ++++ tsx slots type |
 +<codeprism tsx>
 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: ({ foo: string; bar: number }) => JSX.Element
   }>,   }>,
   setup: (props, { slots }) => {   setup: (props, { slots }) => {
Line 349: Line 350:
   </Component>   </Component>
 ) )
 +</codeprism>
 ++++ ++++
  • snippets/vue.txt
  • Last modified: 2025/11/05 12:18
  • by lingao