แก้ coppy link step9
This commit is contained in:
parent
cb05d3275e
commit
276ff56e38
1 changed files with 5 additions and 1 deletions
|
|
@ -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, "คัดลอกสำเร็จ");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue