12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <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>
|