1. 修改了提示使用的组件为ElMessageBox

2. 解决ElMessageBox样式丢失问题
main
RogerWork 9 months ago
parent 68192d12d2
commit 5dbdc6fe3f
  1. 15
      src/components/update/CinemaUpdate.vue
  2. 5
      src/main.js

@ -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()
}
}
)

@ -6,6 +6,11 @@ import * as ELIcons from '@element-plus/icons-vue'
import router from './router/index.js'
import store from "@/store/index.js";
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import "element-plus/theme-chalk/el-message-box.css";
import "element-plus/theme-chalk/el-loading.css";
import "element-plus/theme-chalk/el-message.css";
import "element-plus/theme-chalk/el-notification.css";
import 'element-plus/dist/index.css'
const app = createApp(App)

Loading…
Cancel
Save