mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-02 23:40:24 +08:00
31 lines
608 B
Vue
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>
|