remove emoji

This commit is contained in:
2024-01-25 13:12:05 +08:00
parent 2d51b89237
commit a993bc9b93
5 changed files with 2 additions and 112 deletions

View File

@@ -1,18 +1,9 @@
<script lang="ts" setup>
import { useMessage, type DropdownOption } from "naive-ui"
import { random } from "node-emoji"
import { onMounted, ref } from "vue"
import { useIntervalFn } from "@vueuse/core"
import { code, loading, reset, run } from "../composables/code"
import { tab } from "../composables/tab"
import copyTextToClipboard from "copy-text-to-clipboard"
const emoji = ref("")
function getRandomEmoji() {
emoji.value = random().emoji
}
const message = useMessage()
function switchAndRun() {
tab.value = "output"
@@ -28,14 +19,11 @@ const menu: DropdownOption[] = [
{ label: "复制", key: "copy", props: { onClick: copy } },
{ label: "重置", key: "reset", props: { onClick: reset } },
]
onMounted(getRandomEmoji)
useIntervalFn(getRandomEmoji, 5000, { immediate: true })
</script>
<template>
<n-layout-header class="container" bordered>
<n-flex justify="space-between" align="center">
<div @click="getRandomEmoji" class="title">徐越的自测猫 {{ emoji }}</div>
<div class="title">徐越的自测猫</div>
<n-flex align="center">
<n-dropdown :options="menu">
<n-button>操作</n-button>