<template>
	<image class="banner-image" @tap="navToBanner(item)" :src="getSrc(item)" :mode="imageMode" @load="load"></image>
</template>

<script>
	import {
		navToBanner,
		LINK_RESOURCE_LINK_KEY
	} from '../js/request.js'

	export default {
		props: ['item', 'imageMode'],
		methods: {
			...{
				navToBanner
			},
			load() {
				this.$emit('load')
			},
			swiperChange(e) {
				this.$emit('change', e)
			},
			getSrc(item) {
				return item[LINK_RESOURCE_LINK_KEY]
			}
		}
	}
</script>

<style lang="scss" scoped>
	.banner-image {
		width: 100%;
	}
</style>
