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
31be7da1
Commit
31be7da1
authored
Nov 23, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拷贝模板到粘贴板
parent
e667fb72
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
3 deletions
+69
-3
en.json
src/locales/en.json
+1
-0
zh-CN.json
src/locales/zh-CN.json
+1
-0
Editor.vue
src/views/Editor.vue
+7
-3
PackResultDialog.vue
src/views/Editor/dialogs/PackResultDialog.vue
+60
-0
No files found.
src/locales/en.json
View file @
31be7da1
...
...
@@ -72,6 +72,7 @@
"Meta Editor"
:
"Meta Editor"
,
"Env editor"
:
"Env editor"
,
"As inline"
:
"As inline"
,
"Copy template to clipboard"
:
"Copy template to clipboard"
,
"Link to parent"
:
"Link to parent"
,
"Input project name"
:
"Input project name"
,
"Invalid project name"
:
"Invalid project name"
,
...
...
src/locales/zh-CN.json
View file @
31be7da1
...
...
@@ -72,6 +72,7 @@
"Meta Editor"
:
"过程元配置"
,
"Env editor"
:
"环境编辑器"
,
"As inline"
:
"作为内联"
,
"Copy template to clipboard"
:
"复制模板到粘贴板"
,
"Link to parent"
:
"连接到父节点"
,
"Input project name"
:
"输入项目名"
,
"Invalid project name"
:
"无效的项目名"
,
...
...
src/views/Editor.vue
View file @
31be7da1
...
...
@@ -12,6 +12,7 @@
<inspector
splitpanes-min=
"20"
:splitpanes-size=
"getSize(0, 1)"
></inspector>
</split-panes>
<details-dialog
ref=
"dialogsDialog"
/>
<pack-result-dialog
ref=
"packResultDialog"
/>
</div>
</
template
>
...
...
@@ -26,10 +27,12 @@
import
DetailsDialog
from
"./Editor/dialogs/DetailsDialog"
;
import
{
playWaiting
}
from
"../utils"
;
import
i18n
from
"../i18n"
;
import
PackResultDialog
from
"./Editor/dialogs/PackResultDialog"
;
export
default
{
name
:
'Editor'
,
components
:
{
PackResultDialog
,
DetailsDialog
,
Assets
,
Playground
,
...
...
@@ -192,13 +195,14 @@
});
try
{
await
this
.
saveProject
();
const
{
tplUrl
}
=
await
this
.
packProject
();
const
packResult
=
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'
),
{
this
.
$refs
.
packResultDialog
.
show
(
packResult
);
/*this.$confirm(this.$t('Pack project successfully'), this.$t('Alert'), {
confirmButtonText: this.$t('Open in new tab'),
cancelButtonText: this.$t('Close'),
type: 'warning'
...
...
@@ -208,7 +212,7 @@
}, 500);
}).catch(() => {
});
});
*/
}
catch
(
e
)
{
this
.
$message
({
message
:
this
.
$t
(
'Pack project failed'
),
...
...
src/views/Editor/dialogs/PackResultDialog.vue
0 → 100644
View file @
31be7da1
<
template
>
<el-dialog
:title=
"$t('Project details')"
width=
"70%"
:visible
.
sync=
"visible"
@
open=
"onOpen"
:close-on-click-modal=
"false"
:append-to-body=
"true"
:show-close=
"false"
custom-class=
"details-dialog"
>
<div>
<p>
{{
$t
(
'Pack project successfully'
)
}}
</p>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"mini"
@
click=
"onClose"
>
{{
$t
(
'Close'
)
}}
</el-button>
<el-button
size=
"mini"
@
click=
"copy"
>
{{
$t
(
'Copy template to clipboard'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"openInNewTab"
>
{{
$t
(
'Open in new tab'
)
}}
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
import
copy
from
'copy-to-clipboard'
export
default
{
name
:
"PackResultDialog"
,
components
:
{},
data
()
{
return
{
visible
:
false
,
activeName
:
'project'
,
packResult
:
null
,
}
},
methods
:
{
show
(
packResult
)
{
this
.
packResult
=
packResult
;
this
.
visible
=
true
;
},
onClose
()
{
this
.
visible
=
false
;
},
openInNewTab
()
{
this
.
visible
=
false
;
setTimeout
(()
=>
{
window
.
open
(
this
.
packResult
.
tplUrl
,
'blank'
);
},
500
);
},
copy
()
{
this
.
visible
=
false
;
copy
(
this
.
packResult
.
tpl
);
},
onOpen
()
{
},
}
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
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