提交 fc58559a 编写于 作者: taohebin@dcloud.io's avatar taohebin@dcloud.io

fix: 批量处理 input&textarea 增加maxlength属性

上级 db27b546
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
</view> </view>
</view> </view>
<view class="input-wrapper"> <view class="input-wrapper">
<input class="uni-input" :type="inputType" :value="inputClearValue" :placeholder="title" @input="input" @blur="blur" <input class="uni-input" :type="inputType" :value="inputClearValue" :placeholder="title" maxlength="-1" @input="input" @blur="blur"
@focus="focus" /> @focus="focus" />
<image class="input-wrapper_image" src="/static/icons/clear.png" v-if="showClearIcon" @click="clearIcon"> <image class="input-wrapper_image" src="/static/icons/clear.png" v-if="showClearIcon" @click="clearIcon">
</image> </image>
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
图片质量(%) 图片质量(%)
</view> </view>
<view class="uni-list-cell-right"> <view class="uni-list-cell-right">
<input :value="cropPercent" @confirm="cropPercentConfim" type="number" /> <input :value="cropPercent" @confirm="cropPercentConfim" type="number" maxlength="-1"/>
</view> </view>
</view> </view>
<view class="uni-list-cell cell-pd"> <view class="uni-list-cell cell-pd">
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
裁剪宽度(px) 裁剪宽度(px)
</view> </view>
<view class="uni-list-cell-right"> <view class="uni-list-cell-right">
<input :value="cropWidth" @confirm="cropWidthConfim" type="number" /> <input :value="cropWidth" @confirm="cropWidthConfim" type="number" maxlength="-1"/>
</view> </view>
</view> </view>
<view class="uni-list-cell cell-pd"> <view class="uni-list-cell cell-pd">
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
裁剪高度(px) 裁剪高度(px)
</view> </view>
<view class="uni-list-cell-right"> <view class="uni-list-cell-right">
<input :value="cropHeight" @confirm="cropHeightConfim" type="number" /> <input :value="cropHeight" @confirm="cropHeightConfim" type="number" maxlength="-1"/>
</view> </view>
</view> </view>
<view class="uni-list-cell cell-pd"> <view class="uni-list-cell cell-pd">
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
<view class="uni-padding-wrap uni-common-mt"> <view class="uni-padding-wrap uni-common-mt">
<view class="uni-btn-v uni-common-mt"> <view class="uni-btn-v uni-common-mt">
<input class="uni-input" type="text" v-model="realName" name="real-name" <input class="uni-input" type="text" v-model="realName" name="real-name"
placeholder="姓名" /> placeholder="姓名" maxlength="-1"/>
</view> </view>
<view class="uni-btn-v uni-common-mt"> <view class="uni-btn-v uni-common-mt">
<input class="uni-input" type="text" v-model="idCard" name="id-card" <input class="uni-input" type="text" v-model="idCard" name="id-card"
placeholder="身份证号" /> placeholder="身份证号" maxlength="-1"/>
</view> </view>
<view class="uni-btn-v uni-common-mt"> <view class="uni-btn-v uni-common-mt">
<button type="primary" @click="facialRecognition">开始人脸识别</button> <button type="primary" @click="facialRecognition">开始人脸识别</button>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view style="flex: 1;"> <view style="flex: 1;">
<view class="uni-padding-wrap uni-common-mt"> <view class="uni-padding-wrap uni-common-mt">
<view class="uni-common-mt" style="border-width: 2px;border-style: solid; border-radius: 4px;"> <view class="uni-common-mt" style="border-width: 2px;border-style: solid; border-radius: 4px;">
<textarea :value="res" class="uni-textarea"></textarea> <textarea :value="res" class="uni-textarea" maxlength="-1"></textarea>
</view> </view>
<view> <view>
<text>地址 : {{ host + url}}</text> <text>地址 : {{ host + url}}</text>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<view class="uni-label">key</view> <view class="uni-label">key</view>
</view> </view>
<view class="uni-list-cell-db"> <view class="uni-list-cell-db">
<input class="uni-input" type="text" placeholder="请输入key" name="key" :value="key" @input="keyChange" /> <input class="uni-input" type="text" placeholder="请输入key" name="key" :value="key" maxlength="-1" @input="keyChange" />
</view> </view>
</view> </view>
<view class="uni-list-cell"> <view class="uni-list-cell">
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</view> </view>
<view class="uni-list-cell-db"> <view class="uni-list-cell-db">
<input class="uni-input" type="text" placeholder="请输入value" name="data" <input class="uni-input" type="text" placeholder="请输入value" name="data"
:value="typeof data === 'string' ? data : JSON.stringify(data)" @input="dataChange" /> :value="typeof data === 'string' ? data : JSON.stringify(data)" maxlength="-1" @input="dataChange" />
</view> </view>
</view> </view>
</view> </view>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<form @submit="onFormSubmit" @reset="onFormReset"> <form @submit="onFormSubmit" @reset="onFormReset">
<view class="uni-form-item"> <view class="uni-form-item">
<view class="title">姓名</view> <view class="title">姓名</view>
<input class="uni-input" name="nickname" :value="nickname" placeholder="请输入姓名" /> <input class="uni-input" name="nickname" :value="nickname" placeholder="请输入姓名" maxlength="-1"/>
</view> </view>
<view class="uni-form-item"> <view class="uni-form-item">
<view class="title">性别</view> <view class="title">性别</view>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</view> </view>
<view class="form-item"> <view class="form-item">
<text class="form-item-label">备注</text> <text class="form-item-label">备注</text>
<textarea class="form-item-input" placeholder="备注" name="comment" /> <textarea class="form-item-input" placeholder="备注" name="comment" maxlength="-1"/>
</view> </view>
<view class="form-item"> <view class="form-item">
<text class="form-item-label">性别</text> <text class="form-item-label">性别</text>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</view> </view>
<view class="form-item"> <view class="form-item">
<text class="form-item-label">备注</text> <text class="form-item-label">备注</text>
<textarea class="form-item-input" placeholder="备注" name="comment" :value="data[0].getString('comment')" /> <textarea class="form-item-input" placeholder="备注" name="comment" maxlength="-1" :value="data[0].getString('comment')" />
</view> </view>
<view class="form-item"> <view class="form-item">
<text class="form-item-label">性别</text> <text class="form-item-label">性别</text>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<!-- #ifdef APP --> <!-- #ifdef APP -->
<view class="uni-padding-wrap uni-common-mt"> <view class="uni-padding-wrap uni-common-mt">
<view class="uni-input-v"> <view class="uni-input-v">
<input class="uni-input" confirmType="go" placeholder="输入网址跳转" @confirm="confirm" /> <input class="uni-input" confirmType="go" placeholder="输入网址跳转" @confirm="confirm" maxlength="-1"/>
</view> </view>
<view class="uni-row uni-btn-v"> <view class="uni-row uni-btn-v">
<button class="uni-flex-item" type="primary" @click="back">后退</button> <button class="uni-flex-item" type="primary" @click="back">后退</button>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<scroll-view ref="pageScrollView" class="page" :rebound="false" <scroll-view ref="pageScrollView" class="page" :rebound="false"
@startnestedscroll="onStartNestedScroll" @nestedprescroll="onNestedPreScroll"> @startnestedscroll="onStartNestedScroll" @nestedprescroll="onNestedPreScroll">
<view ref="header" class="search-bar"> <view ref="header" class="search-bar">
<input placeholder="搜索..." /> <input placeholder="搜索..." maxlength="-1"/>
</view> </view>
<view class="swiper-list"> <view class="swiper-list">
<scroll-view ref="tabScroll" class="swiper-tabs" direction="horizontal" :show-scrollbar="false"> <scroll-view ref="tabScroll" class="swiper-tabs" direction="horizontal" :show-scrollbar="false">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册