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

68 lines
1.3 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, provide, inject } from "vue"
import AppLayout from "@/Layouts/AppLayout.vue"
export default defineComponent({
emits: [],
props: {},
components: {
AppLayout,
},
setup(props, { attrs, slots, emit, expose }) {
let aVariable = ref({})
// computed properties
let compVariable = computed(() => {
//return "foo"
})
// watchers
watch(aVariable, (newValue, oldValue) => {
//
})
// lifecycle hooks
onBeforeMount(() => {
//
})
onMounted(() => {
//
})
// methods
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>