|
@@ -206,13 +206,13 @@ export default {
|
|
|
acquire (res) {
|
|
acquire (res) {
|
|
|
const mid = { key: 'viewDetails', label: '查看详情', type: 'danger', icon: 'ibps-icon-search' }
|
|
const mid = { key: 'viewDetails', label: '查看详情', type: 'danger', icon: 'ibps-icon-search' }
|
|
|
if (res) {
|
|
if (res) {
|
|
|
- const indexNum = this.toolbars.findIndex(i => i.key == mid.key)
|
|
|
|
|
- if (indexNum == -1) {
|
|
|
|
|
|
|
+ const indexNum = this.toolbars.findIndex(i => i.key === mid.key)
|
|
|
|
|
+ if (indexNum === -1) {
|
|
|
this.toolbars.unshift(mid)
|
|
this.toolbars.unshift(mid)
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- const indexNum = this.toolbars.findIndex(i => i.key == mid.key)
|
|
|
|
|
- if (indexNum != -1) {
|
|
|
|
|
|
|
+ const indexNum = this.toolbars.findIndex(i => i.key === mid.key)
|
|
|
|
|
+ if (indexNum !== -1) {
|
|
|
this.toolbars.splice(indexNum, 1)
|
|
this.toolbars.splice(indexNum, 1)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|