feat: refs #8120 added new style to summary popups
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
6cc400a975
commit
2aff1d3d06
|
@ -1,7 +1,8 @@
|
|||
<script setup>
|
||||
import { useDialogPluginComponent } from 'quasar';
|
||||
import { computed } from 'vue';
|
||||
|
||||
defineProps({
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
type: Number,
|
||||
required: true,
|
||||
|
@ -15,9 +16,36 @@ defineProps({
|
|||
defineEmits([...useDialogPluginComponent.emits]);
|
||||
|
||||
const { dialogRef, onDialogHide } = useDialogPluginComponent();
|
||||
|
||||
const moduleClass = computed(() => {
|
||||
const name = $props.summary.__name;
|
||||
|
||||
const classMap = {
|
||||
CustomerSummary: 'largeSummary',
|
||||
EntrySummary: 'largeSummary',
|
||||
InvoiceOutSummary: 'largeSummary',
|
||||
RouteSummary: 'largeSummary',
|
||||
TicketrSummary: 'largeSummary',
|
||||
InvoiceInSummary: 'xlargeSummary',
|
||||
};
|
||||
|
||||
return classMap[name] || 'defaultSummary';
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<QDialog ref="dialogRef" @hide="onDialogHide" full-width>
|
||||
<component :is="summary" :id="id" />
|
||||
<QDialog ref="dialogRef" @hide="onDialogHide">
|
||||
<component :is="$props.summary" :id="$props.id" :class="moduleClass" />
|
||||
</QDialog>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.defaultSummary {
|
||||
max-width: $width-md;
|
||||
}
|
||||
.largeSummary {
|
||||
max-width: $width-lg;
|
||||
}
|
||||
.xlargeSummary {
|
||||
max-width: $width-xl;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -33,6 +33,11 @@ $dark-shadow-color: black;
|
|||
$layout-shadow-dark: 0 0 10px 2px #00000033, 0 0px 10px #0000003d;
|
||||
$spacing-md: 16px;
|
||||
$color-font-secondary: #777;
|
||||
$width-xs: 400px;
|
||||
$width-sm: 544px;
|
||||
$width-md: 800px;
|
||||
$width-lg: 1280px;
|
||||
$width-xl: 1600px;
|
||||
.bg-success {
|
||||
background-color: $positive;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue