add constant
This commit is contained in:
@@ -203,6 +203,7 @@ import storage from "@/libs/storage";
|
||||
import { setStoreText } from "@/libs/noteStorage";
|
||||
import { saveAs } from 'file-saver';
|
||||
import { isWeixin } from "@/libs/utils";
|
||||
import NoteConstant from "@/libs/constants";
|
||||
|
||||
export default {
|
||||
name: 'EditNote',
|
||||
@@ -343,8 +344,8 @@ export default {
|
||||
},
|
||||
recordText() {
|
||||
let text = this.noteForm.text;
|
||||
if (text.length > 409600) {
|
||||
this.errorInfo = this.$t('error.100012');
|
||||
if (text.length > NoteConstant.noteMaxCount) {
|
||||
this.errorInfo = this.$t('error.100012',[NoteConstant.noteMaxDesc]);
|
||||
this.model.showError = true;
|
||||
return;
|
||||
}
|
||||
@@ -372,8 +373,8 @@ export default {
|
||||
let end = event.currentTarget.selectionEnd;
|
||||
let text = event.currentTarget.value;
|
||||
|
||||
if (text.length > 409600) {
|
||||
this.errorInfo = this.$t('error.100012');
|
||||
if (text.length > NoteConstant.noteMaxCount) {
|
||||
this.errorInfo = this.$t('error.100012',[NoteConstant.noteMaxDesc]);
|
||||
this.model.showError = true;
|
||||
return;
|
||||
}
|
||||
@@ -418,8 +419,8 @@ export default {
|
||||
},
|
||||
validateForm() {
|
||||
let text = this.noteForm.text;
|
||||
if (text.length > 409600) {
|
||||
this.errorInfo = this.$t('error.100012');
|
||||
if (text.length > NoteConstant.noteMaxCount) {
|
||||
this.errorInfo = this.$t('error.100012',[NoteConstant.noteMaxDesc]);
|
||||
this.model.showError = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user