Commit 888658e0 authored by hucy's avatar hucy

fix:提交

parent 22e164bd
......@@ -61,7 +61,12 @@ const usePageStore = defineStore(PAGE_STORE_KEY, {
}
}
if (params.keepalive) {
this.allPageKeys.splice(index, 1);
const pageKeyIndex = findIndex(this.allPageKeys, function (o) {
return o === params.name;
});
if (pageKeyIndex !== -1) {
this.allPageKeys.splice(pageKeyIndex, 1);
}
}
delArrObj(this.tabRouterList, { path: path });
this.saveToSession();
......@@ -77,6 +82,13 @@ const usePageStore = defineStore(PAGE_STORE_KEY, {
this.tabRouterList = this.tabRouterList.filter((item) => {
return item.path === path;
});
this.activeRouter = this.tabRouterList[0];
this.saveToSession();
},
removeAllPage() {
this.activeRouter = {} as RouterType;
this.allPageKeys = [];
this.tabRouterList = [];
this.saveToSession();
},
saveToSession() {
......
......@@ -15,7 +15,14 @@
</q-btn>
<q-toolbar-title style="min-width: 140px"> Quasar App </q-toolbar-title>
<q-tabs v-model="defaultRouter" no-caps shrink class="my-tabs">
<q-tabs
v-model="defaultRouter"
inline-label
outside-arrows
no-caps
shrink
class="my-tabs"
>
<q-tab
class="my-tab"
v-for="page in tabsList"
......@@ -69,6 +76,26 @@
<TopLeftLoading />
</q-item-label>
<q-expansion-item
expand-separator
icon="perm_identity"
label="菜单"
caption="正在开发..."
>
<q-item clickable active-class="bg-primary-bg-light">
<q-item-section>
<q-item-label>标题</q-item-label>
<q-item-label caption>备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable active-class="bg-primary-bg-light">
<q-item-section>
<q-item-label>标题2</q-item-label>
<q-item-label caption>备注2</q-item-label>
</q-item-section>
</q-item>
</q-expansion-item>
<EssentialLink
v-for="link in essentialLinks"
:key="link.title"
......@@ -93,7 +120,7 @@ import {
computed,
} from 'vue';
import { onBeforeRouteUpdate, useRouter } from 'vue-router';
import { usePageStore, useMessage } from 'src/common/hooks';
import { usePageStore } from 'src/common/hooks';
import EssentialLink from 'components/EssentialLink.vue';
// import TopLeftLoading from './TopLeftLoading.vue';
import TopLeftLoading from './TopLeftText.vue';
......@@ -111,7 +138,6 @@ export default defineComponent({
setup() {
const pageStore = usePageStore();
const router = useRouter();
const { info } = useMessage();
const leftDrawerOpen = ref(false);
const defaultRouter = ref('/page1');
......@@ -273,10 +299,13 @@ export default defineComponent({
const closeNotCurrentPage = (page: any) => {
pageStore.removeNotCurrentPage(page);
getTabsList();
router.push(pageStore.activeRouter.path);
};
const closeAll = () => {
info('正在开发中...');
pageStore.removeAllPage();
router.push('/home');
getTabsList();
};
const doNothing = () => {
......@@ -325,8 +354,6 @@ export default defineComponent({
}
.my-tabs {
padding: 0 36px;
box-sizing: border-box;
:deep(.q-tab--active) {
background-color: $primary-2;
}
......
......@@ -30,7 +30,7 @@ const carouselRef = ref<any>(null);
const slide = ref('100');
onMounted(() => {
// rightClick();
rightClick();
});
function getStyle(data: any) {
......@@ -113,7 +113,7 @@ function onPlaying() {
transition-prev="fade"
transition-next="fade"
:transition-duration="1500"
:autoplay="false"
:autoplay="8000"
animated
infinite
height="100%"
......
......@@ -2,6 +2,11 @@
* 动画
* https://www.youtube.com/@OnlineTutorialsYT/playlists
-->
<script lang="ts">
export default {
name: 'PAGE8',
};
</script>
<script setup lang="ts">
// import { ref } from 'vue';
import LoadingCircle from './element/LoadingCircle.vue';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment