You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					30 lines
				
				811 B
			
		
		
			
		
	
	
					30 lines
				
				811 B
			| 
											2 years ago
										 | <!DOCTYPE html>
 | ||
|  | <html lang="en">
 | ||
|  | <head>
 | ||
|  |     <meta charset="UTF-8">
 | ||
|  |     <meta name="viewport" content="width=device-width, initial-scale=1.0">
 | ||
|  |     <meta http-equiv="X-UA-Compatible" content="ie=edfe">
 | ||
|  |     <script src="https://unpkg.com/vue@3.3.4/dist/vue.global.js"></script>
 | ||
|  |     <title>v-show</title>
 | ||
|  | </head>
 | ||
|  | <body>
 | ||
|  |     <div id="app">
 | ||
|  |         <img src="https://v2.cn.vuejs.org/images/logo.svg" alt="" v-show="true">
 | ||
|  |         <img src="https://v2.cn.vuejs.org/images/logo.svg" alt="" v-show="false">
 | ||
|  |         <h2 v-show="isShow">对象形式</h2>
 | ||
|  |         <h2 v-show="age>18">{{ age }}</h2>
 | ||
|  |     </div>
 | ||
|  | <script>
 | ||
|  |     const App = {
 | ||
|  |         data() {
 | ||
|  |             return {
 | ||
|  |                 isShow: true,
 | ||
|  |                 age: 20,
 | ||
|  |             }
 | ||
|  |         }
 | ||
|  |     }
 | ||
|  |     Vue.createApp(App).mount("#app")
 | ||
|  | </script>
 | ||
|  | </body>
 | ||
|  | </html>
 |