Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-editor
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
劳工
zeroing-editor
Commits
e667fb72
Commit
e667fb72
authored
Nov 23, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发布自动保存
parent
c81bbbaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
30 deletions
+34
-30
Editor.vue
src/views/Editor.vue
+34
-30
No files found.
src/views/Editor.vue
View file @
e667fb72
...
@@ -155,36 +155,7 @@
...
@@ -155,36 +155,7 @@
this
.
$refs
.
dialogsDialog
.
show
();
this
.
$refs
.
dialogsDialog
.
show
();
break
;
break
;
case
'pack'
:
case
'pack'
:
const
loading
=
this
.
$loading
({
await
this
.
pack
();
lock
:
true
,
text
:
this
.
$t
(
'Packing'
),
});
try
{
const
{
tplUrl
}
=
await
this
.
packProject
();
this
.
$message
({
message
:
this
.
$t
(
'Pack project successfully'
),
type
:
'success'
,
duration
:
1000
,
});
this
.
$confirm
(
this
.
$t
(
'Pack project successfully'
),
this
.
$t
(
'Alert'
),
{
confirmButtonText
:
this
.
$t
(
'Open in new tab'
),
cancelButtonText
:
this
.
$t
(
'Close'
),
type
:
'warning'
}).
then
(()
=>
{
setTimeout
(()
=>
{
window
.
open
(
tplUrl
,
'blank'
);
},
500
);
}).
catch
(()
=>
{
});
}
catch
(
e
)
{
this
.
$message
({
message
:
this
.
$t
(
'Pack project failed'
),
type
:
'error'
,
duration
:
1000
,
});
}
loading
.
close
();
break
;
break
;
case
'undo'
:
case
'undo'
:
this
.
$store
.
commit
(
'undoRedo'
,
1
);
this
.
$store
.
commit
(
'undoRedo'
,
1
);
...
@@ -214,6 +185,39 @@
...
@@ -214,6 +185,39 @@
break
;
break
;
}
}
},
},
async
pack
(){
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
this
.
$t
(
'Packing'
),
});
try
{
await
this
.
saveProject
();
const
{
tplUrl
}
=
await
this
.
packProject
();
this
.
$message
({
message
:
this
.
$t
(
'Pack project successfully'
),
type
:
'success'
,
duration
:
1000
,
});
this
.
$confirm
(
this
.
$t
(
'Pack project successfully'
),
this
.
$t
(
'Alert'
),
{
confirmButtonText
:
this
.
$t
(
'Open in new tab'
),
cancelButtonText
:
this
.
$t
(
'Close'
),
type
:
'warning'
}).
then
(()
=>
{
setTimeout
(()
=>
{
window
.
open
(
tplUrl
,
'blank'
);
},
500
);
}).
catch
(()
=>
{
});
}
catch
(
e
)
{
this
.
$message
({
message
:
this
.
$t
(
'Pack project failed'
),
type
:
'error'
,
duration
:
1000
,
});
}
loading
.
close
();
},
backToHome
()
{
backToHome
()
{
this
.
$router
.
replace
({
name
:
'home'
});
this
.
$router
.
replace
({
name
:
'home'
});
},
},
...
...
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