Look at the code?

<! --> <div class="label_name"> <van-field V-model ="className" class="label_name" placeholder=" clearable maxlength="20" type="text" @keyup.native="btKeyUp" @keydown.native="btKeyDown" />Copy the code
BtKeyDown (e) {e.targe. value = e.targe.value. Replace (/[^\a-\z\ a-\ z0-9 \ u4e00-u9fa5]/g, "")}, / / limit the special characters btKeyUp (e) {e. arget. Value = e. arget. Value. The replace (/ [` ~! @ # $% ^ & * () _ \ - + = < >? : "{} |,. / /; '\ \ [\], ~! ... @ # $% & * () - \ - + = {} | ""? :", "【 】,, ' ',.,] / g, ' ')}Copy the code

Renderings?