upd: view.vue.main (now can include component (import + CamelCase))
This commit is contained in:
parent
2e7291929a
commit
5894aecae3
|
@ -20,8 +20,10 @@ window.api = new API("http://ndli1718/api/v/1.0/");
|
|||
window.wsc = new WSClientBuilder("wss://websocket.xdrm.io");
|
||||
|
||||
/* (3) Render view */
|
||||
|
||||
new Vue({
|
||||
el: '#main-vue',
|
||||
render: h => h(main_vue)
|
||||
render: h => h(main_vue),
|
||||
data: {
|
||||
'server': window._SERVER
|
||||
}
|
||||
})
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<template>
|
||||
|
||||
<div id='HEADER'>
|
||||
HEADER CONTENT (component)
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'HEADER'
|
||||
}
|
||||
</script>
|
|
@ -1,30 +1,25 @@
|
|||
<template>
|
||||
<div id="root">
|
||||
<h1>{{ msg }}</h1>
|
||||
<h2>Essential Links</h2>
|
||||
<ul>
|
||||
<li><a href="https://vuejs.org" target="_blank">Core Docs</a></li>
|
||||
<li><a href="https://forum.vuejs.org" target="_blank">Forum</a></li>
|
||||
<li><a href="https://chat.vuejs.org" target="_blank">Community Chat</a></li>
|
||||
<li><a href="https://twitter.com/vuejs" target="_blank">Twitter</a></li>
|
||||
</ul>
|
||||
<h2>Ecosystem</h2>
|
||||
<ul>
|
||||
<li><a href="http://router.vuejs.org/" target="_blank">vue-router</a></li>
|
||||
<li><a href="http://vuex.vuejs.org/" target="_blank">vuex</a></li>
|
||||
<li><a href="http://vue-loader.vuejs.org/" target="_blank">vue-loader</a></li>
|
||||
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank">awesome-vue</a></li>
|
||||
</ul>
|
||||
|
||||
<header-comp></header-comp>
|
||||
|
||||
<span>message: {{ msg }}</span>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import header_vue from './header.vue';
|
||||
|
||||
|
||||
export default {
|
||||
name: 'root',
|
||||
data () {
|
||||
return {
|
||||
msg: 'Welcome to Your Vue.js App'
|
||||
}
|
||||
data(){ return {
|
||||
msg: 'Main vue component'
|
||||
}; },
|
||||
components: {
|
||||
'HeaderComp': header_vue
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -57,3 +52,4 @@ a {
|
|||
color: #42b983;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
Loading…
Reference in New Issue