perf: 优化任务窗口输入框草稿

This commit is contained in:
kuaifan 2022-06-10 10:03:45 +08:00
parent b9ddc0cf1f
commit 7c287f6ae5

View File

@ -366,6 +366,7 @@ export default {
taskId() {
this.userList = null;
this.taskList = null;
this.$emit('input', this.getInputCache())
},
showEmoji(val) {
@ -634,13 +635,13 @@ export default {
},
getInputCache() {
const key = this.dialogId;
const key = this.dialogId || this.taskId;
const item = this.dialogInputCache.find(item => item.key == key);
return item ? item.cache : '';
},
setInputCache(cache) {
const key = this.dialogId;
const key = this.dialogId || this.taskId;
const index = this.dialogInputCache.findIndex(item => item.key == key);
const data = {key, cache}
if (index > -1) {