Browse Source

常错词

newStyle
jyt 2 years ago
parent
commit
c18dcc1a57
1 changed files with 18 additions and 13 deletions
  1. +18
    -13
      src/views/Receive/index.vue

+ 18
- 13
src/views/Receive/index.vue View File

@@ -1361,19 +1361,24 @@ export default {

//常错词确认
subMsg() {
this.$refs.form.validate((valid) => {
if (valid) {
this.form.correctWord = this.form.correctWord.replace(/[^\w\u4e00-\u9fa5]/g,"")
this.form.wrongWord = this.form.wrongWord.replace(/[^\w\u4e00-\u9fa5]/g,"")
this.dialogFormVisible = false;
let sas = this.textItself.replace(
this.form.wrongWord,
this.form.correctWord
);
this.transcriptionlist[this.argtextindex].onebest = sas;
this.subWrongMsg();
}
});
let reg = /^[0-9]+$/
if(reg.test(this.form.wrongWord)){
this.$message.warning("常错词不能为纯数字!");
}else{
this.$refs.form.validate((valid) => {
if (valid) {
this.form.correctWord = this.form.correctWord.replace(/[^\w\u4e00-\u9fa5]/g,"")
this.form.wrongWord = this.form.wrongWord.replace(/[^\w\u4e00-\u9fa5]/g,"")
this.dialogFormVisible = false;
let sas = this.textItself.replace(
this.form.wrongWord,
this.form.correctWord
);
this.transcriptionlist[this.argtextindex].onebest = sas;
this.subWrongMsg();
}
});
}
},
//常错词提交
subWrongMsg() {


Loading…
Cancel
Save