forked from natuka/web.puabadge.com
去掉特殊符号限制
This commit is contained in:
1 parent
28f8a97bea
commit
a3a2aa76c9
1 file changed
+5
-6
@@ -758,12 +758,11 @@ const textShow = (item: any) => {
|
||||
const shapeText = ref('')
|
||||
const changeShapeText = (e: any) => {
|
||||
console.log('changeShapeText', e.target.value)
|
||||
if (!validateInput(e.target.value)) {
|
||||
showToast('输入的文字不能包含特殊符号!')
|
||||
// 移除特殊符号,仅保留字母、数字、中文和空格
|
||||
shapeText.value = e.target.value.replace(/[^a-zA-Z0-9\u4e00-\u9fa5\s]/g, '');
|
||||
return;
|
||||
}
|
||||
// if (!validateInput(e.target.value)) {
|
||||
// showToast('输入的文字不能包含特殊符号!')
|
||||
// shapeText.value = e.target.value.replace(/[^a-zA-Z0-9\u4e00-\u9fa5\s]/g, '');
|
||||
// return;
|
||||
// }
|
||||
handleInput(e.target.value)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user