mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
fix: 解决重复访问容器内部时,终端显示宽度异常的问题 (#3996)
This commit is contained in:
parent
121a1ff5da
commit
c510a028db
@ -44,13 +44,17 @@
|
||||
{{ $t('commons.button.conn') }}
|
||||
</el-button>
|
||||
<el-button v-else @click="onClose()">{{ $t('commons.button.disconn') }}</el-button>
|
||||
<Terminal style="height: calc(100vh - 302px)" ref="terminalRef"></Terminal>
|
||||
<Terminal
|
||||
style="height: calc(100vh - 302px); margin-top: 18px"
|
||||
ref="terminalRef"
|
||||
v-if="terminalOpen"
|
||||
></Terminal>
|
||||
</el-form>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { reactive, ref, nextTick } from 'vue';
|
||||
import { ElForm, FormInstance } from 'element-plus';
|
||||
import { Rules } from '@/global/form-rules';
|
||||
import Terminal from '@/components/terminal/index.vue';
|
||||
@ -91,6 +95,7 @@ const initTerm = (formEl: FormInstance | undefined) => {
|
||||
formEl.validate(async (valid) => {
|
||||
if (!valid) return;
|
||||
terminalOpen.value = true;
|
||||
await nextTick();
|
||||
terminalRef.value!.acceptParams({
|
||||
endpoint: '/api/v1/containers/exec',
|
||||
args: `containerid=${form.containerID}&user=${form.user}&command=${form.command}`,
|
||||
|
Loading…
x
Reference in New Issue
Block a user