2021-06-25 21:55:49 +08:00
|
|
|
<template>
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row">
|
2022-05-08 20:03:24 +02:00
|
|
|
<div v-if="!$root.isMobile" class="col-12 col-md-5 col-xl-4">
|
2022-09-17 22:09:09 +08:00
|
|
|
<div>
|
|
|
|
<router-link to="/add" class="btn btn-primary mb-3"><font-awesome-icon icon="plus" /> {{ $t("Add New Monitor") }}</router-link>
|
|
|
|
</div>
|
2021-09-02 01:56:02 +08:00
|
|
|
<MonitorList :scrollbar="true" />
|
2021-06-25 21:55:49 +08:00
|
|
|
</div>
|
2021-08-19 18:05:14 +08:00
|
|
|
|
2023-08-03 14:07:01 +01:00
|
|
|
<div ref="container" class="col-12 col-md-7 col-xl-8 mb-3">
|
2021-08-29 15:28:43 -07:00
|
|
|
<!-- Add :key to disable vue router re-use the same component -->
|
2023-08-03 14:07:01 +01:00
|
|
|
<router-view :key="$route.fullPath" :calculatedHeight="height" />
|
2021-06-25 21:55:49 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
2021-08-19 18:05:14 +08:00
|
|
|
import MonitorList from "../components/MonitorList.vue";
|
2021-06-27 16:10:55 +08:00
|
|
|
|
2021-06-25 21:55:49 +08:00
|
|
|
export default {
|
|
|
|
components: {
|
2021-08-19 18:05:14 +08:00
|
|
|
MonitorList,
|
2021-06-25 21:55:49 +08:00
|
|
|
},
|
|
|
|
data() {
|
2023-08-03 14:07:01 +01:00
|
|
|
return {
|
|
|
|
height: 0
|
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.height = this.$refs.container.offsetHeight;
|
2021-06-25 21:55:49 +08:00
|
|
|
},
|
2022-04-14 00:30:32 +08:00
|
|
|
};
|
2021-06-25 21:55:49 +08:00
|
|
|
</script>
|
|
|
|
|
2021-08-08 07:47:29 +02:00
|
|
|
<style lang="scss" scoped>
|
2021-06-25 21:55:49 +08:00
|
|
|
.container-fluid {
|
2021-08-24 23:38:25 +08:00
|
|
|
width: 98%;
|
2021-06-25 21:55:49 +08:00
|
|
|
}
|
|
|
|
</style>
|