feat:【antd】【mp】mp 的代码评审(autoReply)
This commit is contained in:
@@ -8,7 +8,7 @@ import { getDictOptions } from '@vben/hooks';
|
||||
|
||||
import { WxReply } from '#/views/mp/components';
|
||||
|
||||
// TODO @芋艿:要不要使用统一枚举?
|
||||
// TODO @hw:要不要使用统一枚举?
|
||||
const RequestMessageTypes = new Set([
|
||||
'image',
|
||||
'link',
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'">
|
||||
|
||||
Reference in New Issue
Block a user