Last active
July 21, 2019 20:06
-
-
Save enkot/93abaa0e8d33e048228b08eb9f62c812 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
<script> | |
import { value } from 'vue-function-api' | |
const TestComponent = { | |
props: { | |
name: String | |
}, | |
setup(props) { | |
const message = value('Hello guest!') | |
const getName = () => { | |
message.value = `Hello ${props.name}!` | |
} | |
return { | |
message, | |
getName | |
} | |
}, | |
template: `<div @click="getName">{{ message }}</div>` | |
} | |
</script> | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment