แก้ coppy link step9

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-01-09 15:22:30 +07:00
parent cb05d3275e
commit 276ff56e38

View file

@ -1,6 +1,7 @@
<script setup lang="ts">
import { ref } from "vue";
import { useQuasar } from "quasar";
import { useRoute } from "vue-router";
import env from "@/api";
/** importStore*/
@ -11,6 +12,9 @@ import { useCounterMixin } from "@/stores/mixin";
const mixin = useCounterMixin();
const stroe = useEvaluateStore();
const $q = useQuasar();
const route = useRoute();
const evaluateId = ref<string>(route.params.id.toString());
const { success } = mixin;
@ -18,7 +22,7 @@ const link = ref<string>(env.LINK_EVALUATE_PUBLISH);
/** function คัดลอกชื้่อลิงก์*/
function copyLink() {
const linkById = `${link.value}/${stroe.evaluateId}`;
const linkById = `${link.value}/${evaluateId.value}`;
navigator.clipboard.writeText(linkById);
success($q, "คัดลอกสำเร็จ");
}