diff --git a/src/views/Answer/components/PreviewLayout.vue b/src/views/Answer/components/PreviewLayout.vue index 3cc70546..62e284fe 100644 --- a/src/views/Answer/components/PreviewLayout.vue +++ b/src/views/Answer/components/PreviewLayout.vue @@ -28,7 +28,12 @@ --> - + @@ -147,8 +152,8 @@ export default defineComponent({ // 获取问卷 const sn = proxy.$route.query.sn; const commentVisible = ref(false); - const linkAddress = ref(window.location.href) - const isLogin = computed(() => window.localStorage.getItem('plantToken')) + const linkAddress = ref(window.location.href); + const isLogin = computed(() => window.localStorage.getItem("plantToken")); // ref(window.localStorage.getItem('token')) // plantToken @@ -211,11 +216,11 @@ export default defineComponent({ issueLoading.value = false; } function handleDownload() { - if(!isLogin.value) { + if (!isLogin.value) { proxy.$router.push({ name: "login", }); - return + return; } downloadVisible.value = true; } @@ -231,12 +236,11 @@ export default defineComponent({ commentInfo.value = data; } function handleComment() { - - if(!isLogin.value) { + if (!isLogin.value) { proxy.$router.push({ name: "login", }); - return + return; } store.commit("comment/ToggleCommentDrawer", true); openModal({ @@ -252,8 +256,8 @@ export default defineComponent({ } function handleCopy() { - useCopy(linkAddress.value) - message.success('复制成功') + useCopy(linkAddress.value); + message.success("复制成功"); } onBeforeMount(() => { getQuetions(); @@ -278,7 +282,7 @@ export default defineComponent({ handleComment, linkAddress, handleCopy, - isLogin + isLogin, }; }, }); @@ -318,7 +322,8 @@ export default defineComponent({ .action-container { display: flex; align-items: center; - .comment, .download { + .comment, + .download { display: flex; align-items: center; color: #434343;