Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
traceSourceMb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yanyanhong
traceSourceMb
Commits
6380a42d
Commit
6380a42d
authored
Dec 28, 2020
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复首页删除文件夹后,页面没有刷新的bug
parent
954c5f02
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
Index.ts
src/mixins/Index.ts
+3
-2
Index-sy.vue
src/views/index/Index-sy.vue
+9
-4
No files found.
src/mixins/Index.ts
View file @
6380a42d
...
@@ -26,15 +26,16 @@ export default class Index extends Vue {
...
@@ -26,15 +26,16 @@ export default class Index extends Vue {
const
{
folder_name
}
=
folder
;
const
{
folder_name
}
=
folder
;
return
true
;
return
true
;
}
}
private
delFolder
(
folder
:
any
)
{
private
delFolder
(
folder
:
any
,
refresh
:
()
=>
void
)
{
const
{
folder_id
}
=
folder
;
const
{
folder_id
}
=
folder
;
return
new
Promise
((
resolve
:
any
)
=>
{
return
new
Promise
((
resolve
:
any
)
=>
{
this
.
$dialog
.
confirm
({
this
.
$dialog
.
confirm
({
message
:
'您确定要删除该文件夹吗?'
,
message
:
'您确定要删除该文件夹吗?'
,
beforeClose
:
(
action
,
done
)
=>
{
beforeClose
:
(
action
,
done
)
=>
{
if
(
action
===
'confirm'
)
{
if
(
action
===
'confirm'
)
{
this
.
$api
.
template
.
delete
(
folder_id
).
then
((
res
:
any
)
=>
{
this
.
$api
.
template
.
delete
(
folder_id
).
then
(
async
(
res
:
any
)
=>
{
resolve
();
resolve
();
await
refresh
();
this
.
$toast
.
success
(
'删除成功'
);
this
.
$toast
.
success
(
'删除成功'
);
done
();
done
();
}).
catch
((
err
:
any
)
=>
{
}).
catch
((
err
:
any
)
=>
{
...
...
src/views/index/Index-sy.vue
View file @
6380a42d
...
@@ -193,15 +193,20 @@ export default class IndexSy extends Mixins(IndexMixin) {
...
@@ -193,15 +193,20 @@ export default class IndexSy extends Mixins(IndexMixin) {
return
[
rename
,
del
];
return
[
rename
,
del
];
}
}
private
async
callbackAction
(
cb
:
any
)
{
private
async
callbackAction
(
cb
:
any
)
{
this
.
isShowRename
=
await
cb
.
call
(
this
,
this
.
currentFolder
);
this
.
isShowRename
=
await
cb
.
call
(
this
,
this
.
currentFolder
,
this
.
refreshPage
);
}
}
private
async
onConfirm
()
{
const
params
=
this
.
currentFolder
;
private
async
refreshPage
(){
await
this
.
$api
.
template
.
updateFolder
(
params
);
this
.
setPage
(
1
);
this
.
setPage
(
1
);
await
this
.
getUserFolders
({
await
this
.
getUserFolders
({
page
:
this
.
page
page
:
this
.
page
});
});
}
private
async
onConfirm
()
{
const
params
=
this
.
currentFolder
;
await
this
.
$api
.
template
.
updateFolder
(
params
);
await
this
.
refreshPage
();
Toast
.
success
({
Toast
.
success
({
message
:
"重命名成功"
message
:
"重命名成功"
})
})
...
...
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