|
|
@@ -197,13 +197,13 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
postTopic(){ |
|
|
|
const patter = /^[\u4e00-\u9fa5a-z0-9][\u4e00-\u9fa5a-zA-Z0-9-]{0,35}$/ |
|
|
|
const patter = /^[\u4e00-\u9fa5a-zA-Z0-9][\u4e00-\u9fa5a-zA-Z0-9-]{0,34}$/ |
|
|
|
let regexp = patter.test(this.input) |
|
|
|
console.log("regexp",regexp) |
|
|
|
if(!regexp){ |
|
|
|
this.$notify({ |
|
|
|
|
|
|
|
message: '主题必须以中文、字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符', |
|
|
|
message: '标签名必须以中文、字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符', |
|
|
|
duration: 3000, |
|
|
|
type:'error' |
|
|
|
}); |
|
|
|