diff --git a/src/utils/getDefaultEnv.ts b/src/utils/getDefaultEnv.ts index e880d228..b4c500d8 100644 --- a/src/utils/getDefaultEnv.ts +++ b/src/utils/getDefaultEnv.ts @@ -3,7 +3,7 @@ */ // 读取本地存储中的语言配置 -const localStorageString = localStorage.getItem('KUNGalgame-settings') +const localStorageString = localStorage.getItem('KUNGalgameSettings') // 这里是为了兼容各种浏览器,某些浏览器的 navigator.language 值为 'zh-CN',会导致报错 const getInitLanguage = () => { diff --git a/src/views/topic/components/footer/Dislike.vue b/src/views/topic/components/footer/Dislike.vue index 36802c69..92b6a49c 100644 --- a/src/views/topic/components/footer/Dislike.vue +++ b/src/views/topic/components/footer/Dislike.vue @@ -1,6 +1,6 @@ diff --git a/src/views/topic/components/footer/Footer.vue b/src/views/topic/components/footer/Footer.vue index 10913c7d..061340cc 100644 --- a/src/views/topic/components/footer/Footer.vue +++ b/src/views/topic/components/footer/Footer.vue @@ -15,6 +15,7 @@ import { useKUNGalgameTopicStore } from '@/store/modules/topic' // 导入用户的 store import { useKUNGalgameUserStore } from '@/store/modules/kungalgamer' import { storeToRefs } from 'pinia' +import { computed } from 'vue' // 使用话题页面的 store const { isEdit, replyDraft } = storeToRefs(useKUNGalgameTopicStore()) @@ -38,6 +39,10 @@ const props = defineProps<{ toUid: number }>() +const info = computed(() => props.info) +const content = computed(() => props.content) +const toUid = computed(() => props.toUid) + /** * 这里只是简单起见,不显示重新编辑 * 实际上如果用户自己修改了 localStorage 中保存的信息,这个验证就失效了 @@ -45,15 +50,13 @@ const props = defineProps<{ */ // 当前登录用户的 uid const currUserUid = useKUNGalgameUserStore().uid -// 话题 / 回复发布者的 uid -const masterUid = props.toUid // 点击回复打开回复面板 -const handleClickReply = async () => { +const handleClickReply = () => { // 保存必要信息,以便发表回复 - replyDraft.value.tid = props.info.tid + replyDraft.value.tid = info.value.tid // 被回复人就是发表人的 uid - replyDraft.value.to_uid = masterUid + replyDraft.value.to_uid = toUid.value // 楼主的 floor 就是 0 replyDraft.value.to_floor = 0 // 打开回复面板 @@ -70,14 +73,14 @@ const handleClickReply = async () => { -
  • +
  • {{ info.views }}
  • @@ -85,19 +88,19 @@ const handleClickReply = async () => { @@ -116,14 +119,14 @@ const handleClickReply = async () => { diff --git a/src/views/topic/components/footer/Like.vue b/src/views/topic/components/footer/Like.vue index 9521d4b3..b0f270fc 100644 --- a/src/views/topic/components/footer/Like.vue +++ b/src/views/topic/components/footer/Like.vue @@ -1,6 +1,6 @@ diff --git a/src/views/topic/components/footer/Rewrite.vue b/src/views/topic/components/footer/Rewrite.vue index f046a6e2..73a46e8d 100644 --- a/src/views/topic/components/footer/Rewrite.vue +++ b/src/views/topic/components/footer/Rewrite.vue @@ -1,5 +1,6 @@ @@ -141,6 +143,6 @@ li { /* 激活后的样式 */ .active { - color: var(--kungalgame-blue-4); + color: var(--kungalgame-blue-4) !important; } diff --git a/src/views/topic/components/reply/Reply.vue b/src/views/topic/components/reply/Reply.vue index d6df9787..022c1df3 100644 --- a/src/views/topic/components/reply/Reply.vue +++ b/src/views/topic/components/reply/Reply.vue @@ -4,8 +4,10 @@ 这个区域包含所有人回复给楼主的话题,其中每个人的话题将会被拆分成为单独的组件 -->