shish 10 месяцев назад
Родитель
Сommit
d1c8d8397d
1 измененных файлов с 62 добавлено и 2 удалено
  1. 62 2
      mallApp/src/components/app-delivery.vue

+ 62 - 2
mallApp/src/components/app-delivery.vue

@@ -51,7 +51,7 @@
 
       <tui-list-cell class="line-cell" :hover="false" v-show="showCardInfo">
         <div class="tui-title">贺卡内容</div>
-        <input v-model="form.cardInfo" placeholder-class="phcolor" placeholder-style="color:#ccc" class="tui-input" name="cardInfo" style="width:100%;" placeholder="请填写" />
+        <textarea v-model="form.cardInfo" placeholder-class="phcolor" placeholder-style="color:#ccc" class="tui-input textarea-input" name="cardInfo" style="width:100%;" placeholder="请填写" :adjust-position="false" :cursor-spacing="0" :auto-height="false" :disable-default-padding="true" :show-confirm-bar="false" />
 
       </tui-list-cell>
 
@@ -70,7 +70,7 @@
     <div class="module-com remark-wrap">
       <tui-list-cell class="line-cell" :hover="false">
         <div class="tui-title">备注内容</div>
-        <input v-model="form.remark" placeholder-class="phcolor" placeholder-style="color:#ccc" class="tui-input" name="remark" placeholder="选填,不要贺卡这里备注" />
+        <textarea v-model="form.remark" placeholder-class="phcolor" placeholder-style="color:#ccc" class="tui-input textarea-input" name="remark" placeholder="选填,不要贺卡这里备注" :adjust-position="false" :cursor-spacing="0" :auto-height="false" :disable-default-padding="true" :show-confirm-bar="false" />
       </tui-list-cell>
     </div>
     <!-- 省市联动 -->
@@ -267,5 +267,65 @@ export default {
       color: $fontColor2;
     }
   }
+
+  // textarea样式 - 彻底解决input文字浮动问题
+  .textarea-input {
+    /* 重置textarea默认样式,使其表现像input */
+    resize: none !important;
+    overflow: hidden !important;
+    border: none !important;
+    outline: none !important;
+    background: transparent !important;
+    padding: 0 !important;
+    margin: 0 !important;
+    
+    /* 固定高度和行高,防止浮动 */
+    height: 88upx !important;
+    max-height: 88upx !important;
+    min-height: 88upx !important;
+    line-height: 88upx !important;
+    
+    /* 字体样式保持一致 */
+    font-size: 28upx !important;
+    font-family: inherit !important;
+    color: inherit !important;
+    
+    /* 文字单行显示,模拟input行为 */
+    white-space: nowrap !important;
+    text-overflow: ellipsis !important;
+    word-wrap: normal !important;
+    word-break: keep-all !important;
+    
+    /* 垂直对齐 */
+    vertical-align: middle !important;
+    text-align: left !important;
+    
+    /* 微信小程序特殊处理 */
+    /* #ifdef MP-WEIXIN */
+    /* 禁用textarea的多行特性 */
+    overflow-y: hidden !important;
+    scrollbar-width: none !important;
+    /* 固定位置,防止键盘影响 */
+    position: relative !important;
+    z-index: 1 !important;
+    /* 禁用文字大小自动调整 */
+    -webkit-text-size-adjust: none !important;
+    text-size-adjust: none !important;
+    /* 强制使用系统字体 */
+    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, sans-serif !important;
+    /* #endif */
+    
+    /* H5环境优化 */
+    /* #ifdef H5 */
+    box-sizing: border-box !important;
+    -webkit-appearance: none !important;
+    appearance: none !important;
+    /* #endif */
+    
+    /* APP环境优化 */
+    /* #ifdef APP-PLUS */
+    box-sizing: border-box !important;
+    /* #endif */
+  }
 }
 </style>