11<template >
22 <div >
3- <el-dialog
4- v-model =" dialogVisible"
5- :title =" $t('app.checkTitle')"
6- width =" 30%"
7- :close-on-click-modal =" false"
8- :destroy-on-close =" true"
9- >
3+ <DialogPro v-model =" open" :title =" $t('app.checkTitle')" size =" small" >
104 <el-row >
115 <el-col :span =" 22" :offset =" 1" >
126 <el-alert :closable =" false" :title =" $t('file.vscodeHelper')" type =" info" ></el-alert >
3731 </el-button >
3832 </span >
3933 </template >
40- </el-dialog >
34+ </DialogPro >
4135 </div >
4236</template >
4337<script lang="ts" setup>
4438import { reactive , ref } from ' vue' ;
4539import { FormInstance } from ' element-plus' ;
4640
47- const dialogVisible = ref ();
41+ const open = ref ();
4842
4943interface DialogProps {
5044 path: string ;
@@ -60,7 +54,7 @@ const addForm = reactive({
6054
6155const em = defineEmits ([' close' ]);
6256const handleClose = () => {
63- dialogVisible .value = false ;
57+ open .value = false ;
6458 if (vscodeConnectInfoForm .value ) {
6559 vscodeConnectInfoForm .value .resetFields ();
6660 }
@@ -73,7 +67,7 @@ const submit = async (formEl: FormInstance | undefined) => {
7367 return ;
7468 }
7569 localStorage .setItem (' VscodeConnectInfo' , JSON .stringify (addForm ));
76- dialogVisible .value = false ;
70+ open .value = false ;
7771 const vscodeUrl = ` vscode://vscode-remote/ssh-remote+${addForm .username }@${addForm .host }:${addForm .port }${addForm .path }?windowId=_blank ` ;
7872 window .open (vscodeUrl );
7973 });
@@ -91,7 +85,7 @@ const acceptParams = async (params: DialogProps): Promise<void> => {
9185 }
9286
9387 addForm .path = params .path ;
94- dialogVisible .value = true ;
88+ open .value = true ;
9589};
9690
9791defineExpose ({ acceptParams });
0 commit comments