File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 2
2
div( @click ="setSelectedRange" )
3
3
span.text-sequence (
4
4
v-for ="r in chunksWithLabel"
5
- v-bind:class ="{ tag: id2label[r.label].text_color }"
5
+ v-bind:class ="getChunkClass(r)"
6
+ v-bind:data-tooltip ="id2label[r.label].text"
6
7
v-bind:style ="{ \
7
8
color: id2label[r.label].text_color, \
8
9
backgroundColor: id2label[r.label].background_color \
@@ -83,6 +84,18 @@ export default {
83
84
},
84
85
85
86
methods: {
87
+ getChunkClass (chunk ) {
88
+ if (! chunk .id ) {
89
+ return {};
90
+ }
91
+
92
+ const label = this .id2label [chunk .label ];
93
+ return [
94
+ ' tooltip is-tooltip-bottom' ,
95
+ { tag: label .text_color },
96
+ ];
97
+ },
98
+
86
99
setSelectedRange () {
87
100
let start;
88
101
let end;
Original file line number Diff line number Diff line change 15
15
< link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css " crossorigin ="anonymous ">
16
16
< link rel ="
stylesheet "
href ="
https://cdn.jsdelivr.net/npm/[email protected] /bulma-divider/dist/css/bulma-divider.min.css "
crossorigin ="
anonymous "
>
17
17
< link rel ="
stylesheet "
href ="
https://cdn.jsdelivr.net/npm/[email protected] /bulma-checkradio/dist/css/bulma-checkradio.min.css "
crossorigin ="
anonymous "
>
18
+ < link rel ="
stylesheet "
href ="
https://cdn.jsdelivr.net/npm/[email protected] /bulma-tooltip/dist/css/bulma-tooltip.min.css "
crossorigin ="
anonymous "
>
18
19
< link rel ="stylesheet " href ="{% static 'assets/css/forum.css' %} ">
19
20
<!-- favicon settings -->
20
21
< link rel ="apple-touch-icon " sizes ="57x57 " href ="{% static 'static/apple-icon-57x57.png' %} ">
99
100
100
101
{% block footer %}{% endblock %}
101
102
</ body >
102
- </ html >
103
+ </ html >
You can’t perform that action at this time.
0 commit comments