Commit 05f50e69 authored by 李维's avatar 李维

添加setData

parent 4c8887a9
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<link rel="icon" href="./favicon.ico"> <link rel="icon" href="./favicon.ico">
<title>form_vue</title> <title>form_vue</title>
<script defer="defer" src="./js/chunk-vendors.3fe03ee5.js"></script> <script defer="defer" src="./js/chunk-vendors.3fe03ee5.js"></script>
<script defer="defer" src="./js/app.5f1f6f1d.js"></script> <script defer="defer" src="./js/app.c1409b13.js"></script>
<link href="/.css/app.25c893d8.css" rel="stylesheet"> <link href="./css/app.25c893d8.css" rel="stylesheet">
</head> </head>
<body><noscript><strong>We're sorry but form_vue doesn't work properly without JavaScript enabled. Please enable it to <body><noscript><strong>We're sorry but form_vue doesn't work properly without JavaScript enabled. Please enable it to
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -14,6 +14,7 @@ export default { ...@@ -14,6 +14,7 @@ export default {
HelloWorld HelloWorld
}, },
created() { created() {
this.$setData("{a: 1}")
console.log('App created') console.log('App created')
this.$getData() this.$getData()
} }
......
...@@ -9,6 +9,10 @@ Vue.prototype.$getData = () => { ...@@ -9,6 +9,10 @@ Vue.prototype.$getData = () => {
}) })
} }
Vue.prototype.$setData = (data) => {
(window).courseware.setData(data, null, "default_key")
}
new Vue({ new Vue({
render: function (h) { return h(App) }, render: function (h) { return h(App) },
}).$mount('#app') }).$mount('#app')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment