fix Button bug in 4.6.0
This commit is contained in:
parent
8f25ba65d2
commit
2ef37a9560
2 changed files with 4 additions and 1 deletions
|
@ -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>
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue