Skip to content

Commit

Permalink
fix(operate): 解决 IE11 下无法直接解构 arguments 导致的 close(path, to, match, fo…
Browse files Browse the repository at this point in the history
…rce) 方式关闭页签出错
  • Loading branch information
bhuh12 committed Nov 15, 2019
1 parent d0fd9d5 commit acb7e7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions demo/views/Page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
<a class="demo-btn" @click="$routerTab.refresh()">刷新当前页面</a>

<a class="demo-btn" @click="$routerTab.close()">关闭当前页面</a>

<a class="demo-btn" @click="$routerTab.close(null, '../tab-dynamic')">关闭当前并跳转</a>
</p>

<p>
Expand Down
2 changes: 2 additions & 0 deletions src/components/RouterTab/operate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { warn } from '../../util/warn'

// 获取关闭参数
function getCloseArgs (args) {
args = Array.from(args)

let argsLen = args.length
let arg = args[0] // 首个选项
let arg2 = args[1] // 第二个选项
Expand Down

0 comments on commit acb7e7a

Please sign in to comment.