Vue - custom component: Revision history

From AWVVO
Jump to navigationJump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

25 January 2025

  • curprev 07:0207:02, 25 January 2025 Admin talk contribs 481 bytes +481 Created page with "== Vue custom component template == <syntaxhighlight lang="html" copy> <template> <div> <h2>{{ title }}</h2> <form @submit.prevent="handleSubmit"> <slot></slot> <button type="submit">Submit</button> </form> </div> </template> <script setup> const props = defineProps({ title: { type: String, default: 'Form' } }) const emit = defineEmits(['submit']) const handleSubmit = (event) => { emit('submit', event) } </script> </syntaxhigh..."