Files
kuboard-press/.vuepress/comp/CurrentVersionV3.vue
Shao Huan Qing 9e5a410666 v3.5.2.3
2023-03-12 11:40:18 +08:00

51 lines
1.4 KiB
Vue

<template>
<div style="margin-top: 20px;">
Kuboard 最新版本对照表
<b-table striped hover :items="items" :fields="fields"></b-table>
</div>
</template>
<script>
import axios from 'axios'
export default {
props: {
},
data() {
return {
latestVersion: undefined,
fields: [ 'channel', 'dockerTag', 'version', 'buildDate' ]
}
},
computed: {
currentVersion () {
if (this.latestVersion === undefined) return { latest: {}, beta: {}, arm: {}, alpha: {} }
return this.latestVersion[this.latestVersion.default].channel
},
items () {
let items = []
items.push({ channel: 'v3', dockerTag: 'eipwork/kuboard:v3', version: this.currentVersion.latest.version, buildDate: this.currentVersion.latest.buildDate })
// items.push({ channel: 'beta', dockerTag: 'eipwork/kuboard:v3-beta', version: this.currentVersion.beta.version, buildDate: this.currentVersion.beta.buildDate })
// items.push({ channel: 'arm', dockerTag: 'eipwork/kuboard:arm', version: this.currentVersion.arm.version, buildDate: this.currentVersion.arm.buildDate })
return items
}
},
components: { },
mounted () {
axios.get('https://addons.kuboard.cn/kuboard-latest-version-v3.json?' + Math.random).then(resp => {
console.log(resp)
this.latestVersion = resp.data
}).catch(e => {
console.log(e)
})
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>