mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +00:00
chore: fix playground hydration error (#758)
This commit is contained in:
parent
cc410a31a6
commit
eaa16f2a7b
@ -15,7 +15,10 @@ const greetings = [
|
|||||||
'こんにちは',
|
'こんにちは',
|
||||||
'你好'
|
'你好'
|
||||||
]
|
]
|
||||||
const hello = greetings[Math.random() * greetings.length | 0]
|
const hello = useState('hello')
|
||||||
|
if (!hello.value) {
|
||||||
|
hello.value = greetings[Math.random() * greetings.length | 0]
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
Loading…
Reference in New Issue
Block a user