页面button颜色统一,表格不可选择页面数量

This commit is contained in:
zhangyc
2022-12-11 11:46:52 +08:00
parent 6fc160ae79
commit 65fbc3eba4
84 changed files with 1642 additions and 2633 deletions

View File

@@ -41,6 +41,7 @@ import { reactive, toRefs } from "vue";
import { useStore } from "vuex";
import { useRouter } from "vue-router";
import draggable from "vuedraggable";
import { message } from "ant-design-vue";
export default {
name: "OpenPages",
components: {
@@ -55,13 +56,18 @@ export default {
const closePage = (value) => {
console.log("点击关闭页面", value, state.openList);
state.openList.map((item, key) => {
if (item.href === value.href) {
if (state.openList.length === 1) {
if (state.openList[0].href !== "/learningpath") {
state.openList.splice(key, 1);
$router.push({ path: "/learningpath" });
}else{
message.destroy();
return message.warning("至少保留一个页面");
}
$router.push({ path: "/learningpath" });
} else {
if (value.active) {
if (key === state.openList.length - 1) {