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.
		
		
		
		
			
				
					39 lines
				
				880 B
			
		
		
			
		
	
	
					39 lines
				
				880 B
			| 
											3 years ago
										 | <!DOCTYPE html>
 | ||
|  | <html lang="en">
 | ||
|  | <head>
 | ||
|  |     <meta charset="UTF-8">
 | ||
|  |     <title>v-cloak</title>
 | ||
|  |     <style>
 | ||
|  |         [v-cloak]{display: none}
 | ||
|  |     </style>
 | ||
|  | </head>
 | ||
|  | <body>
 | ||
|  | <!--
 | ||
|  | v-bind: 单向绑定,可简写为 :xxx
 | ||
|  | v-model: 双向绑定
 | ||
|  | v-for: 循环逻辑
 | ||
|  | v-on: 绑定监听事件,可简写为 @xxx
 | ||
|  | v-if\v-else: 条件逻辑
 | ||
|  | v-show: 条件渲染
 | ||
|  | v-text: 所在标签替换文本
 | ||
|  | v-html: 将文本渲染成html代码,具有安全隐患
 | ||
|  | v-cloak: 在vue.js加载完成前加载html代码,结合css防闪烁
 | ||
|  | -->
 | ||
|  | <div id="root">
 | ||
|  |     <h1 v-cloak>{{name}}</h1>
 | ||
|  | </div>
 | ||
|  | <script type="text/javascript" src="../vue.js"></script>
 | ||
|  | </body>
 | ||
|  | 
 | ||
|  | <script type="text/javascript">
 | ||
|  |     Vue.config.productionTip = false  // 组织开发环境提示
 | ||
|  | 
 | ||
|  |     // 创建Vue实例
 | ||
|  |     const x = new Vue({
 | ||
|  |         el: '#root',
 | ||
|  |         data: {
 | ||
|  |             name: '尚硅谷',
 | ||
|  |         }
 | ||
|  |     })
 | ||
|  | </script>
 | ||
|  | </html>
 |