Requirements: Users can only enter Chinese, English, numbers, symbols
Because too many Emoji expression code, it can not be completely filtered, only positive thinking:
Numerals and symbols portion
inputEmoji(e, from) { var val = e.target.value; var reg = /[^a-zA-Z0-9_\u4e00-\u9fa5\u3002\uff1b\uff0c\uff1a\u201c\u201d\uff08\uff09\u3001\uff1f\u300a\u300b/,.!:()?/_""-——]/g; if (from === 'name') { this.name = val.replace(reg, ''); } else { this.introduction = val.replace(reg, ''); } }
Below I have not tried this