Skip to content

Commit

Permalink
chore: adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
w2xi committed Jan 28, 2024
1 parent d731de1 commit 8e54e35
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 23 deletions.
8 changes: 4 additions & 4 deletions demo/24-counter-using-render-function-options.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<body>
<div id="app"></div>
<script>
const { createApp, ref, h } = MiniVue
const { createApp, ref, h, toDisplayString } = MiniVue

createApp({
setup() {
Expand All @@ -40,9 +40,9 @@
render(props) {
const { count, plus, minus } = props
return h('div', { class: 'demo'}, [
h('button', { onClick() { minus() } }, '-1'),
h('span', { class: 'count' }, count),
h('button', { onClick() { plus() } }, '+1')
h('button', { onClick: minus }, '-1'),
h('span', { class: 'count' }, count),
h('button', { onClick: plus }, '+1')
])
}
}).mount('#app')
Expand Down
115 changes: 98 additions & 17 deletions demo/static/mini-vue.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -2453,9 +2453,9 @@ createApp({
render(props) {
const { count, plus, minus } = props
return h('div', { class: 'demo'}, [
h('button', { onClick() { minus() } }, '-1'),
h('button', { onClick: minus }, '-1'),
h('span', { class: 'count' }, count),
h('button', { onClick() { plus() } }, '+1')
h('button', { onClick: plus }, '+1')
])
}
}).mount('#app')
Expand Down

0 comments on commit 8e54e35

Please sign in to comment.