File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 7
7
var CodeMirrorMetas = require (' ./metas.js' )
8
8
require (' codemirror/lib/codemirror.css' )
9
9
// var
10
+ function makeMarker () {
11
+ var marker = document .createElement (" div" );
12
+ marker .style .color = " #822" ;
13
+ marker .innerHTML = " ●" ;
14
+ return marker;
15
+ }
10
16
export default {
11
17
data : function () {
12
18
return {
23
29
styleActiveLine: true ,
24
30
lineNumbers: true ,
25
31
mode: ' text/javascript' ,
26
- lineWrapping: true
32
+ lineWrapping: true ,
33
+ gutters: [" CodeMirror-linenumbers" , " breakpoints" ]
27
34
}
28
35
}
29
36
},
83
90
_this .$emit (' input' , _this .content )
84
91
}
85
92
})
93
+ this .editor .on (" gutterClick" , function (cm , n ) {
94
+ var info = cm .lineInfo (n);
95
+ cm .setGutterMarker (n, " breakpoints" , info .gutterMarkers ? null : makeMarker ())
96
+ })
86
97
},
87
98
watch: {
88
99
' code ' : function (newVal , oldVal ) {
You can’t perform that action at this time.
0 commit comments