mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
update benchmark to latest syntax
This commit is contained in:
parent
b5fec3fc19
commit
b5e9cb94a8
@ -1,23 +1,20 @@
|
||||
<script>
|
||||
module.exports = {
|
||||
onInput: function(input) {
|
||||
this.state = {
|
||||
name: input.name,
|
||||
colors: input.colors,
|
||||
clickCount: 0
|
||||
};
|
||||
},
|
||||
class {
|
||||
onInput() {
|
||||
this.state = {
|
||||
clickCount: 0
|
||||
};
|
||||
}
|
||||
|
||||
handleButtonClick() {
|
||||
this.state.clickCount++;
|
||||
}
|
||||
}
|
||||
|
||||
handleButtonClick: function() {
|
||||
this.state.clickCount++;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
div
|
||||
h1 -- Hello ${state.name}!
|
||||
h1 -- Hello ${input.name}!
|
||||
div.colors
|
||||
ul if(state.colors.length)
|
||||
for(color in state.colors)
|
||||
ul if(input.colors.length)
|
||||
for(color in input.colors)
|
||||
li.color style="background-color: ${color}"
|
||||
-- ${color}
|
||||
div else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user