dropdown.vue 865 Bytes
<template>
	<div class="drop-list" :class="{'login':type=='login'}" @mouseover="onOverHandler($event)" @mouseout="onOutHandler($event)">
		<!-- 登陆下拉样式 -->
		<template v-if="type=='login'">
			<div class="user" @click="onLoginHandler()">
				<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" >
				<li v-for="(item, index) in dataList" :key="index" @mousedown="onClickHandler($event,index)">{{item[labelProperty]}}</li>
			</ul>
		</div>
	</div>
</template>

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