naive-ui/playground/ssr/app.js

24 lines
360 B
JavaScript
Raw Normal View History

2021-06-02 14:37:37 +08:00
import { h, defineComponent, ref } from 'vue'
import { NButton } from 'naive-ui'
2021-06-02 14:37:37 +08:00
const App = defineComponent({
setup () {
return {
count: ref(0)
}
},
render () {
return [
h(
NButton,
{
onClick: () => this.count++
},
{ default: () => this.count }
)
]
2021-06-02 14:37:37 +08:00
}
})
export default App