gemercheung 2 éve
szülő
commit
2d29099524

+ 2 - 2
src/components/chatRoom/dialog/createdName.vue

@@ -18,12 +18,12 @@
         <div class="user_name">
           <input
             class="input_name"
-            maxlength="20"
+            maxlength="15"
             v-model.trim="userName"
             type="text"
             :placeholder="t('base.nickNameRequired')"
           />
-          <span class="limitNum">{{ userName.length }}/20</span>
+          <span class="limitNum">{{ userName.length }}/15</span>
         </div>
         <!-- <div v-if="role!='customer'" class="mode_btn">
           <div @click="chooseMode(i.mode)" v-for="i,index in modeList" :key="index" :class="{ active: mode==i.mode }" class="mode">{{i.title}}</div>

+ 1 - 0
src/components/chatRoom/memberList.vue

@@ -129,6 +129,7 @@
       width: 11rem;
       margin: 0 auto;
       transform: translate(-50%, 0);
+      background: none !important;
       left: 50% !important;
     }
   }

+ 25 - 5
src/components/chatRoom/share.vue

@@ -28,7 +28,16 @@
 </template>
 
 <script setup lang="ts">
-  import { onMounted, defineProps, defineEmits, ref, unref, watchEffect } from 'vue';
+  import {
+    onMounted,
+    defineProps,
+    defineEmits,
+    ref,
+    unref,
+    watchEffect,
+    nextTick,
+    onUnmounted,
+  } from 'vue';
   import ClipboardJS from 'clipboard';
   import Dialog from '/@/components/basic/dialog';
   import { useI18n } from '/@/hooks/useI18n';
@@ -51,16 +60,27 @@
   });
   const copylink$ = ref<Nullable<HTMLElement>>(null);
   const show = ref(false);
+  let copyInstance: ClipboardJS;
   const closeCreated = () => {
     show.value = false;
     emit('close');
   };
 
-  const createdConfirm = () => {
+  onMounted(() => {
+    const ele = unref(copylink$) as any as HTMLElement;
+    copyInstance = new ClipboardJS(ele);
+    copyInstance.on('success', (e) => {
+      e.clearSelection();
+    });
+  });
+  onUnmounted(() => {
+    copyInstance.destroy();
+  });
+
+  const createdConfirm = async () => {
     if (unref(copylink$)) {
-      const ele = unref(copylink$) as any as HTMLElement;
-      new ClipboardJS(ele).on('success', function (e) {
-        e.clearSelection();
+      await nextTick(() => {
+        console.log('copySuccess');
         Dialog.toast({ content: t('base.copyShareSuccess'), type: 'success' });
         setTimeout(() => {
           show.value = false;

+ 1 - 1
src/locales/lang/en/base.ts

@@ -29,7 +29,7 @@ export default {
   nickNameRequired: 'Please input your’s nickname!',
   joinRoom: 'Enter the studio',
   hoster: 'hoster',
-  audioPermission: '继续访问该页面需要获取您摄像头及麦克风的权限。',
+  audioPermission: 'To continue viewing this page, we require camera and microphone access.',
   nickNameRegrexError:
     'The nickname is limited to 1 to 15 characters in Chinese, English, digits, or underscores.',
   silent: 'silent',