Commit 8bc6a62b authored by gengchunlei's avatar gengchunlei

搜索框限制输入bug修复

parent 1812a13f
......@@ -52,7 +52,7 @@ export default {
if (!token) {
token = sessionStorage.getItem('token')
if (process.env.NODE_ENV !== 'production') {
token = '93f10186-5252-4bec-ae1f-2e9c6a0b85bd'
token = '72b191d3-e3a0-49ce-884a-1dd3452b5d9a'
}
}
if (token) {
......
......@@ -6,9 +6,10 @@
</span>
<div class="grow flex items-center px-2 mr-2 input-box">
<doc-icon type="doc-search" class="shrink-0" style="color: #595959"/>
<van-field v-model="idCard" type="digit" placeholder="请输入身份证号查询"
<van-field v-model="idCard" placeholder="请输入身份证号查询"
autocomplete="off"
clearable
:formatter="formatter"
@clear="idCardClear"
ref="idCardField"/>
<!-- <van-uploader :max-size="5 * 1024 * 1024" :after-read="afterRead" max-count="1">
......@@ -132,6 +133,9 @@ export default {
this.history = getLocalStorage(this.historyKey) || []
},
methods: {
formatter(value) {
return value.replace(/[\u4e00-\u9fa5/\s+/]|[^a-zA-Z0-9\u4E00-\u9FA5]/g, '');
},
search() {
if (!this.idCard) return
if (!validateIdCard(this.idCard)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment