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

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

			}
		},
		computed: {
			getchargeState() {
				switch (this.batteryState) {
					case 0:
						return '/static/index/battery-null.png'
					case 1:
						return '/static/index/battery-has.png'
					case 2:
						return '/static/index/battery-warn.png'
					default:
						return '/static/index/battery-null.png'
				}
			}
		},
		methods: {

		}
	}
</script>

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