美文网首页
2020-06-06

2020-06-06

作者: 阿古岛 | 来源:发表于2020-06-06 14:51 被阅读0次

iframe调用vue里面事件
vue里面:

created() {
    let self = this
    window.vueid = () => {
      self.test()
    }
  },
  methods: {
    test() {
      const { shell } = window.require('electron')
      shell.openExternal('https://www.cnblogs.com/doubino/p/10622669.html')
    }
  }

iframe里面调用:

window.parent.vueid()

相关文章

网友评论

      本文标题:2020-06-06

      本文链接:https://www.haomeiwen.com/subject/xrbxtktx.html