- second commit

This commit is contained in:
Kaimbacher 2023-03-17 16:13:37 +01:00
parent 4fc3bb0a01
commit 59a99ff3c8
61 changed files with 2625 additions and 1182 deletions

View file

@ -1,56 +1,62 @@
<script setup>
import { computed } from 'vue'
import { mdiClose } from '@mdi/js'
import BaseButton from '@/Components/BaseButton.vue'
import BaseButtons from '@/Components/BaseButtons.vue'
import CardBox from '@/Components/CardBox.vue'
import OverlayLayer from '@/Components/OverlayLayer.vue'
<script setup lang="ts">
import { computed } from 'vue';
import { mdiClose } from '@mdi/js';
import BaseButton from '@/Components/BaseButton.vue';
import BaseButtons from '@/Components/BaseButtons.vue';
import CardBox from '@/Components/CardBox.vue';
import OverlayLayer from '@/Components/OverlayLayer.vue';
const props = defineProps({
title: {
type: String,
default: null
default: null,
},
largeTitle: {
type: String,
default: null
default: null,
},
button: {
type: String,
default: 'info'
default: 'info',
},
buttonLabel: {
type: String,
default: 'Done'
default: 'Done',
},
hasCancel: Boolean,
modelValue: {
type: [String, Number, Boolean],
default: null
}
})
default: null,
},
});
const emit = defineEmits(['update:modelValue', 'cancel', 'confirm'])
const emit = defineEmits(['update:modelValue', 'cancel', 'confirm']);
const value = computed({
get: () => props.modelValue,
set: value => emit('update:modelValue', value)
})
set: (value) => emit('update:modelValue', value),
});
const confirmCancel = (mode) => {
value.value = false;
emit(mode);
}
};
const confirm = () => confirmCancel('confirm')
const confirm = () => confirmCancel('confirm');
const cancel = () => confirmCancel('cancel')
const cancel = () => confirmCancel('cancel');
</script>
<template>
<OverlayLayer v-show="value" @overlay-click="cancel">
<CardBox v-show="value" :title="title" class="shadow-lg max-h-modal w-11/12 md:w-3/5 lg:w-2/5 xl:w-4/12 z-50"
:header-icon="mdiClose" modal @header-icon-click="cancel">
<CardBox
v-show="value"
:title="title"
class="shadow-lg max-h-modal w-11/12 md:w-3/5 lg:w-2/5 xl:w-4/12 z-50"
:header-icon="mdiClose"
modal
@header-icon-click="cancel"
>
<div class="space-y-3">
<h1 v-if="largeTitle" class="text-2xl">
{{ largeTitle }}