gemercheung преди 2 години
родител
ревизия
17b8583ee7
променени са 5 файла, в които са добавени 43 реда и са изтрити 17 реда
  1. 4 1
      index.html
  2. 1 1
      package.json
  3. 5 5
      pnpm-lock.yaml
  4. 1 0
      public/viewer/static/lib/inobounce.js
  5. 32 10
      src/components/chatRoom/dialog/password.vue

+ 4 - 1
index.html

@@ -4,7 +4,8 @@
     <meta charset="UTF-8" />
     <meta charset="utf-8" />
     <meta http-equiv="X-UA-Compatible" content="IE=edge" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
+
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
     <link rel="icon" href="//4dkk.4dage.com/FDKKIMG/icon/kankan_icon.ico" />
 
     <link rel="stylesheet" href="//at.alicdn.com/t/font_2596172_ejg30arrayu.css" />
@@ -19,6 +20,7 @@
     />
     <script src="<{BASE_URL}><{VITE_APP_STATIC_DIR}>/static/lib/mobile-detect.js"></script>
     <script src="<{BASE_URL}><{VITE_APP_STATIC_DIR}>/static/lib/flexible.min.js"></script>
+    <script src="<{BASE_URL}><{VITE_APP_STATIC_DIR}>/static/lib/inobounce.js"></script>
     <script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
     <title></title>
   </head>
@@ -31,6 +33,7 @@
     <script src="<{BASE_URL}><{VITE_APP_STATIC_DIR}>/static/lib/vconsole.js"></script>
     <script src="<{BASE_URL}><{VITE_APP_STATIC_DIR}>/static/lib/swiper/swiper-bundle.min.js"></script>
     <script src="<{BASE_URL}><{VITE_APP_STATIC_DIR}>/static/lib/socket.io.msgpack.min.js"></script>
+
     <script src="<{BASE_URL}><{VITE_APP_STATIC_DIR}>/static/lib/zmjm.min.js"></script>
     <script src="<{BASE_URL}><{VITE_APP_STATIC_DIR}>/static/lib/jweixin-1.6.0.js"></script>
 

+ 1 - 1
package.json

@@ -31,7 +31,7 @@
     "vue": "^3.2.41",
     "vue-i18n": "^9.2.2",
     "vue-types": "^4.2.1",
-    "vue3-otp-input": "^0.3.6"
+    "vue3-otp-input": "^0.4.1"
   },
   "devDependencies": {
     "@types/node": "^18.11.7",

+ 5 - 5
pnpm-lock.yaml

@@ -44,7 +44,7 @@ specifiers:
   vue-i18n: ^9.2.2
   vue-tsc: ^1.0.9
   vue-types: ^4.2.1
-  vue3-otp-input: ^0.3.6
+  vue3-otp-input: ^0.4.1
   windicss: ^3.5.6
 
 dependencies:
@@ -61,7 +61,7 @@ dependencies:
   vue: 3.2.41
   vue-i18n: 9.2.2_vue@3.2.41
   vue-types: 4.2.1_vue@3.2.41
-  vue3-otp-input: 0.3.6_vue@3.2.41
+  vue3-otp-input: 0.4.1_vue@3.2.41
 
 devDependencies:
   '@types/node': 18.11.7
@@ -5868,9 +5868,9 @@ packages:
       '@vue/server-renderer': 3.2.41_vue@3.2.41
       '@vue/shared': 3.2.41
 
-  /vue3-otp-input/0.3.6_vue@3.2.41:
-    resolution: {integrity: sha512-08A/33P3dvk8DBQ6ACJ6ajNCNdkJL2Di5CVVLxcYK7+izM4KFMeWsFnZsx2fD0VfLE7t6jpi+cNgNU83nP7/TQ==}
-    engines: {node: '>=14.0.0', npm: '>=7.0.0'}
+  /vue3-otp-input/0.4.1_vue@3.2.41:
+    resolution: {integrity: sha512-wVl9i3DcWlO0C7fBI9V+RIP3crm/1tY72fuhvb3YM2JfbLoYofB96aPl5AgFhA0Cse5bQEMYtIvOeiqW3rfbAw==}
+    engines: {node: '>=16.0.0', npm: '>=8.0.0'}
     peerDependencies:
       vue: ^3.0.*
     dependencies:

Файловите разлики са ограничени, защото са твърде много
+ 1 - 0
public/viewer/static/lib/inobounce.js


+ 32 - 10
src/components/chatRoom/dialog/password.vue

@@ -6,7 +6,8 @@
       <div class="content">
         <div class="dialog_title">请输入房间密码</div>
         <div class="pass_container">
-          <v-otp-input
+          <input v-model.trim="password" class="pass-input" type="password" maxlength="4"/>
+          <!-- <v-otp-input
             class="otp-input-container"
             ref="otpInput"
             input-classes="otp-input"
@@ -19,11 +20,13 @@
             :placeholder="['*', '*', '*', '*']"
             @on-change="handleOnChange"
             @on-complete="handleOnComplete"
-          />
+          /> -->
         </div>
 
         <div class="created_btn">
-          <div class="created_cancel" v-if="!isSingle" @click="closeCreated">{{ t('base.cancel') }}</div>
+          <div class="created_cancel" v-if="!isSingle" @click="closeCreated">{{
+            t('base.cancel')
+          }}</div>
           <div class="created_confirm" @click="createdConfirm">{{ t('base.confirm') }}</div>
         </div>
       </div>
@@ -39,7 +42,7 @@
   import { useI18n } from '/@/hooks/useI18n';
   import browser from '/@/utils/browser';
   // import { useSocket } from '/@/hooks/userSocket';
-  import VOtpInput from 'vue3-otp-input';
+  // import VOtpInput from 'vue3-otp-input';
   import { useRoom } from '/@/hooks/useRoom';
   import { useRtcStore } from '/@/store/modules/rtc';
 
@@ -60,7 +63,7 @@
     isSingle: {
       type: Boolean,
       default: false,
-    }
+    },
   });
   watchEffect(() => {
     ifShow.value = props.show;
@@ -86,12 +89,12 @@
       }
     }
   };
-  const handleOnChange = () => {};
+  // const handleOnChange = () => {};
 
-  const handleOnComplete = (value: string) => {
-    console.log('OTP completed: ', value);
-    password.value = value;
-  };
+  // const handleOnComplete = (value: string) => {
+  //   console.log('OTP completed: ', value);
+  //   password.value = value;
+  // };
 </script>
 
 <style lang="scss">
@@ -315,10 +318,29 @@
       -webkit-appearance: none;
       margin: 0;
     }
+    
+    input {
+      outline: none;
+      
+    }
     input::placeholder {
       font-size: 15px;
       text-align: center;
       font-weight: 600;
     }
+    .pass-input{
+      background: rgba(255, 255, 255, 0.8);
+      width: 80%;
+      margin:  0 auto;
+      color: #000;
+      padding: 10px;
+      border-radius: 4px;
+    }
   }
 </style>
+<style lang="scss">
+  html:focus-within {
+    margin: 0 !important;
+  }
+
+</style>