tambah tipe user belum fix
This commit is contained in:
51
components/Master/DialogModal.vue
Normal file
51
components/Master/DialogModal.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch, defineProps } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
stateValue: { type: Boolean, required: true }
|
||||
});
|
||||
|
||||
const isActive = ref(props.stateValue);
|
||||
// const emits = defineEmits({
|
||||
// stateValue: false
|
||||
// });
|
||||
|
||||
|
||||
// Watch for changes in props.stateValue to update isActive
|
||||
watch(() => props.stateValue, (newValue) => {
|
||||
isActive.value = newValue;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<template>
|
||||
<div class="pa-4 text-center">
|
||||
<v-dialog max-width="800" v-model="isActive" persistent>
|
||||
<!-- <template v-slot:activator="{ props: activatorProps }">
|
||||
<v-btn v-bind="activatorProps" text="Open Dialog"></v-btn>
|
||||
</template> -->
|
||||
|
||||
<template v-slot:default="{ isActive }">
|
||||
<v-card>
|
||||
<template v-slot:title>
|
||||
<div class="d-flex justify-lg-space-between">
|
||||
<div>
|
||||
<h3>List Menu</h3>
|
||||
</div>
|
||||
<div>
|
||||
<v-btn icon="mdi-close" variant="flat" @click="$emit('stateValue', false)"></v-btn>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<slot name="text">
|
||||
<!-- text -->
|
||||
</slot>
|
||||
|
||||
<v-card-actions>
|
||||
<v-btn text @click="$emit('stateValue', false)">Disagree</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</template>
|
||||
</v-dialog>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user