Skip to content

Instantly share code, notes, and snippets.

@zach2825
Created January 16, 2023 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zach2825/bdd461182f0390f6b873c847a733971b to your computer and use it in GitHub Desktop.
Save zach2825/bdd461182f0390f6b873c847a733971b to your computer and use it in GitHub Desktop.
<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