no message
Former-commit-id: 51d1fef43b49167144327c62b45d8e9bbb5cd1a7 [formerly 184a56d14648049c28ec392e20d88b1f9cf0c53b] [formerly 51d1fef43b49167144327c62b45d8e9bbb5cd1a7 [formerly 184a56d14648049c28ec392e20d88b1f9cf0c53b] [formerly 51d1fef43b49167144327c62b45d8e9bbb5cd1a7 [formerly 184a56d14648049c28ec392e20d88b1f9cf0c53b] [formerly 184a56d14648049c28ec392e20d88b1f9cf0c53b [formerly 468866b89662ae5a923a5ed755b5a8221cb7b1db [formerly 6d576dbfd246dfe4157e3dca73bd18dd4640bf22]]]]] Former-commit-id: 3c3e378f5e378bd9b93e7beec3cd2ec2dbb5a815 Former-commit-id: 74c495c6fae4fd1b05c7c2e348f84674daed1d61 Former-commit-id: 263a2c4139d3a675e685df7a5e0e01d6943213f5 [formerly abb3b3765efe373441a66c8b90533ba651fdb439] Former-commit-id: b1bb0183dfba53ae64b4025ff5cacc94c1fe5732 Former-commit-id: 5bf9706eec5f66484193c94cd2fa423e4399f91f Former-commit-id: 4f81c095ed67ee18cbb0424a08b9135cd0ec7866 Former-commit-id: 4aae2a4e7391a7706fd000bbd5c284b8c603d51c Former-commit-id: 6b6720954af0c80bae7677f0e63d04bedfe723bd
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import Cookies from 'js-cookie'
|
||||
import axios from 'axios'
|
||||
import semver from 'semver'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
// 获取项目信息
|
||||
import packJson from '../../package.json'
|
||||
@@ -105,9 +106,26 @@ util.checkUpdate = function (vm) {
|
||||
let version = res.tag_name
|
||||
const update = semver.lt(packJson.version, version)
|
||||
if (update) {
|
||||
console.log('update')
|
||||
} else {
|
||||
console.log('no update')
|
||||
vm.$nextTick(() => {
|
||||
vm.$notify({
|
||||
title: `D2Admin 新版本 ${res.name}`,
|
||||
duration: 0,
|
||||
dangerouslyUseHTMLString: true,
|
||||
message: `
|
||||
<p>${dayjs(res.created_at).format('YYYY年M月D日')}更新 版本号:${res.tag_name}</p>
|
||||
<p>
|
||||
<a
|
||||
href="${res.html_url}"
|
||||
class="el-button el-button--primary el-button--mini"
|
||||
style="text-decoration: none; margin-top: 10px;"
|
||||
target="blank">
|
||||
<i class="fa fa-link" style="margin-right: 5px;"></i>
|
||||
详细信息
|
||||
</a>
|
||||
</p>
|
||||
`.trim()
|
||||
})
|
||||
})
|
||||
}
|
||||
vm.$store.commit('d2adminUpdateSet', update)
|
||||
vm.$store.commit('d2adminReleasesSet', res)
|
||||
|
||||
Reference in New Issue
Block a user