File tree Expand file tree Collapse file tree 4 files changed +12
-26
lines changed Expand file tree Collapse file tree 4 files changed +12
-26
lines changed Original file line number Diff line number Diff line change 10
10
"build-prod" : " webpack -p"
11
11
},
12
12
"devDependencies" : {
13
- "@riotjs/compiler" : " 4.7.0 " ,
13
+ "@riotjs/compiler" : " 4.8.2 " ,
14
14
"@riotjs/webpack-loader" : " 4.0.3" ,
15
- "webpack" : " 4.42.0 " ,
15
+ "webpack" : " 4.42.1 " ,
16
16
"webpack-cli" : " 3.3.11"
17
17
},
18
18
"dependencies" : {
19
- "riot" : " 4.11 .0"
19
+ "riot" : " 4.12 .0"
20
20
}
21
21
}
Original file line number Diff line number Diff line change 39
39
</div >
40
40
</div >
41
41
</div >
42
- <table class =' table table-hover table-striped test-data' onclick ={ handleClick } >
42
+ <table class =' table table-hover table-striped test-data' >
43
43
<tbody >
44
44
<tr each ={ row in state .rows } key ={ row .id } class ={ rowClass (row ) }>
45
45
<td class =' col-md-1' >{ row .id }</td >
46
46
<td class =' col-md-4' >
47
- <a data-action = " select " data-id ={ row .id }>{ row .label }</a >
47
+ <a onclick ={() => select( row.id) }>{ row .label }</a >
48
48
</td >
49
49
<td class =' col-md-1' >
50
- <a ><span data-action = " remove " data-id ={ row .id } class =' glyphicon glyphicon-remove' aria-hidden =' true' ></span ></a >
50
+ <a ><span onclick ={() => remove( row.id) } class='glyphicon glyphicon-remove' aria-hidden='true'></span ></a >
51
51
</td >
52
52
<td class =' col-md-6' ></td >
53
53
</tr >
64
64
selected: this .store .selected
65
65
}
66
66
},
67
- handleClick (event ) {
68
- const { action , id } = event .target .dataset
69
-
70
- if (action && id) {
71
- this [action](Number (id))
72
- }
73
- },
74
67
rowClass (row ) {
75
68
return row .id === this .state .selected ? ' danger' : ' '
76
69
},
Original file line number Diff line number Diff line change 10
10
"build-prod" : " webpack -p"
11
11
},
12
12
"devDependencies" : {
13
- "@riotjs/compiler" : " 4.7.0 " ,
13
+ "@riotjs/compiler" : " 4.8.2 " ,
14
14
"@riotjs/webpack-loader" : " 4.0.3" ,
15
- "webpack" : " 4.42.0 " ,
15
+ "webpack" : " 4.42.1 " ,
16
16
"webpack-cli" : " 3.3.11"
17
17
},
18
18
"dependencies" : {
19
- "riot" : " 4.11 .0"
19
+ "riot" : " 4.12 .0"
20
20
}
21
21
}
Original file line number Diff line number Diff line change 39
39
</div >
40
40
</div >
41
41
</div >
42
- <table class =' table table-hover table-striped test-data' onclick ={ handleClick } >
42
+ <table class =' table table-hover table-striped test-data' >
43
43
<tbody >
44
44
<tr each ={ row in state .rows } class ={ rowClass (row ) }>
45
45
<td class =' col-md-1' >{ row .id }</td >
46
46
<td class =' col-md-4' >
47
- <a data-action = " select " data-id ={ row .id }>{ row .label }</a >
47
+ <a onclick ={() => select( row.id) }>{ row .label }</a >
48
48
</td >
49
49
<td class =' col-md-1' >
50
- <a ><span data-action = " remove " data-id ={ row .id } class =' glyphicon glyphicon-remove' aria-hidden =' true' ></span ></a >
50
+ <a ><span onclick ={() => remove( row.id) } class='glyphicon glyphicon-remove' aria-hidden='true'></span ></a >
51
51
</td >
52
52
<td class =' col-md-6' ></td >
53
53
</tr >
64
64
selected: this .store .selected
65
65
}
66
66
},
67
- handleClick (event ) {
68
- const { action , id } = event .target .dataset
69
-
70
- if (action && id) {
71
- this [action](Number (id))
72
- }
73
- },
74
67
rowClass (row ) {
75
68
return row .id === this .state .selected ? ' danger' : ' '
76
69
},
You can’t perform that action at this time.
0 commit comments