NavUpdateLog.vue
1.01 KB
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
46
47
48
49
50
51
52
53
<template>
<div class="com-up-log">
<a :href="v.link" target="blank" @click="clickHandler()">更新日志</a>
<span class="isNew" v-if="v.isNew">New</span>
</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()
}
}
}
</script>
<style lang="scss" scoped>
.com-up-log {
position: relative;
margin-right: 6px;
.isNew {
position: absolute;
width: 30px;
height: 16px;
line-height: 16px;
background: #eb4e4e;
border-radius: 4px 4px 4px 0;
top: -12px;
right: -22px;
color: #fff;
font-size: 12px;
}
}
</style>