Planner: faster loading (#12673)
This commit is contained in:
parent
7e59b889b0
commit
f41901baf6
2 changed files with 11 additions and 4 deletions
|
|
@ -23,7 +23,7 @@
|
|||
{{ $t(`main.targetCharge.${isPreview ? "preview" : "currentPlan"}`) }}
|
||||
</div>
|
||||
</h5>
|
||||
<ChargingPlanPreview v-if="chargingPlanPreviewProps" v-bind="chargingPlanPreviewProps" />
|
||||
<ChargingPlanPreview v-bind="chargingPlanPreviewProps" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -136,6 +136,10 @@ export default {
|
|||
}
|
||||
},
|
||||
fetchPlanDebounced: async function (preview) {
|
||||
if (!this.debounceTimer) {
|
||||
await this.fetchPlan(preview);
|
||||
return;
|
||||
}
|
||||
clearTimeout(this.debounceTimer);
|
||||
this.debounceTimer = setTimeout(async () => await this.fetchPlan(preview), 1000);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -90,9 +90,9 @@ export default {
|
|||
priceStyle(price) {
|
||||
const value = price === undefined ? this.avgPrice : price;
|
||||
const height =
|
||||
value !== undefined
|
||||
value !== undefined && !isNaN(value)
|
||||
? `${10 + (90 / this.priceInfo.range) * (value - this.priceInfo.min)}%`
|
||||
: "100%";
|
||||
: "75%";
|
||||
return { height };
|
||||
},
|
||||
},
|
||||
|
|
@ -116,7 +116,9 @@ export default {
|
|||
flex-direction: column;
|
||||
position: relative;
|
||||
opacity: 1;
|
||||
transition: opacity var(--evcc-transition-fast) linear;
|
||||
transition-property: opacity, background, color;
|
||||
transition-duration: var(--evcc-transition-fast);
|
||||
transition-timing-function: ease-in;
|
||||
}
|
||||
@media (max-width: 991px) {
|
||||
.chart {
|
||||
|
|
@ -148,6 +150,7 @@ export default {
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
color: var(--bs-white);
|
||||
transition: height var(--evcc-transition-fast) ease-in;
|
||||
}
|
||||
.slot-label {
|
||||
color: var(--bs-gray-light);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue