Skip to content

<VueFormArchive> ​

Renders a archive button that calls the archive method on click. The button is automatically visible only in update mode.

vue
<template>
  <VueForm>
    <template #default="{...}">
      <VueFormArchive
        v-slot="{ archiveItem, isArchiving, isReading, isLoading }"
      >
        <button @click="confirmArchive(archiveItem)" :disabled="isArchiving">
          {{ isArchiving ? "Deleting..." : "Delete" }}
        </button>
      </VueFormArchive>
    </template>
  </VueForm>
</template>

<script setup>
function confirmArchive(archiveItem) {
  if (confirm("Are you sure?")) {
    archiveItem();
  }
}
</script>

Slots ​

default ​

Slot Props ​

NameDescription
archiveItemFunction
Wrapper for calling archive method
isArchivingBoolean
Check the context object docs
isReadingBoolean
Check the context object docs
isLoadingBoolean
Check the context object docs

Version 1.0.0