dropdown.vue 848 Bytes
<template>
	<div>
		<div class="drop-list" @mouseover="onOverHandler($event)" @mouseout="onOutHandler($event)">
			<!-- 登陆下拉样式 -->
			<template v-if="type=='login'">
				<div class="user">
					<img class="icon-img" src="@/assets/images/home/icon-user.png"> 
					<span>{{dataObj.name}}</span>
				</div>
			</template>
			<!-- 其他下拉样式 -->
			<template v-else>
				<span @click="onNavHandler()">
					{{type == "lang" ? sTitle : dataObj.name}}
				</span>
			</template>
			<div class="list">
				<div class="space"></div>
				<ul ref="ul" v-dpl>
					<li v-for="(item, index) in dataList" :key="index" @mousedown="onClickHandler($event,index)">{{item[labelProperty]}}</li>
				</ul>
			</div>
		</div>
	</div>
</template>

<script src="./dropdown.js"></script>
<style lang="scss" scoped>
@import "./dropdown.scss";
</style>