Files
mayfly-go/mayfly_go_web/src/views/ops/machine/SshTerminalPage.vue
2022-10-29 20:08:15 +08:00

31 lines
608 B
Vue

<template>
<div>
<ssh-terminal ref="terminal" :machineId="machineId" :height="height + 'px'" />
</div>
</template>
<script lang="ts" setup>
import SshTerminal from './SshTerminal.vue';
import { reactive, toRefs, onMounted } from 'vue';
import { useRoute } from 'vue-router';
const route = useRoute();
const state = reactive({
machineId: 0,
height: 700,
});
const {
machineId,
height,
} = toRefs(state)
onMounted(() => {
state.height = window.innerHeight + 5;
state.machineId = Number.parseInt(route.query.id as string);
});
</script>
<style lang="scss">
</style>