1
0
mirror of https://github.com/TandoorRecipes/recipes.git synced 2026-01-11 09:07:12 -05:00

settings and model dialogs

This commit is contained in:
vabene1111
2024-09-21 12:46:54 +02:00
parent ed4592ae0c
commit 55bd417105
39 changed files with 531 additions and 199 deletions

View File

@@ -0,0 +1,44 @@
<template>
<v-btn ref="copyBtn" :color="color" :size="size" :density="density" @click="clickCopy()">
<v-icon icon="$copy"></v-icon>
<v-tooltip v-model="showToolip" :target="btn" location="top">
<v-icon icon="$copy"></v-icon>
Copied!
</v-tooltip>
</v-btn>
</template>
<script setup lang="ts">
import {useClipboard} from "@vueuse/core";
import {ref, useTemplateRef} from "vue";
const {copy} = useClipboard()
const props = defineProps({
copyValue: {type: String, default: ''},
color: {type: String, default: 'success'},
size: {type: String, default: 'default'},
density: {type: String, default: 'default'},
})
const btn = useTemplateRef('copyBtn')
const showToolip = ref(false)
function clickCopy() {
copy(props.copyValue)
showToolip.value = true
setTimeout(() => {
showToolip.value = false
}, 3000)
}
</script>
<style scoped>
</style>