app.vue
export default {
data() {
return {
}
},
methods: {
Teaching(){
alert("")
}
}
};
a.js
import Vue from "vue"
import App from "./app"
const app = new Vue({
el: "-sharpapp",
render: h => h(App)
})
a.html
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<div id="app"></div>
</body>
</html>
The code is the
above. Now I want to write a function in a.html
. This function needs to call the Teaching
function in methods
of vue
in app.vue
, which looks something like this:
a.html
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<div id="app"></div>
<script>
function iframe_connect(){
//Teaching
app.Teaching()//
}
</script>
</body>
</html>
do not know what to do, ask for advice