mirror of
				https://github.com/vuejs/babel-plugin-jsx.git
				synced 2025-10-31 17:32:32 +08:00 
			
		
		
		
	docs: Update README
This commit is contained in:
		
							
								
								
									
										38
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										38
									
								
								README.md
									
									
									
									
									
								
							| @@ -66,6 +66,44 @@ const App = () => ( | |||||||
| ) | ) | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
|  | ### Directives | ||||||
|  |  | ||||||
|  | > It is recommended to use camelCase version of it (`vModel`) in JSX, but you can use kebab-case too (`v-model`). | ||||||
|  |  | ||||||
|  | v-show | ||||||
|  |  | ||||||
|  | ```jsx | ||||||
|  | const App = { | ||||||
|  |   data() { | ||||||
|  |     return { visible: true }; | ||||||
|  |   }, | ||||||
|  |   render() { | ||||||
|  |     return <input vShow={this.visible} />; | ||||||
|  |   }, | ||||||
|  | }; | ||||||
|  | ``` | ||||||
|  |  | ||||||
|  | v-model | ||||||
|  |  | ||||||
|  | * You should use underscore (`_`) instead of dot (`.`) for modifiers (`vModel_trim={this.test}`) | ||||||
|  |  | ||||||
|  | ```jsx | ||||||
|  | export default { | ||||||
|  |   data: () => ({ | ||||||
|  |     test: 'Hello World', | ||||||
|  |   }), | ||||||
|  |   render() { | ||||||
|  |     return ( | ||||||
|  |       <> | ||||||
|  |         <input type="text" vModel_trim={this.test} /> | ||||||
|  |         {this.test} | ||||||
|  |       </> | ||||||
|  |     ) | ||||||
|  |   }, | ||||||
|  | } | ||||||
|  | ``` | ||||||
|  |  | ||||||
|  |  | ||||||
| ## Compatibility | ## Compatibility | ||||||
|  |  | ||||||
| This repo is only compatible with: | This repo is only compatible with: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user