按钮打开新窗口

时间:2020-08-24 20:18:24

标签: laravel vue.js vue-component laravel-7

我有一个按钮,我想在新窗口/标签中打开指向Painel的URL。

<button class="btn btn-outline-secondary btn-sm" type="button" :onclick="toPainel.concat(painel.id,'\'',';')" data-toggle="tooltip" data-placement="bottom" title="Painel" target="_blank"> button </button>

data() {return {toPainel:"window.location='http://localhost:8000/painel?id="}};

1 个答案:

答案 0 :(得分:0)

尝试:

<button type="button" target="_blank" onclick="window.open('http://google.com');">google</button>