Skip to content

Commit 8e54e35

Browse files
committed
chore: adjust
1 parent d731de1 commit 8e54e35

File tree

3 files changed

+104
-23
lines changed

3 files changed

+104
-23
lines changed

demo/24-counter-using-render-function-options.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<body>
2121
<div id="app"></div>
2222
<script>
23-
const { createApp, ref, h } = MiniVue
23+
const { createApp, ref, h, toDisplayString } = MiniVue
2424

2525
createApp({
2626
setup() {
@@ -40,9 +40,9 @@
4040
render(props) {
4141
const { count, plus, minus } = props
4242
return h('div', { class: 'demo'}, [
43-
h('button', { onClick() { minus() } }, '-1'),
44-
h('span', { class: 'count' }, count),
45-
h('button', { onClick() { plus() } }, '+1')
43+
h('button', { onClick: minus }, '-1'),
44+
h('span', { class: 'count' }, count),
45+
h('button', { onClick: plus }, '+1')
4646
])
4747
}
4848
}).mount('#app')

demo/static/mini-vue.umd.js

Lines changed: 98 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

slides.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2453,9 +2453,9 @@ createApp({
24532453
render(props) {
24542454
const { count, plus, minus } = props
24552455
return h('div', { class: 'demo'}, [
2456-
h('button', { onClick() { minus() } }, '-1'),
2456+
h('button', { onClick: minus }, '-1'),
24572457
h('span', { class: 'count' }, count),
2458-
h('button', { onClick() { plus() } }, '+1')
2458+
h('button', { onClick: plus }, '+1')
24592459
])
24602460
}
24612461
}).mount('#app')

0 commit comments

Comments
 (0)