merge store overview and home for wide mode
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
<h2 v-text="title" />
|
||||
<span v-if="caption" class="caption" v-text="caption" />
|
||||
</div>
|
||||
<div ref="chartElement" class="chart" :style="{ height }" />
|
||||
<!-- min-height 而非 height:卡片在栅格里被拉伸时图表区能跟着 flex 填满 -->
|
||||
<div ref="chartElement" class="chart" :style="{ minHeight: height }" />
|
||||
<center-tips v-if="loading">
|
||||
<t-loading size="1.5rem" text="加载中" />
|
||||
</center-tips>
|
||||
@@ -78,10 +79,12 @@ function updateChartWidth(): void {
|
||||
<style scoped lang="less">
|
||||
.date-range-chart-card {
|
||||
padding: 1rem;
|
||||
display: flex;
|
||||
position: relative;
|
||||
background: rgba(255, 255, 255, .92);
|
||||
box-shadow: var(--td-shadow-1);
|
||||
border-radius: 1.25rem;
|
||||
flex-direction: column;
|
||||
|
||||
.title {
|
||||
gap: .5rem;
|
||||
@@ -103,18 +106,17 @@ function updateChartWidth(): void {
|
||||
}
|
||||
|
||||
.chart {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
:global(html.theme-dark) {
|
||||
.chart-section {
|
||||
background: rgba(15, 23, 42, .88);
|
||||
box-shadow: 0 .75rem 2rem rgba(2, 6, 23, .32);
|
||||
|
||||
h2 {
|
||||
color: #e2e8f0;
|
||||
}
|
||||
}
|
||||
// :global 必须包住整条选择器,只包第一个 compound 会导致后代选择器被丢弃
|
||||
:global(html.theme-dark .date-range-chart-card) {
|
||||
background: rgba(15, 23, 42, .88);
|
||||
box-shadow: 0 .75rem 2rem rgba(2, 6, 23, .32);
|
||||
}
|
||||
:global(html.theme-dark .date-range-chart-card h2) {
|
||||
color: #e2e8f0;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user