Add border and change background color
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
dfcf6e35d5
commit
9ea0a62046
|
@ -1,5 +1,32 @@
|
||||||
|
<script setup>
|
||||||
|
import { computed } from 'vue';
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
|
import '@quasar/quasar-ui-qcalendar/src/QCalendarVariables.sass';
|
||||||
|
|
||||||
|
const $props = defineProps({
|
||||||
|
bordered: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
transparentBackground: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const $q = useQuasar();
|
||||||
|
|
||||||
|
const containerClasses = computed(() => {
|
||||||
|
const classes = ['main-container-background'];
|
||||||
|
if ($props.bordered) classes.push('--bordered');
|
||||||
|
if ($props.transparentBackground) classes.push('transparent-background');
|
||||||
|
else classes.push($q.dark.isActive ? '--dark' : '--light');
|
||||||
|
return classes;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div :class="['main-container-background', $q.dark.isActive ? '--dark' : '--light']">
|
<div :class="containerClasses">
|
||||||
<div class="nav-container row"><slot name="header" /></div>
|
<div class="nav-container row"><slot name="header" /></div>
|
||||||
<slot name="calendar" />
|
<slot name="calendar" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -7,6 +34,8 @@
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.main-container-background {
|
.main-container-background {
|
||||||
|
--calendar-current-background-dark: transparent;
|
||||||
|
|
||||||
&.--dark {
|
&.--dark {
|
||||||
background-color: var(--calendar-background-dark);
|
background-color: var(--calendar-background-dark);
|
||||||
}
|
}
|
||||||
|
@ -14,10 +43,25 @@
|
||||||
&.--light {
|
&.--light {
|
||||||
background-color: var(--calendar-background);
|
background-color: var(--calendar-background);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.--bordered {
|
||||||
|
border: 1px solid black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.transparent-background {
|
||||||
|
.q-calendar-month > * {
|
||||||
|
background-color: var(--vn-section-color) !important;
|
||||||
|
--calendar-outside-background-dark: #transparent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-container {
|
.nav-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
|
&.--bordered {
|
||||||
|
border: 1px solid black;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -173,7 +173,12 @@ watch(_year, (newValue) => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QCalendarMonthWrapper style="height: 200px" class="outline">
|
<QCalendarMonthWrapper
|
||||||
|
style="height: 200px"
|
||||||
|
class="outline"
|
||||||
|
bordered
|
||||||
|
transparent-background
|
||||||
|
>
|
||||||
<template #header>
|
<template #header>
|
||||||
<span class="full-width text-center text-body1 q-py-sm">{{
|
<span class="full-width text-center text-body1 q-py-sm">{{
|
||||||
weekdayStore.getLocaleMonths[$props.month - 1].locale
|
weekdayStore.getLocaleMonths[$props.month - 1].locale
|
||||||
|
|
Loading…
Reference in New Issue