Skip to content

Commit

Permalink
💄 调整链接组件样式
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMuli committed May 21, 2024
1 parent 3ba6584 commit 0c4a688
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/components/post/tp-text.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<template>
<div
<span
v-if="mode == 'link'"
class="tp-text-link"
@click="toLink()"
:title="props.data.attributes?.link"
:style="getTextStyle()"
>
<v-icon size="small" v-if="!props.data.insert.startsWith('>>')">mdi-link-variant</v-icon>
<span>{{ props.data.insert }}</span>
</div>
{{ props.data.insert }}
</span>
<span v-else-if="mode == 'emoji'" class="tp-text-emoji">
<img :src="getEmojiUrl()" :alt="getEmojiName()" :title="getEmojiName()" />
</span>
Expand All @@ -18,9 +17,7 @@
:data="emoji"
:key="indexE"
/>
<span v-else :style="getTextStyle()">
{{ props.data.insert }}
</span>
<span v-else :style="getTextStyle()">{{ props.data.insert }}</span>
</template>
<script lang="ts" setup>
import { onMounted, ref, StyleValue, toRaw } from "vue";
Expand Down Expand Up @@ -157,11 +154,10 @@ function getEmojiName() {
</script>
<style lang="css" scoped>
.tp-text-link {
display: inline-flex;
align-items: center;
justify-content: center;
color: #00c3ff;
cursor: pointer;
text-decoration: underline solid #00c3ff;
text-underline-position: under;
transform: translateY(2px);
}
Expand Down

0 comments on commit 0c4a688

Please sign in to comment.