mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-08 14:29:42 +00:00
Setup alias for use in standalone chill-bundles project and replace relative paths
This commit is contained in:
@@ -8,28 +8,28 @@
|
||||
aria-modal="true"
|
||||
role="dialog"
|
||||
>
|
||||
<div class="modal-dialog" :class="modalDialogClass">
|
||||
<div class="modal-dialog" :class="props.modalDialogClass || {}">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<slot name="header" />
|
||||
<button class="close btn" @click="$emit('close')">
|
||||
<i class="fa fa-times" aria-hidden="true" />
|
||||
<slot name="header"></slot>
|
||||
<button class="close btn" @click="emits('close')">
|
||||
<i class="fa fa-times" aria-hidden="true"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="body-head">
|
||||
<slot name="body-head" />
|
||||
<slot name="body-head"></slot>
|
||||
</div>
|
||||
<slot name="body" />
|
||||
<slot name="body"></slot>
|
||||
</div>
|
||||
<div class="modal-footer" v-if="!hideFooter">
|
||||
<button
|
||||
class="btn btn-cancel"
|
||||
@click="$emit('close')"
|
||||
@click="emits('close')"
|
||||
>
|
||||
{{ $t("action.close") }}
|
||||
{{ trans(MODAL_ACTION_CLOSE) }}
|
||||
</button>
|
||||
<slot name="footer" />
|
||||
<slot name="footer"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -39,8 +39,7 @@
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from "vue";
|
||||
<script lang="ts" setup>
|
||||
/*
|
||||
* This Modal component is a mix between Vue3 modal implementation
|
||||
* [+] with 'v-if:showModal' directive:parameter, html scope is added/removed not just shown/hidden
|
||||
@@ -50,22 +49,23 @@ import { defineComponent } from "vue";
|
||||
* [+] using bootstrap css classes, the modal have a responsive behaviour,
|
||||
* [+] modal design can be configured using css classes (size, scroll)
|
||||
*/
|
||||
export default defineComponent({
|
||||
name: "Modal",
|
||||
props: {
|
||||
modalDialogClass: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: {},
|
||||
},
|
||||
hideFooter: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
emits: ["close"],
|
||||
import { trans, MODAL_ACTION_CLOSE } from "translator";
|
||||
import { defineProps } from "vue";
|
||||
|
||||
export interface ModalProps {
|
||||
modalDialogClass: object | null;
|
||||
hideFooter: boolean;
|
||||
}
|
||||
|
||||
// Define the props
|
||||
const props = withDefaults(defineProps<ModalProps>(), {
|
||||
hideFooter: false,
|
||||
modalDialogClass: null,
|
||||
});
|
||||
|
||||
const emits = defineEmits<{
|
||||
close: [];
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
Reference in New Issue
Block a user