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
9a8fbe71
Commit
9a8fbe71
authored
Dec 04, 2019
by
任建锋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--
parent
fe222d42
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
4 deletions
+36
-4
project.js
src/store/modules/project.js
+1
-1
editor.scss
src/themes/light/editor.scss
+3
-0
DetailsDialog.vue
src/views/Editor/dialogs/DetailsDialog.vue
+1
-0
ProjectEditor.vue
src/views/Editor/dialogs/editors/ProjectEditor.vue
+31
-3
No files found.
src/store/modules/project.js
View file @
9a8fbe71
...
@@ -283,7 +283,7 @@ export const projectStore = {
...
@@ -283,7 +283,7 @@ export const projectStore = {
copyNode
(
state
,
{
node
,
parentNode
})
{
copyNode
(
state
,
{
node
,
parentNode
})
{
// const parentChildren = parentNode.children || parentNode;
// const parentChildren = parentNode.children || parentNode;
// const index = parentChildren.indexOf(node);
// const index = parentChildren.indexOf(node);
//
parentNode.children.push(node);
//
parentNode.children.push(node);
// parentChildren.push(parentChildren[index]);
// parentChildren.push(parentChildren[index]);
const
child
=
{
const
child
=
{
name
:
node
.
name
,
name
:
node
.
name
,
...
...
src/themes/light/editor.scss
View file @
9a8fbe71
...
@@ -121,4 +121,7 @@
...
@@ -121,4 +121,7 @@
}
}
}
}
}
}
.full-scrollbar
{
height
:
68vh
;
}
}
}
src/views/Editor/dialogs/DetailsDialog.vue
View file @
9a8fbe71
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
:close-on-click-modal=
"false"
:close-on-click-modal=
"false"
:append-to-body=
"true"
:append-to-body=
"true"
:show-close=
"false"
:show-close=
"false"
fullscreen
custom-class=
"details-dialog"
custom-class=
"details-dialog"
>
>
<el-tabs
v-model=
"activeName"
>
<el-tabs
v-model=
"activeName"
>
...
...
src/views/Editor/dialogs/editors/ProjectEditor.vue
View file @
9a8fbe71
<
template
>
<
template
>
<div>
<div>
<el-scrollbar
class=
"scrollbar"
wrap-class=
"wrap-x-hidden"
view-class=
"view"
>
<el-scrollbar
class=
"scrollbar
full-scrollbar
"
wrap-class=
"wrap-x-hidden"
view-class=
"view"
>
<el-form
@
submit
.
native
.
prevent
ref=
"form"
:model=
"options"
size=
"mini"
label-position=
"right"
<el-form
@
submit
.
native
.
prevent
ref=
"form"
:model=
"options"
size=
"mini"
label-position=
"right"
label-width=
"150px"
>
label-width=
"150px"
>
<el-form-item
prop=
"pageTitle"
:label=
"$t('Page title')"
>
<el-form-item
prop=
"pageTitle"
:label=
"$t('Page title')"
>
...
@@ -46,7 +46,13 @@
...
@@ -46,7 +46,13 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"tpl"
:label=
"$t('Template')"
>
<el-form-item
prop=
"tpl"
:label=
"$t('Template')"
>
<el-input
type=
"textarea"
v-model=
"options.tpl"
:rows=
"10"
/>
<!--
<el-input
type=
"textarea"
v-model=
"options.tpl"
:rows=
"10"
/>
-->
<codemirror
ref=
"codeEditor"
v-model=
"options.tpl"
:options=
"cmOptions"
@
cursorActivity=
"onCodeChange"
>
</codemirror>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</el-scrollbar>
</el-scrollbar>
...
@@ -59,10 +65,18 @@
...
@@ -59,10 +65,18 @@
<
script
>
<
script
>
import
{
mapState
,
mapGetters
,
mapMutations
}
from
'vuex'
;
import
{
mapState
,
mapGetters
,
mapMutations
}
from
'vuex'
;
import
{
codemirror
}
from
"vue-codemirror"
;
import
'codemirror/mode/javascript/javascript.js'
import
'codemirror/lib/codemirror.css'
import
'codemirror/theme/monokai.css'
import
'codemirror/addon/edit/closebrackets.js'
import
'codemirror/addon/hint/show-hint.js'
import
'codemirror/addon/hint/show-hint.css'
import
'codemirror/addon/hint/javascript-hint.js'
export
default
{
export
default
{
name
:
"ProjectEditor"
,
name
:
"ProjectEditor"
,
components
:
{},
components
:
{
codemirror
},
data
()
{
data
()
{
const
scaleMode
=
this
.
$t
(
'scaleMode'
);
const
scaleMode
=
this
.
$t
(
'scaleMode'
);
const
rendererType
=
this
.
$t
(
'rendererType'
);
const
rendererType
=
this
.
$t
(
'rendererType'
);
...
@@ -70,6 +84,16 @@
...
@@ -70,6 +84,16 @@
visible
:
false
,
visible
:
false
,
scaleMode
,
scaleMode
,
rendererType
,
rendererType
,
cmOptions
:
{
tabSize
:
2
,
mode
:
'text/javascript'
,
styleActiveLine
:
true
,
theme
:
'default'
,
lineNumbers
:
true
,
line
:
true
,
matchBrackets
:
true
,
autoCloseBrackets
:
true
,
}
}
}
},
},
computed
:
{
computed
:
{
...
@@ -90,6 +114,10 @@
...
@@ -90,6 +114,10 @@
onSave
()
{
onSave
()
{
this
.
modifyProject
();
this
.
modifyProject
();
},
},
onCodeChange
(
codemirror
){
//codemirror.showHint();
//console.log(code);
}
}
}
}
}
</
script
>
</
script
>
...
...
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