Skip to content
This repository was archived by the owner on May 30, 2025. It is now read-only.

Version 3.1.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@CRBroughton CRBroughton released this 08 Mar 18:50
· 4 commits to develop since this release
3a7cd0f

New included snippets are listed below:

v3props

interface Props {
    msg: string
}

// For default values for your props, use :
// withDefaults(defineProps<Props>(), { msg: 'myDefaultValue' })}
const props = defineProps<Props>()

v3emits

interface Emits {
    (e: 'change', id: number): void
    (e: 'update', value: string): void
}

const emit = defineEmits<Emits>()

v3computedgetset

const props = defineProps(['modelValue'])
const emit = defineEmits(['update:modelValue'])

const value = computed({
    get() {
        return props.modelValue
    },
    set(value) {
        emit('update:modelValue', value)
    }
})