improve question tag and card display

This commit is contained in:
2024-04-01 15:07:09 +08:00
parent 78688bbd77
commit 2a2895802f
5 changed files with 253 additions and 33 deletions

View File

@@ -72,7 +72,7 @@ watch([cardSize.width, cardSize.height], () => {
const setting = computed({
get: () => {
if (accountInfo.value) {
if (accountInfo.value && accountInfo.value.settings) {
return accountInfo.value.settings.questionDisplay
}
return defaultSettings
@@ -161,6 +161,16 @@ onMounted(() => {
<template v-if="useQB.displayQuestion">
<NDivider style="margin: 10px 0 10px 0" />
<NCard size="small" title="当前展示" embedded>
<template #header-extra>
<NFlex>
<NButton @click="useQB.setCurrentQuestion(useQB.displayQuestion)" size="small" secondary type="info">
取消展示
</NButton>
<NButton @click="useQB.read(useQB.displayQuestion, true)" size="small" secondary type="success">
已读
</NButton>
</NFlex>
</template>
<QuestionItem :item="useQB.displayQuestion" />
</NCard>
<NDivider style="margin: 10px 0 10px 0" />