Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hs-sky-ui
Project
Project
Details
Activity
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
何虹
hs-sky-ui
Commits
55726fbf
Commit
55726fbf
authored
Apr 29, 2020
by
何虹
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
d1c391c6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
main.js
src/main.js
+0
-3
jsoneditor.vue
src/packages/common/jsoneditor.vue
+3
-1
uc_component.js
src/packages/ucClass/uc_component.js
+8
-7
No files found.
src/main.js
View file @
55726fbf
...
@@ -3,9 +3,6 @@ import App from './App.vue'
...
@@ -3,9 +3,6 @@ import App from './App.vue'
import
'./packages/index'
import
'./packages/index'
import
ElementUI
from
'element-ui'
import
ElementUI
from
'element-ui'
import
'element-ui/lib/theme-chalk/index.css'
import
'element-ui/lib/theme-chalk/index.css'
import
'jsoneditor/dist/jsoneditor.min.css'
import
jsoneditor
from
'jsoneditor'
Vue
.
prototype
.
$jsoneditor
=
jsoneditor
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
Vue
.
use
(
ElementUI
)
Vue
.
use
(
ElementUI
)
new
Vue
({
new
Vue
({
...
...
src/packages/common/jsoneditor.vue
View file @
55726fbf
...
@@ -106,6 +106,8 @@ import request from '../funTools/request'
...
@@ -106,6 +106,8 @@ import request from '../funTools/request'
import
lookPageLog
from
'./lookPageLog.vue'
import
lookPageLog
from
'./lookPageLog.vue'
import
asyncFormPropSet
from
'./asyncFormPropSet.vue'
import
asyncFormPropSet
from
'./asyncFormPropSet.vue'
import
tbaleColumsSet
from
'./tbaleColumsSet.vue'
import
tbaleColumsSet
from
'./tbaleColumsSet.vue'
import
'jsoneditor/dist/jsoneditor.min.css'
import
jsoneditor
from
'jsoneditor'
// const lookPageLog = r => require.ensure([], () => r(require('./lookPageLog.vue')), 'lookPageLog')
// const lookPageLog = r => require.ensure([], () => r(require('./lookPageLog.vue')), 'lookPageLog')
// const asyncFormPropSet = r => require.ensure([], () => r(require('./asyncFormPropSet.vue')), 'asyncFormPropSet')
// const asyncFormPropSet = r => require.ensure([], () => r(require('./asyncFormPropSet.vue')), 'asyncFormPropSet')
// const tbaleColumsSet = r => require.ensure([], () => r(require('./tbaleColumsSet.vue')), 'tbaleColumsSet')
// const tbaleColumsSet = r => require.ensure([], () => r(require('./tbaleColumsSet.vue')), 'tbaleColumsSet')
...
@@ -492,7 +494,7 @@ export default {
...
@@ -492,7 +494,7 @@ export default {
},
},
drow
(
el
,
json
=
{},
flage
)
{
drow
(
el
,
json
=
{},
flage
)
{
const
container
=
document
.
getElementById
(
el
)
const
container
=
document
.
getElementById
(
el
)
this
[
flage
]
=
new
this
.
$
jsoneditor
(
container
,
this
.
options
)
this
[
flage
]
=
new
jsoneditor
(
container
,
this
.
options
)
this
[
flage
].
set
(
json
)
this
[
flage
].
set
(
json
)
}
}
}
}
...
...
src/packages/ucClass/uc_component.js
View file @
55726fbf
import
uuidv1
from
'uuid/v1'
import
uuidv1
from
'uuid/v1'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
elId
:
''
,
elId
:
''
,
outBoxDom
:
null
outBoxDom
:
null
}
}
},
},
created
()
{
created
()
{
this
.
elId
=
uuidv1
()
// 获取随机id
this
.
elId
=
uuidv1
()
// 获取随机id
},
},
mounted
()
{
mounted
()
{
this
.
$nextTick
(
_
=>
{
this
.
$nextTick
(
_
=>
{
this
.
showEditJsonDialog
()
this
.
showEditJsonDialog
()
})
})
},
},
destroyed
()
{
destroyed
()
{
if
(
this
.
outBoxDom
)
{
if
(
this
.
outBoxDom
)
{
this
.
outBoxDom
.
removeEventListener
(
'mousedown'
,
this
.
boxEventMouse
)
this
.
outBoxDom
.
removeEventListener
(
'mousedown'
,
this
.
boxEventMouse
)
}
}
this
.
chart
=
null
this
.
chart
=
null
},
},
beforeDestroy
()
{
beforeDestroy
()
{
clearInterval
(
this
.
timer
)
// 清除定时器
clearInterval
(
this
.
timer
)
// 清除定时器
this
.
timer
=
null
this
.
timer
=
null
if
(
this
.
chart
)
{
if
(
this
.
chart
)
{
...
@@ -31,7 +32,7 @@ export default {
...
@@ -31,7 +32,7 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
boxEventMouse
(
event
)
{
boxEventMouse
(
event
)
{
const
that
=
this
const
that
=
this
event
.
stopPropagation
()
event
.
stopPropagation
()
if
(
event
.
shiftKey
&&
event
.
altKey
&&
!
event
.
ctrlKey
)
{
if
(
event
.
shiftKey
&&
event
.
altKey
&&
!
event
.
ctrlKey
)
{
...
@@ -40,7 +41,7 @@ export default {
...
@@ -40,7 +41,7 @@ export default {
}
}
},
},
// 弹出可编辑的弹框
// 弹出可编辑的弹框
showEditJsonDialog
()
{
showEditJsonDialog
()
{
this
.
outBoxDom
=
document
.
getElementById
(
this
.
elId
)
this
.
outBoxDom
=
document
.
getElementById
(
this
.
elId
)
this
.
outBoxDom
&&
this
.
outBoxDom
.
addEventListener
(
'mousedown'
,
this
.
boxEventMouse
)
this
.
outBoxDom
&&
this
.
outBoxDom
.
addEventListener
(
'mousedown'
,
this
.
boxEventMouse
)
}
}
...
...
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