fix:修复板块权限

This commit is contained in:
Xwen
2023-12-21 23:37:42 +08:00
parent 024ced4b3e
commit 732cd3798b
4 changed files with 20 additions and 16 deletions

View File

@@ -106,6 +106,7 @@ import { ref, reactive, watch, computed } from "vue";
import { useRoute, useRouter } from "vue-router";
import BottomInfo from "@/components/BottomInfo.vue";
import useUserStore from "@/stores/user";
import { getPermission } from "@/utils/auth";
//数据定义
const route = useRoute();
@@ -159,10 +160,9 @@ const loadDiscussList = async () => {
};
//进入添加主题页面
const { isHasPermission } = getPermission("bbs:discuss:add");
const isEditArticle = computed(
() =>
useUserStore().hasPermissions &&
!(route.params.isPublish === "false" ? false : true)
() => isHasPermission && !(route.params.isPublish === "false" ? false : true)
);
const enterEditArticle = () => {
if (isEditArticle.value) {