vuejs / Discussion

Vue.js discussion
166 stars 17 forks source link

how to call vue method in other way? #1308

Open dongshimou opened 7 years ago

dongshimou commented 7 years ago

i write a qt program and a vue page.

const auto webview = new QWebEngineView;
const auto webpage = webview->page();
webview->load({ QLatin1String{"http://127.0.0.1:8080/#/xxx"} });

webpage can only use webpage->runJavaScript("a javascript string");

methods: {
    verify(){
        console.log(this.input)        
        }
    }

how to write the "a javascript string" call vue method like the "verify"? last,my english is poor...