Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
周远喜
mes-ui
Commits
328e4b3d
Commit
328e4b3d
authored
Apr 08, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
事件添加 右键菜单
parent
1529a735
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
index.vue
pages/go/tree/index.vue
+15
-6
No files found.
pages/go/tree/index.vue
View file @
328e4b3d
...
...
@@ -17,7 +17,7 @@ export default {
data
()
{
return
{
go
:
null
,
show
:
tru
e
,
show
:
fals
e
,
data
:
[
{
key
:
39
,
name
:
"增材制造中心"
,
parent
:
0
},
{
key
:
40
,
name
:
"北京星驰恒动工厂"
,
parent
:
39
},
...
...
@@ -92,6 +92,7 @@ export default {
{
angle
:
90
,
layerSpacing
:
35
}
)
});
var
myModel
=
$
(
go
.
TreeModel
);
// in the model data, each node is represented by a JavaScript object:
...
...
@@ -104,7 +105,16 @@ export default {
"Hi,henq"
,
{
margin
:
12
,
stroke
:
"#fff"
,
font
:
"bold 16px '宋体'"
},
new
go
.
Binding
(
"text"
,
"name"
)
)
),{
contextClick
:(
e
,
obj
)
=>
{
// alert(obj.data.key+":"+obj.data.name);
console
.
warn
(
"info"
,
e
,
obj
)
this
.
onContextmenu
(
e
.
event
,
obj
.
data
)
},
doubleClick
:(
e
,
obj
)
=>
{
alert
(
321
);
}
}
);
this
.
go
.
linkTemplate
=
$
(
go
.
Link
,
...
...
@@ -124,10 +134,9 @@ export default {
maxSize
:
new
go
.
Size
(
1200
,
NaN
)
});
console
.
log
(
this
.
$refs
.
svg
);
setTimeout
(()
=>
{
this
.
$nextTick
(()
=>
{
document
.
getElementById
(
"svg"
).
appendChild
(
svg
);
},
300
)
})
}
},
onContextmenu
(
event
,
a
)
{
...
...
@@ -173,7 +182,7 @@ export default {
//x: event.clientX,
//y: event.clientY,
customClass
:
"class-a"
,
zIndex
:
3
,
zIndex
:
3
000
,
minWidth
:
230
});
return
false
;
...
...
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