thainv-dev: fix ui
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user