mirror of
				https://github.com/vuejs/babel-plugin-jsx.git
				synced 2025-10-31 01:12:17 +08:00 
			
		
		
		
	docs: update README
This commit is contained in:
		| @@ -213,6 +213,23 @@ const App = { | ||||
|     return () => <A v-slots={slots} />; | ||||
|   } | ||||
| }; | ||||
|  | ||||
| // or | ||||
| const App = { | ||||
|   setup() { | ||||
|     return () => ( | ||||
|       <> | ||||
|         <A> | ||||
|           { | ||||
|             default: () => <div>A</div>, | ||||
|             foo: () => <span>B</span> | ||||
|           } | ||||
|         </A> | ||||
|         <B>{() => 'foo'}</B> | ||||
|       </> | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### 在 TypeSript 中使用 | ||||
|   | ||||
| @@ -213,6 +213,23 @@ const App = { | ||||
|     return () => <A v-slots={slots} />; | ||||
|   } | ||||
| }; | ||||
|  | ||||
| // or | ||||
| const App = { | ||||
|   setup() { | ||||
|     return () => ( | ||||
|       <> | ||||
|         <A> | ||||
|           { | ||||
|             default: () => <div>A</div>, | ||||
|             foo: () => <span>B</span> | ||||
|           } | ||||
|         </A> | ||||
|         <B>{() => 'foo'}</B> | ||||
|       </> | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| ``` | ||||
|  | ||||
| ### In TypeScript | ||||
|   | ||||
		Reference in New Issue
	
	Block a user