Blame view

src/components/home/dropdown/dropdown.vue 906 Bytes
simon committed
1 2
<template>
	<div>
simon committed
3
		<div class="drop-list" :class="{'login':type=='login'}" @mouseover="onOverHandler($event)" @mouseout="onOutHandler($event)">
simon committed
4 5
			<!-- 登陆下拉样式 -->
			<template v-if="type=='login'">
joe committed
6
				<div class="user" @click="onLoginHandler()">
simon committed
7
					<img class="icon-img" src="@/assets/images/home/icon-user.png">
8
					<span>{{dataObj.name}}</span>
simon committed
9 10
				</div>
			</template>
simon committed
11
			<!-- 其他下拉样式 -->
simon committed
12 13
			<template v-else>
				<span @click="onNavHandler()">
simon committed
14
					{{type == "lang" ? sTitle : dataObj.name}}
simon committed
15 16
				</span>
			</template>
simon committed
17 18
			<div class="list">
				<div class="space"></div>
2  
simon committed
19 20
				<ul ref="ul" v-dpl>
					<li v-for="(item, index) in dataList" :key="index" @mousedown="onClickHandler($event,index)">{{item[labelProperty]}}</li>
simon committed
21 22 23 24 25 26 27 28 29 30
				</ul>
			</div>
		</div>
	</div>
</template>

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