perf: use x icon instead of text

This commit is contained in:
Lykin 2024-02-21 10:17:48 +08:00
parent 30835ac469
commit 1c4462b161
2 changed files with 21 additions and 3 deletions

View File

@ -0,0 +1,18 @@
<script setup>
const props = defineProps({
strokeWidth: {
type: [Number, String],
default: 3,
},
})
</script>
<template>
<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path
:stroke-width="props.strokeWidth"
d="M8 2H1L9.26086 13.0145L1.44995 21.9999H4.09998L10.4883 14.651L16 22H23L14.3917 10.5223L21.8001 2H19.1501L13.1643 8.88578L8 2ZM17 20L5 4H7L19 20H17Z"></path>
</svg>
</template>
<style lang="scss" scoped></style>

View File

@ -16,6 +16,7 @@ import useBrowserStore from 'stores/browser.js'
import { useRender } from '@/utils/render.js' import { useRender } from '@/utils/render.js'
import wechatUrl from '@/assets/images/wechat_official.png' import wechatUrl from '@/assets/images/wechat_official.png'
import QRCode from '@/components/icons/QRCode.vue' import QRCode from '@/components/icons/QRCode.vue'
import Twitter from '@/components/icons/Twitter.vue'
const themeVars = useThemeVars() const themeVars = useThemeVars()
const render = useRender() const render = useRender()
@ -173,13 +174,12 @@ const exThemeVars = computed(() => {
@click="openWechatOfficial" /> @click="openWechatOfficial" />
<icon-button <icon-button
v-else v-else
:icon="Twitter"
:border="false" :border="false"
:size="iconSize" :size="iconSize"
class="nav-menu-button" class="nav-menu-button"
t-tooltip="ribbon.follow_x" t-tooltip="ribbon.follow_x"
@click="openX"> @click="openX" />
<span style="font-weight: bold; font-size: 24px">𝕏</span>
</icon-button>
<icon-button <icon-button
:icon="Github" :icon="Github"
:size="iconSize" :size="iconSize"