admin-vben/apps/web-ele/src/views/mp/components/wx-music/wx-music.vue

69 lines
1.4 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<script lang="ts" setup>
/** 微信消息 - 音乐 */
defineOptions({ name: 'Music' });
const props = defineProps({
title: {
required: false,
type: String,
default: '',
},
description: {
required: false,
type: String,
default: '',
},
musicUrl: {
required: false,
type: String,
default: '',
},
hqMusicUrl: {
required: false,
type: String,
default: '',
},
thumbMediaUrl: {
required: true,
type: String,
},
});
defineExpose({
musicUrl: props.musicUrl,
});
</script>
<template>
<div>
<!-- TODO @hwElLink -->
<el-link
type="success"
:underline="false"
target="_blank"
:href="hqMusicUrl ? hqMusicUrl : musicUrl"
>
<div class="mp-card__body bg-background rounded-sm p-2.5">
<div class="mp-card__avatar">
<img :src="thumbMediaUrl" alt="" />
</div>
<div class="mp-card__detail">
<div class="mp-card__title" style="margin-bottom: unset">
{{ title }}
</div>
<div class="mp-card__info" style="height: unset">
{{ description }}
</div>
</div>
</div>
</el-link>
</div>
</template>
<style lang="scss" scoped>
/** TODO @dylan@hw看看有没适合 tindwind 的哈。 */
/* 因为 joolun 实现依赖 avue 组件,该页面使用了 card.scss */
@import url('../wx-msg/card.scss');
</style>