Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
V
vue3-quasar-ts-study01
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hucy
vue3-quasar-ts-study01
Commits
888658e0
Commit
888658e0
authored
Jan 06, 2023
by
hucy
☘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:提交
parent
22e164bd
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
9 deletions
+53
-9
use-pagestore.ts
src/common/hooks/use-pagestore.ts
+13
-1
MainLayout.vue
src/layouts/MainLayout.vue
+33
-6
MyPoems.vue
src/modules/page10/element/MyPoems.vue
+2
-2
IndexPage.vue
src/modules/page8/IndexPage.vue
+5
-0
No files found.
src/common/hooks/use-pagestore.ts
View file @
888658e0
...
@@ -61,7 +61,12 @@ const usePageStore = defineStore(PAGE_STORE_KEY, {
...
@@ -61,7 +61,12 @@ const usePageStore = defineStore(PAGE_STORE_KEY, {
}
}
}
}
if
(
params
.
keepalive
)
{
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
});
delArrObj
(
this
.
tabRouterList
,
{
path
:
path
});
this
.
saveToSession
();
this
.
saveToSession
();
...
@@ -77,6 +82,13 @@ const usePageStore = defineStore(PAGE_STORE_KEY, {
...
@@ -77,6 +82,13 @@ const usePageStore = defineStore(PAGE_STORE_KEY, {
this
.
tabRouterList
=
this
.
tabRouterList
.
filter
((
item
)
=>
{
this
.
tabRouterList
=
this
.
tabRouterList
.
filter
((
item
)
=>
{
return
item
.
path
===
path
;
return
item
.
path
===
path
;
});
});
this
.
activeRouter
=
this
.
tabRouterList
[
0
];
this
.
saveToSession
();
},
removeAllPage
()
{
this
.
activeRouter
=
{}
as
RouterType
;
this
.
allPageKeys
=
[];
this
.
tabRouterList
=
[];
this
.
saveToSession
();
this
.
saveToSession
();
},
},
saveToSession
()
{
saveToSession
()
{
...
...
src/layouts/MainLayout.vue
View file @
888658e0
...
@@ -15,7 +15,14 @@
...
@@ -15,7 +15,14 @@
</q-btn>
</q-btn>
<q-toolbar-title
style=
"min-width: 140px"
>
Quasar App
</q-toolbar-title>
<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
<q-tab
class=
"my-tab"
class=
"my-tab"
v-for=
"page in tabsList"
v-for=
"page in tabsList"
...
@@ -69,6 +76,26 @@
...
@@ -69,6 +76,26 @@
<TopLeftLoading
/>
<TopLeftLoading
/>
</q-item-label>
</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
<EssentialLink
v-for=
"link in essentialLinks"
v-for=
"link in essentialLinks"
:key=
"link.title"
:key=
"link.title"
...
@@ -93,7 +120,7 @@ import {
...
@@ -93,7 +120,7 @@ import {
computed
,
computed
,
}
from
'vue'
;
}
from
'vue'
;
import
{
onBeforeRouteUpdate
,
useRouter
}
from
'vue-router'
;
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
EssentialLink
from
'components/EssentialLink.vue'
;
// import TopLeftLoading from './TopLeftLoading.vue';
// import TopLeftLoading from './TopLeftLoading.vue';
import
TopLeftLoading
from
'./TopLeftText.vue'
;
import
TopLeftLoading
from
'./TopLeftText.vue'
;
...
@@ -111,7 +138,6 @@ export default defineComponent({
...
@@ -111,7 +138,6 @@ export default defineComponent({
setup
()
{
setup
()
{
const
pageStore
=
usePageStore
();
const
pageStore
=
usePageStore
();
const
router
=
useRouter
();
const
router
=
useRouter
();
const
{
info
}
=
useMessage
();
const
leftDrawerOpen
=
ref
(
false
);
const
leftDrawerOpen
=
ref
(
false
);
const
defaultRouter
=
ref
(
'/page1'
);
const
defaultRouter
=
ref
(
'/page1'
);
...
@@ -273,10 +299,13 @@ export default defineComponent({
...
@@ -273,10 +299,13 @@ export default defineComponent({
const
closeNotCurrentPage
=
(
page
:
any
)
=>
{
const
closeNotCurrentPage
=
(
page
:
any
)
=>
{
pageStore
.
removeNotCurrentPage
(
page
);
pageStore
.
removeNotCurrentPage
(
page
);
getTabsList
();
getTabsList
();
router
.
push
(
pageStore
.
activeRouter
.
path
);
};
};
const
closeAll
=
()
=>
{
const
closeAll
=
()
=>
{
info
(
'正在开发中...'
);
pageStore
.
removeAllPage
();
router
.
push
(
'/home'
);
getTabsList
();
};
};
const
doNothing
=
()
=>
{
const
doNothing
=
()
=>
{
...
@@ -325,8 +354,6 @@ export default defineComponent({
...
@@ -325,8 +354,6 @@ export default defineComponent({
}
}
.my-tabs
{
.my-tabs
{
padding
:
0
36px
;
box-sizing
:
border-box
;
:deep
(
.q-tab--active
)
{
:deep
(
.q-tab--active
)
{
background-color
:
$primary-2
;
background-color
:
$primary-2
;
}
}
...
...
src/modules/page10/element/MyPoems.vue
View file @
888658e0
...
@@ -30,7 +30,7 @@ const carouselRef = ref<any>(null);
...
@@ -30,7 +30,7 @@ const carouselRef = ref<any>(null);
const
slide
=
ref
(
'100'
);
const
slide
=
ref
(
'100'
);
onMounted
(()
=>
{
onMounted
(()
=>
{
//
rightClick();
rightClick
();
});
});
function
getStyle
(
data
:
any
)
{
function
getStyle
(
data
:
any
)
{
...
@@ -113,7 +113,7 @@ function onPlaying() {
...
@@ -113,7 +113,7 @@ function onPlaying() {
transition-prev=
"fade"
transition-prev=
"fade"
transition-next=
"fade"
transition-next=
"fade"
:transition-duration=
"1500"
:transition-duration=
"1500"
:autoplay=
"
false
"
:autoplay=
"
8000
"
animated
animated
infinite
infinite
height=
"100%"
height=
"100%"
...
...
src/modules/page8/IndexPage.vue
View file @
888658e0
...
@@ -2,6 +2,11 @@
...
@@ -2,6 +2,11 @@
* 动画
* 动画
* https://www.youtube.com/@OnlineTutorialsYT/playlists
* https://www.youtube.com/@OnlineTutorialsYT/playlists
-->
-->
<
script
lang=
"ts"
>
export
default
{
name
:
'PAGE8'
,
};
</
script
>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
// import { ref } from 'vue';
// import { ref } from 'vue';
import
LoadingCircle
from
'./element/LoadingCircle.vue'
;
import
LoadingCircle
from
'./element/LoadingCircle.vue'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment