Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e29352d0
authored
Aug 04, 2024
by
Li Kui
Committed by
GitHub
Aug 04, 2024
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: missing await for an async function call (#4035)
1 parent
7994d664
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
packages/effects/hooks/src/use-refresh.ts
packages/effects/hooks/src/use-tabs.ts
packages/effects/hooks/src/use-watermark.ts
packages/stores/src/modules/tabbar.ts
packages/effects/hooks/src/use-refresh.ts
View file @
e29352d
...
@@ -6,8 +6,8 @@ export function useRefresh() {
...
@@ -6,8 +6,8 @@ export function useRefresh() {
const
router
=
useRouter
();
const
router
=
useRouter
();
const
tabbarStore
=
useTabbarStore
();
const
tabbarStore
=
useTabbarStore
();
function
refresh
()
{
async
function
refresh
()
{
tabbarStore
.
refresh
(
router
);
await
tabbarStore
.
refresh
(
router
);
}
}
return
{
return
{
...
...
packages/effects/hooks/src/use-tabs.ts
View file @
e29352d
...
@@ -44,7 +44,7 @@ export function useTabs() {
...
@@ -44,7 +44,7 @@ export function useTabs() {
}
}
async
function
openTabInNewWindow
(
tab
?:
RouteLocationNormalized
)
{
async
function
openTabInNewWindow
(
tab
?:
RouteLocationNormalized
)
{
tabbarStore
.
openTabInNewWindow
(
tab
||
route
);
await
tabbarStore
.
openTabInNewWindow
(
tab
||
route
);
}
}
async
function
closeTabByKey
(
key
:
string
)
{
async
function
closeTabByKey
(
key
:
string
)
{
...
...
packages/effects/hooks/src/use-watermark.ts
View file @
e29352d
...
@@ -48,18 +48,18 @@ export function useWatermark() {
...
@@ -48,18 +48,18 @@ export function useWatermark() {
};
};
watermark
.
value
=
new
Watermark
(
cachedOptions
.
value
);
watermark
.
value
=
new
Watermark
(
cachedOptions
.
value
);
watermark
.
value
?.
create
();
await
watermark
.
value
?.
create
();
}
}
async
function
updateWatermark
(
options
:
Partial
<
WatermarkOptions
>
)
{
async
function
updateWatermark
(
options
:
Partial
<
WatermarkOptions
>
)
{
if
(
!
watermark
.
value
||
!
watermark
.
value
?.
check
())
{
if
(
watermark
.
value
)
{
await
initWatermark
(
options
);
}
else
{
await
nextTick
();
await
nextTick
();
watermark
.
value
?.
changeOptions
({
await
watermark
.
value
?.
changeOptions
({
...
cachedOptions
.
value
,
...
cachedOptions
.
value
,
...
options
,
...
options
,
});
});
}
else
{
await
initWatermark
(
options
);
}
}
}
}
...
...
packages/stores/src/modules/tabbar.ts
View file @
e29352d
...
@@ -349,7 +349,7 @@ export const useTabbarStore = defineStore('core-tabbar', {
...
@@ -349,7 +349,7 @@ export const useTabbarStore = defineStore('core-tabbar', {
}
}
},
},
async
setUpdateTime
()
{
setUpdateTime
()
{
this
.
updateTime
=
Date
.
now
();
this
.
updateTime
=
Date
.
now
();
},
},
/**
/**
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment