邓洁 : 打开弹窗时背景更改
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div id="used-ele">
|
||||
<div id="used-ele" :style="{ backgroundImage: 'url(' +getImageUrl(bgImage)+')' }">
|
||||
<div class="content" @click="handleOpenChart">
|
||||
<div class="item">
|
||||
<div></div>
|
||||
@@ -48,6 +48,11 @@ const isVisited = ref(false);
|
||||
const eleData = ref([])
|
||||
const electricityConsumptionMonthly = ref()
|
||||
const monthlySavings = ref(55555)
|
||||
const bgImage = computed(() =>
|
||||
isVisited.value
|
||||
? "bpq_active.png"
|
||||
: "bg.png"
|
||||
);
|
||||
watch(() => props.eleData, (now) => {
|
||||
getBasicData(now.frequencyChangerList)
|
||||
}, {deep: true});
|
||||
@@ -154,7 +159,9 @@ const initChart = () => {
|
||||
myEcharts.resize();
|
||||
}
|
||||
}
|
||||
|
||||
const getImageUrl = (name) => {
|
||||
return new URL(`../../../assets/images/usedEle/${name}`, import.meta.url).href
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -184,7 +191,6 @@ const initChart = () => {
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
cursor: pointer;
|
||||
|
||||
.item {
|
||||
height: 37px;
|
||||
font-size: 28px;
|
||||
|
||||
Reference in New Issue
Block a user