12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <template>
- <view class="chargeState">
- <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>
- .chargeState{
- image {
- width: 70px;
- height: 70px;
- padding-right: 41px;
- }
- }
- .chargeState:last-child{
- image{
- padding: 0;
- }
- }
-
- </style>
|