This commit is contained in:
syuilo
2022-01-04 15:36:14 +09:00
parent 23efba6193
commit 6a5713f5e5
14 changed files with 231 additions and 624 deletions

View File

@ -170,10 +170,10 @@ export default defineComponent({
aspectRatio: props.aspectRatio || 2.5,
layout: {
padding: {
left: 16,
right: 16,
top: 16,
bottom: 8,
left: 0,
right: 0,
top: 0,
bottom: 0,
},
},
scales: {

View File

@ -1,5 +1,5 @@
<template>
<div v-size="{ max: [500] }" v-sticky-container class="vrtktovh _formBlock">
<div class="vrtktovh _formBlock">
<div class="label"><slot name="label"></slot></div>
<div class="main _formRoot">
<slot></slot>
@ -12,10 +12,8 @@
<style lang="scss" scoped>
.vrtktovh {
margin: 0;
border-top: solid 0.5px var(--divider);
border-bottom: solid 0.5px var(--divider);
padding: 24px 0;
& + .vrtktovh {
border-top: none;
@ -31,7 +29,7 @@
> .label {
font-weight: bold;
padding: 0 0 16px 0;
margin: 1.5em 0 16px 0;
&:empty {
display: none;
@ -39,6 +37,7 @@
}
> .main {
margin: 1.5em 0;
}
}
</style>

View File

@ -111,7 +111,7 @@ export default defineComponent({
}
> .label {
margin-left: 16px;
margin-left: 12px;
margin-top: 2px;
display: block;
transition: inherit;

View File

@ -40,7 +40,7 @@ export default defineComponent({
return;
}
if (rect.width > props.contentMax || rect.width > 500) {
if (rect.width > props.contentMax || (rect.width > 360 && window.innerWidth > 400)) {
margin.value = props.marginMax;
} else {
margin.value = props.marginMin;

View File

@ -1,5 +1,5 @@
<template>
<div class="zbcjwnqg" style="margin-top: -8px;">
<div class="zbcjwnqg">
<div class="selects" style="display: flex;">
<MkSelect v-model="chartSrc" style="margin: 0; flex: 1;">
<optgroup :label="$ts.federation">
@ -29,16 +29,16 @@
<option value="day">{{ $ts.perDay }}</option>
</MkSelect>
</div>
<MkChart :src="chartSrc" :span="chartSpan" :limit="chartLimit" :detailed="detailed"></MkChart>
<div class="chart">
<MkChart :src="chartSrc" :span="chartSpan" :limit="chartLimit" :detailed="detailed"></MkChart>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent, onMounted, ref, watch } from 'vue';
import { defineComponent, ref } from 'vue';
import MkSelect from '@/components/form/select.vue';
import MkChart from '@/components/chart.vue';
import * as os from '@/os';
import { defaultStore } from '@/store';
export default defineComponent({
components: {
@ -74,7 +74,10 @@ export default defineComponent({
<style lang="scss" scoped>
.zbcjwnqg {
> .selects {
padding: 8px 16px 0 16px;
}
> .chart {
padding: 8px 0 0 0;
}
}
</style>

View File

@ -1,5 +1,5 @@
<template>
<div class="alqyeyti">
<div class="alqyeyti" :class="{ oneline }">
<div class="key">
<slot name="key"></slot>
</div>
@ -22,6 +22,11 @@ export default defineComponent({
required: false,
default: null,
},
oneline: {
type: Boolean,
required: false,
default: false,
},
},
setup(props) {
@ -39,10 +44,30 @@ export default defineComponent({
<style lang="scss" scoped>
.alqyeyti {
> .key, > .value {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
> .key {
font-size: 0.85em;
padding: 0 0 0.25em 0;
opacity: 0.75;
}
&.oneline {
display: flex;
> .key {
width: 30%;
font-size: 1em;
padding: 0 8px 0 0;
}
> .value {
width: 70%;
}
}
}
</style>