|
@@ -285,19 +285,19 @@ const edit = new Vue({
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
- onFocused() {
|
|
|
+ onFocused(val = 300) {
|
|
|
setTimeout(() => {
|
|
|
this.validTime = null
|
|
|
console.log(111)
|
|
|
clearTimeout(this.validTime)
|
|
|
- }, 300)
|
|
|
+ }, val)
|
|
|
},
|
|
|
- onBlured() {
|
|
|
+ onBlured(val = 200) {
|
|
|
setTimeout(() => {
|
|
|
this.isFocus = true
|
|
|
this.validFormRule()
|
|
|
console.log(222)
|
|
|
- }, 200)
|
|
|
+ }, val)
|
|
|
},
|
|
|
// 自动保存校验
|
|
|
validFormRule() {
|
|
@@ -321,6 +321,13 @@ const edit = new Vue({
|
|
|
handlerTypeId() {
|
|
|
this.onBlured()
|
|
|
},
|
|
|
+ changeVisible($event) {
|
|
|
+ if ($event) {
|
|
|
+ this.onFocused()
|
|
|
+ } else {
|
|
|
+ this.onBlured()
|
|
|
+ }
|
|
|
+ },
|
|
|
// 获取表单数据
|
|
|
fetchEntryData(){
|
|
|
const self = this
|
|
@@ -559,7 +566,8 @@ const edit = new Vue({
|
|
|
// 删除信息栏
|
|
|
handleInfoRemove(index) {
|
|
|
this.formData.infoList.splice(index, 1)
|
|
|
- this.onFocused()
|
|
|
+ this.onFocused(0)
|
|
|
+ this.onBlured(0)
|
|
|
},
|
|
|
// 正文目录数据
|
|
|
genereateTextInfo(type, index) {
|
|
@@ -585,7 +593,8 @@ const edit = new Vue({
|
|
|
// 删除正文目录
|
|
|
handleRemoveTextInfo(index, type) {
|
|
|
this.formData.textInfoList.splice(index, 1)
|
|
|
- this.onFocused()
|
|
|
+ this.onFocused(0)
|
|
|
+ this.onBlured(0)
|
|
|
},
|
|
|
// 文件上传成功
|
|
|
handleUploadSuccess(fileList) {
|
|
@@ -595,6 +604,8 @@ const edit = new Vue({
|
|
|
// 文件移除
|
|
|
handleFileRemove(file) {
|
|
|
this.fileList = this.fileList.filter(item => item.uuid !== file.uuid);
|
|
|
+ this.onFocused()
|
|
|
+ this.onBlured()
|
|
|
},
|
|
|
// 封面上传成功
|
|
|
handleCoverUploadSuccess(fileList) {
|
|
@@ -606,6 +617,8 @@ const edit = new Vue({
|
|
|
handleCoverRemove(file) {
|
|
|
this.formData.image = ''
|
|
|
this.coverList = this.coverList.filter(item => item.uuid !== file.uuid);
|
|
|
+ this.onFocused()
|
|
|
+ this.onBlured()
|
|
|
},
|
|
|
// 资料图片上传
|
|
|
handleReferenceImageUploadSuccess(fileList){
|