升级Vue3,iView替换ElementPlus

- 删除babel配置、更新依赖与入口初始化
- 全量替换UI组件、样式适配,新增迁移文档与标签/过滤器自动化替换脚本
This commit is contained in:
lifenlong
2026-06-05 17:49:43 +08:00
parent 615ee91511
commit 832fda813b
322 changed files with 25693 additions and 24453 deletions

View File

@@ -1,13 +1,13 @@
import store from "@/store";
import router from "@/router";
import { Notification } from "element-ui";
import { ElNotification } from "element-plus";
class Base {
/**
* 初始化
*/
constructor() {
this.$notify = Notification;
this.$notify = ElNotification;
}
getStoreInstance() {
@@ -54,7 +54,7 @@ class Base {
* 判断用户是否打开对话页
*/
isTalkPage() {
let path = router.currentRoute.path;
let path = router.currentRoute.value.path;
return !(path != "/message" && path != "/");
}
}

View File

@@ -1,7 +1,6 @@
import Base from "./base";
import Vue from "vue";
import router from "@/router";
import vm from "@/main";
import { nextTick } from "vue";
import { getAppBridge } from "@/utils/app-bridge";
import NewMessageNotify from "@/components/notify/NewMessageNotify";
import { ServeClearTalkUnreadNum, ServeCreateTalkList } from "@/api/chat";
import { formatTalkItem, findTalkIndex, toTalk } from "@/utils/talk";
@@ -46,11 +45,11 @@ class Talk extends Base {
this.resource = resource;
// 判断发送者消息是否在当前用户列表中
if (this.sender_id && !vm.$store.state.talks.items.find(item => {
const bridge = getAppBridge();
if (this.sender_id && !bridge.$store.state.talks.items.find(item => {
return item.userId == this.sender_id
})) {
// 没有当前用户,未在当前列表 进行重新加载
vm.loadUserSetting('update')
bridge.loadUserSetting('update')
}
}
@@ -147,15 +146,14 @@ class Talk extends Base {
receiver_id = this.sender_id;
}
const bridge = getAppBridge();
this.$notify({
message: vm.$createElement(NewMessageNotify, {
props: {
avatar,
talk_type,
nickname,
content: this.getTalkText(),
datetime: this.resource.created_at,
},
message: bridge.$createElement(NewMessageNotify, {
avatar,
talk_type,
nickname,
content: this.getTalkText(),
datetime: this.resource.created_at,
}),
customClass: "im-notify",
duration: 3000,
@@ -211,7 +209,7 @@ class Talk extends Base {
record.userId == this.getAccountId() ||
record.fromUser == this.getAccountId()
) {
Vue.nextTick(() => {
nextTick(() => {
el.scrollTop = el.scrollHeight;
});
} else {

View File

@@ -2,7 +2,7 @@ import store from "@/store";
import config from "@/config/config";
import WsSocket from "@/plugins/ws-socket";
import { getToken } from "@/utils/auth";
import { Notification } from "element-ui";
import { ElNotification } from "element-plus";
// 引入消息处理类
import KeyboardEvent from "@/im-server/event/keyboard";
@@ -86,7 +86,7 @@ class SocketInstance {
});
this.socket.on("event_error", (data) => {
Notification({
ElNotification({
title: "友情提示",
message: data.message,
type: "warning",