v-menu用法

<!DOCTYPE html>
<html>
	<style>
		body {
    
    
			width: 600px;
		}
		a {
    
    
			text-decoration: none;
			display: block;
			color: #fff;
			width: 120px;
			height: 40px;
			line-height: 40px;
			border: 1px solid #fff;
			border-width: 1px 1px 0 0;
			background: #255f9e;
		}
		li {
    
    
			list-style-type: none;
		}
		#app > li {
    
    
			list-style-type: none;
			float: left;
			text-align: center;
			position: relative;
		}
		#app li a:hover {
    
    
			color: #fff;
			background: #ffb100;
		}
		#app li ul {
    
    
			position: absolute;
			left: -40px;
			top: 40px;
			margin-top: 1px;
			font-size: 12px;
		}
		[v-cloak] {
    
    
			display: none;
		}
	</style>
	<body>
		<div id="app">
			<label v-memu="mytaobao">我的淘宝</label>
			<label>收藏夹</label>
	

		</div>
		<script src="https://unpkg.com/vue@next"></script>
		<script>
			const vm = Vue.createApp({
    
    
				data() {
    
    
					return {
    
    
						message: 
						[name: '我的淘宝',
					]
						
					}
				}
			}).mount('#app')
		</script>
	</body>
</html>


猜你喜欢

转载自blog.csdn.net/weixin_40945354/article/details/120137836