uni-stat-breadcrumb.vue 609 字节
Newer Older
M
MicroMilo 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
<template>
	<view class="uni-breadcrumb-x">
		<uni-breadcrumb separator="/">
			<uni-breadcrumb-item v-for="(route, index) in routes" :key="index" :to="route.to && route.to.path||''">{{route.name}}</uni-breadcrumb-item>
		</uni-breadcrumb>
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex'

	export default {
		name: "uni-stat-breadcrumb",
		data() {
			return {

			};
		},
		computed: {
			...mapState('app', ['routes'])
		}
	}
</script>

<style>
	.uni-breadcrumb-x {
		flex: 1;
		display: flex;
		padding: 0 5px;
		min-height: 55px;
		line-height: 55px;
		align-items: center;
	}
</style>