refactor(chat): 优化聊天消息编辑组件代码结构

- 移除不必要的代码注释和冗余逻辑
- 简化表单验证函数参数传递
- 删除重复的类型定义和无用变量
- 统一事件处理函数命名风格
- 清理未使用的插件引用和样式文件
- 优化条件判断语句提高可读性
This commit is contained in:
2025-11-21 14:40:55 +08:00
parent e5e54b6aa6
commit b23788f428
2 changed files with 1486 additions and 1208 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -92,8 +92,6 @@
// 中文语言文件
import zh_Hans from 'bytemd/locales/zh_Hans.json';
import 'bytemd/dist/index.min.css';
import highlight from '@bytemd/plugin-highlight-ssr';
import 'highlight.js/styles/default.css';
import { ShopMerchantAccount } from '@/api/shop/shopMerchantAccount/model';
import { User } from '@/api/system/user/model';
@@ -173,7 +171,7 @@
type: 'string',
message: '请填写消息内容',
trigger: 'blur',
validator: async (_rule: RuleObject, value: string) => {
validator: async (_rule: RuleObject, _: string) => {
if (content.value == '') {
return Promise.reject('请填写消息内容');
}
@@ -187,8 +185,7 @@
const plugins = ref([
gfm({
locale: zh_HansGfm
}),
highlight()
})
]);
const onToUser = (item: User) => {
@@ -199,7 +196,7 @@
// form.toUserName = item.nickname;
};
const chooseType = (item: any) => {
const chooseType = (_: any) => {
form.type = 'text';
};