Blogger Information
Blog 43
fans 0
comment 3
visits 26532
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
uniapp uView2.0 input组件,数字统计showWordLimit去除,改底层input组件添加
Time
Original
735 people have browsed it

引用input组件添加数字统计showWordLimit=”true”

  1. <u--input type="text" maxlength="10" placeholder="请填写具体诊断" border="none" @change="change"
  2. placeholderStyle="color:#CCCCCC;font-size: 28rpx;height: 40rpx;font-weight: 500;line-height: 33rpx;" showWordLimit="true"></u--input>

文件uni-modules/components/u-input/u-input.vue添加修改代码

  1. //在input标签后添加:
  2. <text
  3. class="u-input__showWordLimit"
  4. :style="{
  5. 'background-color': disabled ? 'transparent' : '#fff',
  6. }"
  7. v-if="showWordLimit"
  8. >{{ innerValue.length }}/{{ maxlength }}</text>
  9. //style里.u-input下添加
  10. &__showWordLimit {
  11. position: absolute;
  12. right: 5px;
  13. bottom: 2px;
  14. font-size: 12px;
  15. color: $u-tips-color;
  16. background-color: #ffffff;
  17. padding: 1px 4px;
  18. }
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!