<template>
	<view>
		<u-navbar :is-back="false" title="WMS PDA" :background="background"></u-navbar>
		<scroll-view scroll-y class="page">
			<view class="nav-list">
				<view class="row-flex">
					<view v-for="(item, i) in elements" :key="i" class="nav-view" v-if="$menuLimit(item.id)">
						<navigator hover-class="none" :url="'/pages/tms/features/' + item.name" class="nav-a nav-li" navigateTo
							:class="'bg-'+item.color">
							<view class="nav-title">{{item.title}}</view>
							<view class="nav-name">{{item.en_name}}</view>
							<text :class="'cuIcon-' + item.cuIcon"></text>
						</navigator>
					</view>
				</view>
			</view>
		</scroll-view>
		<u-gap height="70"></u-gap>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				background: {
					backgroundImage: 'linear-gradient(45deg, rgb(28, 187, 180), rgb(141, 198, 63))'
				},
				elements: [{
						title: '车辆审核',
						name: 'VehicleInOut/index',
						en_name: 'VehicleInOut',
						color: 'cyan',
						cuIcon: 'shop',
						label: '车辆审核',
						id:'500001'
					},
					{
						title: '装车审核',
						name: 'check/index',
						en_name: 'check',
						color: 'cyan',
						cuIcon: 'shop',
						label: '装车审核',
						id:'500002'
					},
				],
			}
		},
		computed: {
			tabbar() {
				return store.vuex_tabbar
			}
		},
	}
</script>

<style lang="scss" scoped>
	.demo-layout {
		height: 80rpx;
		border-radius: 8rpx;
	}

	.bg-purple {
		background: #d3dce6;
	}

	.mt-10 {
		margin-top: 10px;
	}

	.nav-view {
		width: 45%;
		margin: 2.5%;
		// display: contents;
	}
	.row-flex {
		width: 100%;
		display: flex;
		flex-wrap: wrap;
	}
	.nav-li {
		// width: 45%;
		width: 100%;
		// margin: 0 2.5% 40upx;
		background-image: url('../../static/img/background.png');
		background-size: cover;
		background-position: center;
		position: relative;
		z-index: 1;
	}

	.nav-a {
		padding: 30upx;
		border-radius: 12upx;
	}

	.nav-li::after {
		content: "";
		position: absolute;
		z-index: -1;
		background-color: inherit;
		width: 100%;
		height: 100%;
		left: 0;
		bottom: -10%;
		border-radius: 10upx;
		opacity: 0.2;
		transform: scale(0.9, 0.9);
	}

	.nav-li.cur {
		color: #fff;
		background: rgb(94, 185, 94);
		box-shadow: 4upx 4upx 6upx rgba(94, 185, 94, 0.4);
	}

	.nav-title {
		font-size: 32upx;
		font-weight: 300;
	}

	.nav-title::first-letter {
		font-size: 40upx;
		margin-right: 4upx;
	}

	.nav-name {
		font-size: 28upx;
		text-transform: Capitalize;
		margin-top: 20upx;
		position: relative;
	}

	.nav-name::before {
		content: "";
		position: absolute;
		display: block;
		width: 40upx;
		height: 6upx;
		background: #fff;
		bottom: 0;
		right: 0;
		opacity: 0.5;
	}

	.nav-name::after {
		content: "";
		position: absolute;
		display: block;
		width: 100upx;
		height: 1px;
		background: #fff;
		bottom: 0;
		right: 40upx;
		opacity: 0.3;
	}

	.nav-name::first-letter {
		font-weight: bold;
		font-size: 36upx;
		margin-right: 1px;
	}

	.nav-li text {
		position: absolute;
		right: 30upx;
		top: 30upx;
		font-size: 52upx;
		width: 60upx;
		height: 60upx;
		text-align: center;
		line-height: 60upx;
	}

	.text-light {
		font-weight: 300;
	}

	@keyframes show {
		0% {
			transform: translateY(-50px);
		}

		60% {
			transform: translateY(40upx);
		}

		100% {
			transform: translateY(0px);
		}
	}

	@-webkit-keyframes show {
		0% {
			transform: translateY(-50px);
		}

		60% {
			transform: translateY(40upx);
		}

		100% {
			transform: translateY(0px);
		}
	}
</style>