mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-06 12:17:13 +08:00
31 lines
522 B
JavaScript
31 lines
522 B
JavaScript
import { h, defineComponent, ref } from 'vue'
|
|
import { NButton, NSsrProvider } from 'naive-ui'
|
|
|
|
const App = defineComponent({
|
|
setup () {
|
|
return {
|
|
count: ref(0)
|
|
}
|
|
},
|
|
render () {
|
|
return h(
|
|
NSsrProvider,
|
|
{
|
|
ssr: typeof window === 'undefined'
|
|
},
|
|
{
|
|
default: () =>
|
|
h(
|
|
NButton,
|
|
{
|
|
onClick: () => this.count++
|
|
},
|
|
{ default: () => this.count }
|
|
)
|
|
}
|
|
)
|
|
}
|
|
})
|
|
|
|
export default App
|