Skip to content

Commit

Permalink
fix Button bug in 4.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
icarusion committed Jun 13, 2021
1 parent 8f25ba6 commit 2ef37a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/routers/button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,11 @@
</ButtonGroup>
</div>
<Divider></Divider>
<Button to="http://baidu.com" replace>http跳转</Button>
<Button to="http://baidu.com">http跳转</Button>
<Button to="http://baidu.com" target="_blank">http跳转(_blank)</Button>
<Button to="https://iviewui.com" replace>https跳转</Button>
<Button :to="{path: '/icon'}">Router 对象跳转</Button>
<Button :to="{path: '/icon'}" target="_blank">Router 对象跳转(_blank)</Button>
</div>
</template>
<script>
Expand Down
1 change: 1 addition & 0 deletions src/mixins/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export default {
const route = router.resolve(this.to, current, this.append);
to = route ? route.href : this.to;
}
if (typeof this.to === 'string') return; // 会跳转两次
window.open(to);
},
handleClick (new_window = false) {
Expand Down

0 comments on commit 2ef37a9

Please sign in to comment.