fix (client): MkActiveUsersHeatmap does not take props
This commit is contained in:
parent
e0447ba4a9
commit
8f0cccac7d
1 changed files with 3 additions and 15 deletions
|
@ -8,7 +8,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { nextTick, onMounted, ref, shallowRef, watch } from "vue";
|
||||
import { nextTick, onMounted, ref, shallowRef } from "vue";
|
||||
import { Chart } from "chart.js";
|
||||
import * as os from "@/os";
|
||||
import { defaultStore } from "@/store";
|
||||
|
@ -18,12 +18,8 @@ import { initChart } from "@/scripts/init-chart";
|
|||
|
||||
initChart();
|
||||
|
||||
const props = defineProps<{
|
||||
src: string;
|
||||
}>();
|
||||
|
||||
const rootEl = shallowRef<HTMLDivElement>(null);
|
||||
const chartEl = shallowRef<HTMLCanvasElement>(null);
|
||||
const rootEl = shallowRef<HTMLDivElement>();
|
||||
const chartEl = shallowRef<HTMLCanvasElement>();
|
||||
const now = new Date();
|
||||
let chartInstance: Chart | null = null;
|
||||
const fetching = ref(true);
|
||||
|
@ -203,14 +199,6 @@ async function renderActiveUsersChart() {
|
|||
});
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.src,
|
||||
() => {
|
||||
fetching.value = true;
|
||||
renderActiveUsersChart();
|
||||
},
|
||||
);
|
||||
|
||||
onMounted(async () => {
|
||||
renderActiveUsersChart();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue