mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 08:20:25 +08:00 
			
		
		
		
	feat: 前端升级至vue3,后端代码结构重构,新增权限管理相关功能
This commit is contained in:
		
							
								
								
									
										39
									
								
								mayfly_go_web/src/views/ops/machine/SshTerminalPage.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								mayfly_go_web/src/views/ops/machine/SshTerminalPage.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,39 @@
 | 
			
		||||
<template>
 | 
			
		||||
    <div class="file-manage">
 | 
			
		||||
        <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 { useRoute } from 'vue-router';
 | 
			
		||||
 | 
			
		||||
export default defineComponent({
 | 
			
		||||
    name: 'SshTerminalPage',
 | 
			
		||||
    components: {
 | 
			
		||||
        SshTerminal,
 | 
			
		||||
    },
 | 
			
		||||
    props: {
 | 
			
		||||
        machineId: { type: Number },
 | 
			
		||||
    },
 | 
			
		||||
    setup() {
 | 
			
		||||
        const route = useRoute();
 | 
			
		||||
        const state = reactive({
 | 
			
		||||
            machineId: 0,
 | 
			
		||||
            height: 700,
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        onBeforeMount(() => {
 | 
			
		||||
            state.height = window.innerHeight;
 | 
			
		||||
            state.machineId = Number.parseInt(route.query.id as string);
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        return {
 | 
			
		||||
            ...toRefs(state),
 | 
			
		||||
        };
 | 
			
		||||
    },
 | 
			
		||||
});
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss">
 | 
			
		||||
</style>
 | 
			
		||||
		Reference in New Issue
	
	Block a user