【类 型】:style 1.改一下 “返航组件里面的tip标签组件” 位置 2.删掉几个无用组件
【原 因】:把组件全部放在组件目下面 不用子目录 以后有可能会用到 easycom 自动加载组件的特性 这样改目录结构符合规范 【过 程】: 【影 响】:
This commit is contained in:
parent
5abd57755e
commit
7ea8266f3c
@ -13,7 +13,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Tooltip from '@/components/Tag/Tooltip'
|
import Tooltip from '@/components/Tooltip'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'BatteryStatus',
|
name: 'BatteryStatus',
|
||||||
|
@ -1,89 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-row type="flex" justify="space-around">
|
|
||||||
<el-col :span="8" class="fb f-s-14 fc">
|
|
||||||
{{ online ? showState : '离线' }}
|
|
||||||
</el-col>
|
|
||||||
<el-col :class="online ? heartAnimation ? 'icon-heart online' : 'icon-heart1 online' : 'icon-xinsui offline'"
|
|
||||||
class="iconfont f-s-26 fc" :span="8"></el-col>
|
|
||||||
<el-col :span="8" class="fb f-s-14 fc">
|
|
||||||
{{ getPlaneMode }}
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'HeartTag',
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
heartAnimation: false, // 控制心跳动画图标
|
|
||||||
online: false,
|
|
||||||
isOnlineSetTimeout: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
heartBeat: {
|
|
||||||
deep: true
|
|
||||||
},
|
|
||||||
heartRandom: {
|
|
||||||
default: null,
|
|
||||||
deep: true
|
|
||||||
},
|
|
||||||
getPlaneMode: {
|
|
||||||
deep: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
// 显示状态
|
|
||||||
showState () {
|
|
||||||
let str = ''
|
|
||||||
if (Number(this.heartBeat) & 128) {
|
|
||||||
str += '已解'
|
|
||||||
} else {
|
|
||||||
str += '已锁'
|
|
||||||
}
|
|
||||||
return str
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
heartRandom: {
|
|
||||||
handler (val) {
|
|
||||||
// 心跳动画
|
|
||||||
this.heartAnimation = true
|
|
||||||
setTimeout(() => {
|
|
||||||
this.heartAnimation = false
|
|
||||||
}, 500)
|
|
||||||
// 在线状态
|
|
||||||
if (this.isOnlineSetTimeout) { // 进入本次心跳 删除掉线计时 既以下会重新计时
|
|
||||||
clearInterval(this.isOnlineSetTimeout)
|
|
||||||
}
|
|
||||||
this.online = true
|
|
||||||
this.isOnlineSetTimeout = setTimeout(() => { // 计时10秒后 掉线
|
|
||||||
this.online = false
|
|
||||||
}, 10000)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
@import "@/styles/theme.scss";
|
|
||||||
|
|
||||||
.el-row {
|
|
||||||
border-radius: 5px;
|
|
||||||
height: 36px;
|
|
||||||
line-height: 36px;
|
|
||||||
background-color: rgba($color: $white-color, $alpha: 0.5);
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.online {
|
|
||||||
background-color: rgba($color: $success-color, $alpha: 0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.offline {
|
|
||||||
background-color: rgba($color: $danger-color, $alpha: 0.5);
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,73 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-row class="p-r-10">
|
|
||||||
<el-col :class="state === 'danger' ? `${icon} dangerBG` : `${icon} normalBG`" class="iconfont f-s-22 fc "
|
|
||||||
:span="9"></el-col>
|
|
||||||
<el-col :span="unit !== '' ? 9 : 15" class="fb f-s-14 fr">
|
|
||||||
{{ val }}
|
|
||||||
</el-col>
|
|
||||||
<el-col v-if="unit !== ''" :span="6" class="fb f-s-14 fr">
|
|
||||||
{{ unit }}
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'PublicTag',
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
icon: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
required: true,
|
|
||||||
deep: true
|
|
||||||
},
|
|
||||||
val: {
|
|
||||||
default: '',
|
|
||||||
required: true,
|
|
||||||
deep: true
|
|
||||||
},
|
|
||||||
unit: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
required: true,
|
|
||||||
deep: true
|
|
||||||
},
|
|
||||||
state: {
|
|
||||||
type: String,
|
|
||||||
default: 'normal',
|
|
||||||
required: true,
|
|
||||||
deep: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
@import "@/styles/theme.scss";
|
|
||||||
|
|
||||||
.el-row {
|
|
||||||
border-radius: 5px;
|
|
||||||
height: 36px;
|
|
||||||
line-height: 36px;
|
|
||||||
background-color: rgba($color: $graylight-color, $alpha: 0.5);
|
|
||||||
max-width: 185px;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
.el-col {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.normalBG {
|
|
||||||
background-color: rgba($color: $success-color, $alpha: 0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.dangerBG {
|
|
||||||
background-color: rgba($color: $danger-color, $alpha: 0.5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
Loading…
Reference in New Issue
Block a user