feat: 设置功能新增ssh终端样式自定义

This commit is contained in:
meilin.huang
2022-01-21 16:39:38 +08:00
parent db923eace7
commit 8f912ead2e
6 changed files with 167 additions and 78 deletions

View File

@@ -1,12 +1,12 @@
<template>
<div class="file-manage">
<div>
<ssh-terminal ref="terminal" :machineId="machineId" :height="height + 'px'" />
</div>
</template>
<script lang="ts">
import SshTerminal from './SshTerminal.vue';
import { reactive, toRefs, onBeforeMount, defineComponent } from 'vue';
import { reactive, toRefs, onBeforeMount, defineComponent, onMounted } from 'vue';
import { useRoute } from 'vue-router';
export default defineComponent({
@@ -24,7 +24,7 @@ export default defineComponent({
height: 700,
});
onBeforeMount(() => {
onMounted(() => {
state.height = window.innerHeight;
state.machineId = Number.parseInt(route.query.id as string);
});