mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 04:16:47 +08:00
页面button颜色统一,表格不可选择页面数量
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user