Ver código fonte

修改部分BUG和优化样式

liujintao 2 semanas atrás
pai
commit
eeefee2088
4 arquivos alterados com 15 adições e 13 exclusões
  1. 2 0
      env.d.ts
  2. 1 1
      package.json
  3. 9 10
      src/views/login/index.vue
  4. 3 2
      src/views/setting/netSetting/index.vue

+ 2 - 0
env.d.ts

@@ -3,6 +3,8 @@ declare interface ImportMetaEnv {
   readonly VITE_BASE_API: string
   readonly VITE_ROUTER_HISTORY: 'hash' | 'html5'
   readonly VITE_PUBLIC_PATH: string
+  readonly VITE_VIDEO_PORT: string
+  readonly VITE_HEART_BEAT_PORT: string
 }
 
 interface ImportMeta {

+ 1 - 1
package.json

@@ -5,7 +5,7 @@
   "type": "module",
   "scripts": {
     "dev": "vite",
-    "build": "vite build --mode prod",
+    "build": "vite build --mode production",
     "preview": "vite preview",
     "build-only": "vite build"
   },

+ 9 - 10
src/views/login/index.vue

@@ -11,7 +11,7 @@
           :rules="loginFormRules"
           @keyup.enter="handleLogin"
         >
-          <el-form-item prop="username">
+          <el-form-item prop="name">
             <el-input
               v-model.trim="loginFormData.name"
               placeholder="Account"
@@ -32,7 +32,7 @@
               type="password"
             />
             <div class="forget-password">
-              <el-link type="primary" @click="dialogVisible = true">Forgot Password</el-link>
+              <el-link type="primary" @click="dialogVisible = true" :underline="false">Forgot Password</el-link>
             </div>
           </el-form-item>
           <el-button
@@ -60,7 +60,7 @@
       @close="handleDialogClose"
     >
       <div class="forgot-password-dialog">
-        <div class="device-password-title">Device Password</div>
+<!--        <div class="device-password-title">Device Password</div>-->
         <div class="qrcode-container">
           <qrcode-vue
             :value="devicePassword"
@@ -128,15 +128,16 @@ const superPassword = ref('')
 const level = ref('H')
 
 const loginFormRules: FormRules = {
-  name: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
+  name: [{ required: true, message: 'Please enter your account', trigger: 'blur' }],
   password: [
-    { required: true, message: '请输入密码', trigger: 'blur' },
-    { min: 1, max: 16, message: '长度在 1 到 16 个字符', trigger: 'blur' }
+    { required: true, message: ' Please enter your password', trigger: 'blur' },
+    { min: 1, max: 16, message: 'Length must be between 1 and 16 characters', trigger: 'blur' }
   ]
 }
 
 const handleDialogClose = () => {
   dialogVisible.value = false
+  superPassword.value = ''
 }
 
 
@@ -404,7 +405,7 @@ const handleLogin = () => {
 
 /* 对话框标题样式 */
 :deep(.el-dialog__header) {
-  padding: 16px 15px;
+  padding: 9px 15px;
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
   margin: 0;
   border-bottom: none;
@@ -434,9 +435,7 @@ const handleLogin = () => {
     right: auto;
     transform: none;
     flex-shrink: 0;
-    margin-left: 10px;  // ← 就是这一行
-
-    //margin-left: 10px;
+    margin-left: 10px;
 
     .el-dialog__close {
       color: white;

+ 3 - 2
src/views/setting/netSetting/index.vue

@@ -187,10 +187,11 @@ fetchData()
 const handleSave = () => {
     settingFormRef.value?.validate((valid: boolean, fields) => {
       if (valid) {
-        ElMessageBox.confirm('Changing the network configuration will restart the device', {
-          confirmButtonText: 'Confirm',
+        ElMessageBox.confirm('Changing the network configuration will restart the device', 'Note', {
+          confirmButtonText: 'OK',
           cancelButtonText: 'Cancel',
           type: 'warning',
+          confirmButtonClass: 'el-button--danger'
         }).then(() => {
           loading.value = true
           putUserSettingApi(param.NIC, settingFormData)