Merge pull request #457 from jamebal/dev
fix: add null checks for refs before invoking methods to prevent pote…
This commit is contained in:
commit
f44f438508
@ -313,7 +313,9 @@ export default {
|
|||||||
this.fileList.map((item, index) => {
|
this.fileList.map((item, index) => {
|
||||||
item.index = index
|
item.index = index
|
||||||
})
|
})
|
||||||
this.$refs.fileListTable.reloadData(this.fileList)
|
if (this.$refs.fileListTable) {
|
||||||
|
this.$refs.fileListTable.reloadData(this.fileList)
|
||||||
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (this.$refs.fileListTable) {
|
if (this.$refs.fileListTable) {
|
||||||
this.$refs.fileListTable.reloadData(this.fileList)
|
this.$refs.fileListTable.reloadData(this.fileList)
|
||||||
|
|||||||
@ -282,7 +282,7 @@ export default {
|
|||||||
item.searchOverall = false
|
item.searchOverall = false
|
||||||
}
|
}
|
||||||
this.debounceSearch(this.searchFileName, false)
|
this.debounceSearch(this.searchFileName, false)
|
||||||
this.$refs.searchOption.setFilterOption(item)
|
this.$refs.searchOption && this.$refs.searchOption.setFilterOption(item)
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this._isSuggestionHandledBySelect = false
|
this._isSuggestionHandledBySelect = false
|
||||||
})
|
})
|
||||||
|
|||||||
@ -50,7 +50,7 @@ export default {
|
|||||||
event.stopPropagation()
|
event.stopPropagation()
|
||||||
}
|
}
|
||||||
// Del
|
// Del
|
||||||
if (keyCode === 8 && !this.inputting && this.selectRowData.length > 0 && !checkPreviewVisible) {
|
if (keyCode === 46 && !this.inputting && this.selectRowData.length > 0 && !checkPreviewVisible) {
|
||||||
this.removeOperation()
|
this.removeOperation()
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
event.stopPropagation()
|
event.stopPropagation()
|
||||||
@ -91,7 +91,9 @@ export default {
|
|||||||
}
|
}
|
||||||
// ctrl + P / cmd + P
|
// ctrl + P / cmd + P
|
||||||
if (isCmd && keyCode === 80 && !checkPreviewVisible) {
|
if (isCmd && keyCode === 80 && !checkPreviewVisible) {
|
||||||
this.$refs.searchInput.focus()
|
if (this.$refs.searchInput) {
|
||||||
|
this.$refs.searchInput.focus()
|
||||||
|
}
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
event.stopPropagation()
|
event.stopPropagation()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user