feat:【antd】【mp】mp 的代码评审(autoReply)

This commit is contained in:
YunaiV
2025-11-20 21:18:21 +08:00
parent 8d2da0a4d1
commit e2848653f9
6 changed files with 52 additions and 34 deletions

View File

@@ -8,7 +8,7 @@ import { getDictOptions } from '@vben/hooks';
import { WxReply } from '#/views/mp/components';
// TODO @芋艿:要不要使用统一枚举?
// TODO @hw:要不要使用统一枚举?
const RequestMessageTypes = new Set([
'image',
'link',

View File

@@ -5,6 +5,7 @@ import type { MpAutoReplyApi } from '#/api/mp/autoReply';
import { computed, nextTick, ref } from 'vue';
import { confirm, DocAlert, Page, useVbenModal } from '@vben/common-ui';
// TODO @hw直接使用 AutoReplyMsgType不用 as
import { AutoReplyMsgType as MsgType } from '@vben/constants';
import { IconifyIcon } from '@vben/icons';
@@ -51,7 +52,7 @@ function handleAccountChange(accountId: number) {
}
/** 切换回复类型 */
async function onTabChange(tabName: any) {
async function onTabChange(tabName: string) {
msgType.value = tabName;
await nextTick();
// 更新 columns

View File

@@ -26,7 +26,7 @@ const props = defineProps<{
</div>
<div v-else-if="props.row.responseMessageType === 'image'">
<a target="_blank" :href="props.row.responseMediaUrl">
<img :src="props.row.responseMediaUrl" style="width: 100px" />
<img :src="props.row.responseMediaUrl" class="w-[100px]" />
</a>
</div>
<div
@@ -38,7 +38,7 @@ const props = defineProps<{
<WxVideoPlayer
v-if="props.row.responseMediaUrl"
:url="props.row.responseMediaUrl"
style="margin-top: 10px"
class="mt-[10px]"
/>
</div>
<div v-else-if="props.row.responseMessageType === 'news'">