瀏覽代碼

常错词

newStyle
jyt 2 年之前
父節點
當前提交
c18dcc1a57
共有 1 個文件被更改,包括 18 次插入13 次删除
  1. +18
    -13
      src/views/Receive/index.vue

+ 18
- 13
src/views/Receive/index.vue 查看文件

@@ -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…
取消
儲存