<template>
	<view>
		<image :src="getchargeState"></image>
	</view>
</template>

<script>
	export default {
		props: ["chargerState"],
		data() {
			return {

			}
		},
		computed: {
			getchargeState() {
				switch (this.chargerState) {
					case 0:
						return '/static/index/charge-has.png'
					case 1:
						return '/static/index/charge-doing.png'
					case 2:
						return '/static/index/charge-doing.png'
					case 3:
						return '/static/index/charge-has.png'
					case 4:
						return '/static/index/charge-warn.png'
					case 6:
						return '/static/index/charge-warn.png'
					default:
						return '/static/index/charge-null.png'
				}
			}
		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	image {
		width: 70px;
		height: 70px;
	}
</style>