electron-vue 用默认浏览器打开链接
template<template><div><p>官网地址:<!-- <a href="http://www.yunlauncher.com" target="_blank">http://www.yunlauncher.com&a
·
template
<template>
<div>
<p>官网地址:
<!-- <a href="http://www.yunlauncher.com" target="_blank">http://www.yunlauncher.com</a> -->
<span @click="openUrl">http://www.yunlauncher.com</span>
</p>
</div>
</template>
js
<script>
import { shell } from 'electron'
export default {
data () {
return {
}
},
methods: {
openUrl () {
shell.openExternal('http://www.yunlauncher.com')
}
}
}
</script>
更多推荐
已为社区贡献27条内容
所有评论(0)