Created
January 16, 2023 19:41
-
-
Save zach2825/bdd461182f0390f6b873c847a733971b to your computer and use it in GitHub Desktop.
This file contains 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
<template> | |
<div @click="someTest"> | |
{{preMessage}} {{message}} | |
</div> | |
</template> | |
<script lang="ts"> | |
interface Mehtods { | |
someTest: () => void; | |
} | |
interface Data { | |
message: string; | |
} | |
interface Computed { | |
preMessage: string; | |
} | |
interface Props { | |
} | |
Vue.extend<Methods, Data, Computed, Props>({ | |
name: 'SampleVueComponent', | |
data(){ | |
return { | |
message: 'World' | |
} | |
}, | |
methods: { | |
someTest(){ | |
console.log('Hello World') | |
} | |
}, | |
computed: { | |
preMessage(){ | |
return 'Hello' | |
} | |
} | |
}) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment