From 4bcaf14bad1f8566650c5d9304093354b8595ec8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=94=B0=E9=A6=99=E7=90=AA?= <624506849@qq.com>
Date: Wed, 22 Jul 2026 13:36:44 +0800
Subject: [PATCH 1/2] =?UTF-8?q?fix(im):=20=E8=BF=81=E7=A7=BB=20Element=20U?=
=?UTF-8?q?I=20=E5=9B=BE=E6=A0=87=E5=B9=B6=E4=BF=AE=E5=A4=8D=20Vue=203=20?=
=?UTF-8?q?=E5=85=BC=E5=AE=B9=E9=97=AE=E9=A2=98=20-=20=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=20migrate-legacy-icons=20=E8=84=9A=E6=9C=AC=EF=BC=8C=E6=89=B9?=
=?UTF-8?q?=E9=87=8F=E5=B0=86=E6=97=A7=E5=9B=BE=E6=A0=87=E6=9B=BF=E6=8D=A2?=
=?UTF-8?q?=E4=B8=BA=20legacy-el-icon=20=E7=BB=84=E4=BB=B6=20-=20=E5=A4=9A?=
=?UTF-8?q?=E4=B8=AA=E7=BB=84=E4=BB=B6=E4=B8=AD=E5=B0=86=20=20=E7=BB=9F=E4=B8=80=E6=94=B9=E4=B8=BA=20=20-=20=E5=B0=86=20size=3D"mini"/"med?=
=?UTF-8?q?ium"=20=E8=B0=83=E6=95=B4=E4=B8=BA=20Element=20Plus=20=E7=9A=84?=
=?UTF-8?q?=20small/default=20-=20=E6=96=B0=E5=A2=9E=20legacy-el-icon=20?=
=?UTF-8?q?=E5=85=A8=E5=B1=80=E7=BB=84=E4=BB=B6=E5=8F=8A=E5=9B=BE=E6=A0=87?=
=?UTF-8?q?=E6=98=A0=E5=B0=84=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
im/scripts/migrate-legacy-icons.js | 81 ++++++++++++++++
im/src/assets/images.js | 5 +
im/src/components/chat/TalkCodeBlock.vue | 4 +-
im/src/components/chat/TalkForwardRecord.vue | 2 +-
im/src/components/chat/TalkSearchRecord.vue | 8 +-
.../components/chat/messaege/AudioMessage.vue | 8 +-
.../components/chat/messaege/CodeMessage.vue | 10 +-
.../chat/messaege/VisitCardMessage.vue | 2 +-
.../components/chat/messaege/VoteMessage.vue | 9 +-
im/src/components/chat/panel/PanelHeader.vue | 4 +-
im/src/components/chat/panel/PanelToolbar.vue | 8 +-
im/src/components/chat/panel/TalkPanel.vue | 13 ++-
.../chat/panel/template/footPrint.vue | 20 ++--
.../chat/panel/template/goodsLink.vue | 2 +-
.../chat/panel/template/storeDetail.vue | 4 +-
im/src/components/editor/MeEditor.vue | 10 +-
im/src/components/editor/MeEditorEmoticon.vue | 6 +-
.../components/editor/MeEditorFileManage.vue | 2 +-
.../components/editor/MeEditorImageView.vue | 4 +-
im/src/components/editor/MeEditorRecorder.vue | 36 +++----
.../editor/MeEditorSystemEmoticon.vue | 4 +-
im/src/components/editor/MeEditorVote.vue | 10 +-
im/src/components/global/Empty.vue | 4 +-
im/src/components/global/LegacyElIcon.vue | 25 +++++
im/src/components/layout/AbsModule.vue | 2 +-
im/src/components/layout/AvatarCropper.vue | 10 +-
im/src/components/layout/RewardModule.vue | 2 +-
.../components/notify/FriendApplyNotify.vue | 2 +-
im/src/components/notify/NewMessageNotify.vue | 4 +-
im/src/components/user/UserSearch.vue | 4 +-
.../user/user-card/UserCardDetail.vue | 15 +--
im/src/components/user/user-card/index.js | 4 +
im/src/core/global-component.js | 4 +
im/src/core/legacy-icon-map.js | 96 +++++++++++++++++++
im/src/plugins/contextmenu.js | 3 +-
im/src/store/modules/user.js | 5 +-
im/src/store/state.js | 2 +-
im/src/views/layout/MainLayout.vue | 2 +-
im/src/views/message/index.vue | 8 +-
39 files changed, 329 insertions(+), 115 deletions(-)
create mode 100644 im/scripts/migrate-legacy-icons.js
create mode 100644 im/src/assets/images.js
create mode 100644 im/src/components/global/LegacyElIcon.vue
create mode 100644 im/src/core/legacy-icon-map.js
diff --git a/im/scripts/migrate-legacy-icons.js b/im/scripts/migrate-legacy-icons.js
new file mode 100644
index 00000000..cdb2cd18
--- /dev/null
+++ b/im/scripts/migrate-legacy-icons.js
@@ -0,0 +1,81 @@
+const fs = require("fs");
+const path = require("path");
+
+const root = path.join(__dirname, "../src");
+
+const pairs = [
+ [/<\/i>/g, ''],
+ [/ 加好友/g, ' 加好友'],
+ [/<\/i> 添加选项/g, ' 添加选项'],
+ [
+ /<\/i>/g,
+ '',
+ ],
+ [
+ //g,
+ '',
+ ],
+ [/icon="el-icon-microphone"/g, ":icon=\"$legacyIcon('el-icon-microphone')\""],
+ [/icon="el-icon-video-pause"/g, ":icon=\"$legacyIcon('el-icon-video-pause')\""],
+ [/icon="el-icon-video-play"/g, ":icon=\"$legacyIcon('el-icon-video-play')\""],
+ [/icon="el-icon-upload"/g, ":icon=\"$legacyIcon('el-icon-upload')\""],
+ [/icon="el-icon-refresh"/g, ":icon=\"$legacyIcon('el-icon-refresh')\""],
+ [/icon="el-icon-refresh-left"/g, ":icon=\"$legacyIcon('el-icon-refresh-left')\""],
+ [/icon="el-icon-refresh-right"/g, ":icon=\"$legacyIcon('el-icon-refresh-right')\""],
+ [/prefix-icon="el-icon-search"/g, ":prefix-icon=\"$legacyIcon('el-icon-search')\""],
+ [/size="mini"/g, 'size="small"'],
+ [/size='mini'/g, "size='small'"],
+ [/size="medium"/g, 'size="default"'],
+];
+
+function walk(dir, files = []) {
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
+ const full = path.join(dir, entry.name);
+ if (entry.isDirectory()) walk(full, files);
+ else if (full.endsWith(".vue")) files.push(full);
+ }
+ return files;
+}
+
+let changed = 0;
+for (const file of walk(root)) {
+ let content = fs.readFileSync(file, "utf8");
+ let next = content;
+ for (const [pattern, replacement] of pairs) {
+ next = next.replace(pattern, replacement);
+ }
+ if (next !== content) {
+ fs.writeFileSync(file, next);
+ console.log("updated:", path.relative(root, file));
+ changed++;
+ }
+}
+
+console.log("files changed:", changed);
diff --git a/im/src/assets/images.js b/im/src/assets/images.js
new file mode 100644
index 00000000..8c91c201
--- /dev/null
+++ b/im/src/assets/images.js
@@ -0,0 +1,5 @@
+import defaultAvatar from "@/assets/image/detault-avatar.jpg";
+import defaultUserBanner from "@/assets/image/default-user-banner.png";
+import noOncallImage from "@/assets/image/no-oncall.6b776fcf.png";
+
+export { defaultAvatar, defaultUserBanner, noOncallImage };
diff --git a/im/src/components/chat/TalkCodeBlock.vue b/im/src/components/chat/TalkCodeBlock.vue
index 3bbfc9f5..44b73b44 100644
--- a/im/src/components/chat/TalkCodeBlock.vue
+++ b/im/src/components/chat/TalkCodeBlock.vue
@@ -5,11 +5,11 @@
diff --git a/im/src/components/chat/TalkSearchRecord.vue b/im/src/components/chat/TalkSearchRecord.vue
index 0f4764af..27197b21 100644
--- a/im/src/components/chat/TalkSearchRecord.vue
+++ b/im/src/components/chat/TalkSearchRecord.vue
@@ -13,7 +13,7 @@
:class="fullscreen ? 'icon-tuichuquanping' : 'icon-quanping'"
@click="fullscreen = !fullscreen"
/>
-
+
@@ -24,7 +24,7 @@
@click="triggerBroadside"
/>
-
+
-
+
加载数据中...
-
+
加载更多...
diff --git a/im/src/components/chat/messaege/AudioMessage.vue b/im/src/components/chat/messaege/AudioMessage.vue
index 04153ad9..26527129 100644
--- a/im/src/components/chat/messaege/AudioMessage.vue
+++ b/im/src/components/chat/messaege/AudioMessage.vue
@@ -2,9 +2,9 @@
-
-
-
+
+
+
合并转发
diff --git a/im/src/components/chat/panel/TalkPanel.vue b/im/src/components/chat/panel/TalkPanel.vue
index c44f409d..f0328d34 100644
--- a/im/src/components/chat/panel/TalkPanel.vue
+++ b/im/src/components/chat/panel/TalkPanel.vue
@@ -9,10 +9,10 @@
- 正在加载数据中...
+ 正在加载数据中...
- 查看更多消息...
+ 查看更多消息...
没有更多消息了...
@@ -39,8 +39,7 @@
'checkbox-border': multiSelect.isOpen === true,
}">
diff --git a/im/src/components/global/Empty.vue b/im/src/components/global/Empty.vue
index a4cb33a6..5cd5ba4d 100644
--- a/im/src/components/global/Empty.vue
+++ b/im/src/components/global/Empty.vue
@@ -8,6 +8,8 @@
diff --git a/im/src/components/layout/AbsModule.vue b/im/src/components/layout/AbsModule.vue
index 7768db15..e74552b8 100644
--- a/im/src/components/layout/AbsModule.vue
+++ b/im/src/components/layout/AbsModule.vue
@@ -2,7 +2,7 @@
-
+
diff --git a/im/src/components/layout/AvatarCropper.vue b/im/src/components/layout/AvatarCropper.vue
index 0f9883f4..98e111c0 100644
--- a/im/src/components/layout/AvatarCropper.vue
+++ b/im/src/components/layout/AvatarCropper.vue
@@ -4,7 +4,7 @@
@@ -45,28 +45,28 @@
上传图片
刷新
左转
右转
diff --git a/im/src/components/layout/RewardModule.vue b/im/src/components/layout/RewardModule.vue
index 6fdff64d..0e2b6ba5 100644
--- a/im/src/components/layout/RewardModule.vue
+++ b/im/src/components/layout/RewardModule.vue
@@ -3,7 +3,7 @@
Donate
-
+
diff --git a/im/src/components/notify/FriendApplyNotify.vue b/im/src/components/notify/FriendApplyNotify.vue
index db61840e..300e7f8e 100644
--- a/im/src/components/notify/FriendApplyNotify.vue
+++ b/im/src/components/notify/FriendApplyNotify.vue
@@ -2,7 +2,7 @@