thainv-dev: fix ui

This commit is contained in:
nguyen van thai
2024-06-03 21:53:23 +07:00
parent d95d648687
commit 58b5c67d0c
7 changed files with 87 additions and 40 deletions
@@ -3,6 +3,17 @@ const isBookmark = ref(false)
const onClickBookmark = () => {
isBookmark.value = !isBookmark.value
}
async function copyLink() {
try {
const url = window.location.href
await navigator.clipboard.writeText(url)
alert('copy link thành công')
} catch (error) {
alert(error)
}
}
</script>
<template>
<div class="py-5 flex flex-wrap justify-between items-center">
@@ -17,7 +28,7 @@ const onClickBookmark = () => {
</div>
<div class="flex gap-4 items-center">
<button title="Copy link" class="w-12 h-3rem rounded-full flex items-center justify-center bg-white border-1px shadow hover:bg-primary-100 hover:text-primary-600 cursor-pointer text-2xl">
<button @click="copyLink()" title="Copy link" class="w-12 h-3rem rounded-full flex items-center justify-center bg-white border-1px shadow hover:bg-primary-100 hover:text-primary-600 cursor-pointer text-2xl">
<Icon name="bi:link-45deg" />
</button>
</div>