NavUpdateLog.vue
868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<template>
<div class="com-up-log">
<a :href="v.link" target="blank" @click="clickHandler()">更新日志</a>
<i class="i i-dot" v-if="v.isNew"></i>
</div>
</template>
<script>
import { Version } from 'glsx-common-sdk'
const version = new Version({
request: {
baseUrl: 'https://config-center-backend.glsx.com.cn/glsxAdmin/config',
isSign: false
}
})
export default {
name: 'NavUpdateLog',
data() {
return {
v: {}
}
},
mounted() {
this.getUpdateLogCofig()
},
methods: {
async getUpdateLogCofig() {
this.v = await version.get({ moduleUrl: 'scrm-sp', env: 'update' })
},
clickHandler() {
this.v = version.set(this.v.version)
}
}
}
</script>
<style lang="scss" scoped>
.com-up-log {
position: relative;
.i-dot {
position: absolute;
top: -8px;
right: -8px;
}
}
</style>