|
|
|
@ -5,6 +5,7 @@ import {get_git_ver, get_update_alter, get_update_option, handle_update} from "@ |
|
|
|
|
import Tips from "@/components/update/Tips.vue" |
|
|
|
|
import config from "@/request/config.js" |
|
|
|
|
import ProcessIcon from "@/components/update/ProcessIcon.vue"; |
|
|
|
|
import {ElMessageBox} from "element-plus"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 注册store |
|
|
|
@ -231,11 +232,23 @@ const changeVersion = () => { |
|
|
|
|
// endregion |
|
|
|
|
|
|
|
|
|
// region 处理版本警告 |
|
|
|
|
const showAlterMsg = ref('') |
|
|
|
|
const handleUpdateAlter = () => { |
|
|
|
|
updateAlter.value.forEach( |
|
|
|
|
(item, index) => { |
|
|
|
|
if (selectedVerId.value < item.ver_id && props.ver_id >= item.ver_id) { |
|
|
|
|
alert("当前版本为" + props.ver_id + ":" + item.alter) |
|
|
|
|
showAlterMsg.value = "当前版本为" + props.ver_id + ":" + item.alter |
|
|
|
|
ElMessageBox( |
|
|
|
|
{ |
|
|
|
|
title: "降级提示", |
|
|
|
|
message: showAlterMsg.value, |
|
|
|
|
confirmButtonText: "知道了", |
|
|
|
|
closeOnClickModal: false, |
|
|
|
|
type: "warning", |
|
|
|
|
center: true, |
|
|
|
|
'show-close': false |
|
|
|
|
} |
|
|
|
|
).then().catch() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|