ljc 3 часов назад
Родитель
Сommit
b8ca1c8db4

+ 4 - 1
components/cwg-droplist.vue

@@ -30,6 +30,7 @@ import { ref, computed, getCurrentInstance, onUnmounted, nextTick } from 'vue'
 
 // 导入 cwg-droplist-item 以便在组件内部直接使用
 import CwgDroplistItem from './cwg-droplist-item.vue'
+import { useWindowWidth } from '@/composables/useWindowWidth'
 
 const props = defineProps({
   // 传入的菜单列表,支持简单数组 ['A', 'B'] 或对象数组 [{ label: 'A', command: 'a', disabled: true, row: row }]
@@ -62,6 +63,8 @@ const props = defineProps({
 const emit = defineEmits(['visible-change', 'command', 'menuClick'])
 
 const instance = getCurrentInstance()
+const windowWidth = useWindowWidth(300)
+const isMobile = computed(() => windowWidth.value <= 990)
 const isShow = ref(false)
 const menuStyle = ref({})
 
@@ -142,7 +145,7 @@ const openMenu = async () => {
       finalTop = bottom + props.offset
     }
   } else { // bottom
-    finalTop = bottom + props.offset
+    finalTop = bottom + (isMobile.value ? 4 : props.offset)
     // 防溢出检测:如果下方空间不够,且上方空间足够,向上翻转
     if (finalTop + menuHeight > windowHeight && top - menuHeight - props.offset > 0) {
       finalTop = top - menuHeight - props.offset

+ 1 - 1
components/cwg-page-wrapper.vue

@@ -12,7 +12,7 @@
     <cwg-progress />
 
     <view class="page-content" :style="{ backgroundColor: bgColor }">
-      <cwg-match-media :max-width="990" v-if="!isLoginPage">
+      <cwg-match-media :max-width="991" v-if="!isLoginPage">
         <view class="left-sidebar" :class="{ 'sidebar-visible': sidebarVisible }">
           <cwg-sidebar @handle-click="openLeftDrawer" />
         </view>

+ 8 - 0
pages/customer/components/AccountCard.vue

@@ -339,6 +339,14 @@ onBeforeUnmount(() => {
 <style scoped lang="scss">
 @import '@/uni.scss';
 
+.btn-group{
+  @media screen and (max-width: 991px) {
+    :deep(.cwg-dropdown-menu-container) {
+      right: px2rpx(0) !important;
+    }
+  }
+}
+
 .cwg-close {
     width: px2rpx(20);
     height: px2rpx(20);

+ 1 - 1
pages/ib/index.vue

@@ -137,7 +137,7 @@
                 <text class="header-title">{{ t('Ib.Index.MAMList') }}</text>
               </view>
               <view class="header-right" v-if="showAddMamAccount">
-                <cwg-droplist :menu-list="addMamAccountMenus" @menuClick="handleAddMamAccountMenuClick">
+                <cwg-droplist :menu-list="addMamAccountMenus" @menuClick="handleAddMamAccountMenuClick" >
                   <button type="button" class="btn btn-danger btn-shadow waves-effect add-mam-btn">
                     <cwg-icon name="icon_add" :size="16" color="#fff" />{{ t('Custom.Index.AddAccount') }}</button>
                 </cwg-droplist>

+ 4 - 3
pages/login/components/LoginHeaderGroup.vue

@@ -4,9 +4,10 @@
     <view class="header-item">
       <cwg-system :text-color="textColor" :icon-color="iconColor" event-source="login" />
     </view>
-    <!-- #endif -->
     <view class="divider" :style="{ backgroundColor: dividerColor }"></view>
-    <view class="header-item" style="margin-right: 10rpx">
+    <!-- #endif -->
+
+    <view class="header-item" >
       <cwg-language :text-color="textColor" :icon-color="iconColor" />
     </view>
   </view>
@@ -39,7 +40,7 @@ const dividerColor = computed(() => {
 .login-header-group {
   display: flex;
   align-items: center;
-  padding: px2rpx(4) 0;
+  padding: px2rpx(4) px2rpx(24) px2rpx(4) 0;
   height: px2rpx(36);
 
   .header-item {