我有一个按钮,我想在新窗口/标签中打开指向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="}};
答案 0 :(得分:0)
尝试:
<button type="button" target="_blank" onclick="window.open('http://google.com');">google</button>