About the use of beforeRemove, a new attribute of Tabs in iview3.1.0

problem description

in the newly released iview3.1.0, the tab component has added an attribute of beforeRemove to prevent the tag from being closed. The official statement is as follows

clipboard.png

PromisebeforeRemove
clipboard.png

May.27,2021

:before-remove='beforeRemove'

beforeRemove(index){
      console.log(index)
      return new Promise(function(resolve, reject) {
              //resolve('');
              //reject('');//
      })
}
Menu