如何在uniapp input输入框右侧增加单位的解决方法

啥也别想,直接抄吧

<view class="diygw-form-item diygw-col-24">
  <view class="title">参数</view>
  <view class="input solid">
  <!-- 重点 -->
    <text class="diy-icon-recharge" style="color: #07c160"></text>
    
    <view class="input-container">
      <input class="flex1" name="input4" comfirm-type="done" type="text" v-model="specification.warrantyPeriod" placeholder="请输入年份" />
      
       <!-- 重点 -->
      <text class="unit"></text>
    </view>
  </view>
</view>

<style>
 //重点
.input-container {
      
      
  display: flex;
  align-items: center;
}

 //重点
.unit {
      
      
  margin-left: 5px;
  color: #999;
}
</style>

猜你喜欢

转载自blog.csdn.net/a864034462/article/details/130511668