review:【antd/ele】代码迁移的 review

This commit is contained in:
YunaiV
2025-11-26 19:17:55 +08:00
parent d5e2afdb55
commit 4af433e4d7
4 changed files with 30 additions and 19 deletions

View File

@@ -12,11 +12,16 @@ import {
import MsgEvent from './msg-event.vue';
defineOptions({ name: 'Msg' });
defineOptions({ name: 'WxMsg' });
defineProps<{
item: any;
}>();
withDefaults(
defineProps<{
item?: any;
}>(),
{
item: {},
},
);
</script>
<template>

View File

@@ -7,6 +7,7 @@ import { Typography } from 'ant-design-vue';
/** 微信消息 - 音乐 */
defineOptions({ name: 'WxMusic' });
const props = withDefaults(defineProps<WxMusicProps>(), {
title: '',
description: '',
@@ -15,8 +16,6 @@ const props = withDefaults(defineProps<WxMusicProps>(), {
thumbMediaUrl: '',
});
const { Link } = Typography;
const href = computed(() => props.hqMusicUrl || props.musicUrl);
defineExpose({
@@ -26,7 +25,11 @@ defineExpose({
<template>
<div>
<Link :href="href" target="_blank" class="text-success no-underline">
<Typography.Link
:href="href"
target="_blank"
class="text-success no-underline"
>
<div
class="flex items-center rounded-[5px] border border-[#e8e8e8] bg-white p-2.5 transition hover:border-black/10 hover:shadow-sm"
>
@@ -48,6 +51,6 @@ defineExpose({
</div>
</div>
</div>
</Link>
</Typography.Link>
</div>
</template>