sublime-settings/Packages/User/vue-component.sublime-snippet

64 lines
1.2 KiB
XML

<snippet>
<content><![CDATA[
<template>
<app-layout title="${1:TITLE}">
<template #header>${1:TITLE}</template>
<div class="col-span-6">
<!-- content goes here -->
</div>
</app-layout>
</template>
<script>
import { defineComponent, reactive, ref, computed, watch, onBeforeMount, onMounted } from 'vue'
import AppLayout from '@/Layouts/AppLayout.vue'
export default defineComponent({
emits: [],
props: {},
components: {
AppLayout,
},
setup(props, {context, emit}) {
let aVariable = reactive({})
let compVariable = computed(() => {
//return 'foo'
})
watch(variable, (newValue, oldValue) => {
//
})
onBeforeMount(() => {
//
})
onMounted(() => {
//
})
function myMethod() {
aVariable.value = null
}
return {
aVariable,
compVariable,
myMethod,
}
},
})
</script>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>vcomp</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>text.html.vue</scope> -->
</snippet>