1、English name这块,除了中文,数字不能用,其他都可以

2、blue空格
This commit is contained in:
2026-02-13 11:44:31 +08:00
parent 10348d1e75
commit a2497a8885
11 changed files with 68 additions and 72 deletions

View File

@@ -18,8 +18,13 @@ import store from './store' // 引入 store
Vue.prototype.$bus = new Vue();
// Vue.prototype.$validateString = function (str) {
// return /^[a-zA-Z\s\u00C0-\u00FF\u0100-\u017F-]+$/.test(str);
// }
//除了中文,数字不能用,其他都可以
Vue.prototype.$validateString = function (str) {
return /^[a-zA-Z\s\u00C0-\u00FF\u0100-\u017F-]+$/.test(str);
// 匹配规则:不包含数字 (0-9) 且 不包含中文字符 (\u4e00-\u9fa5)
return !/[0-9\u4e00-\u9fa5]/.test(str);
}
window.MathJax = {
tex: {