inject home html content into vue componenent MainContent
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
import store from 'vuejs/store'
|
||||
import VUserBlock from 'vuejs/components/User/UserBlock'
|
||||
import VTestContent from 'vuejs/components/Content/Test'
|
||||
import VMainContent from 'vuejs/components/Content/MainContent'
|
||||
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
@@ -12,7 +12,7 @@ import 'theme/assets/styles/main.scss'
|
||||
|
||||
var MaterioTheme = function(){
|
||||
|
||||
var v_user_block, v_test_content;
|
||||
var v_user_block, v_main_content;
|
||||
// var _is_front = drupalSettings.path.isFront;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import 'theme/assets/styles/main.scss'
|
||||
|
||||
function initVues(){
|
||||
initUserVBlock()
|
||||
// initTestVContent()
|
||||
initVMainContent()
|
||||
}
|
||||
|
||||
function initUserVBlock(){
|
||||
@@ -81,11 +81,14 @@ import 'theme/assets/styles/main.scss'
|
||||
console.log('initUserVBlock', v_user_block);
|
||||
}
|
||||
|
||||
function initTestVContent(){
|
||||
v_test_content = new Vue({
|
||||
function initVMainContent(){
|
||||
let $main_content = document.querySelector('#main-content')
|
||||
console.log('main-content', $main_content);
|
||||
let main_html = $main_content.innerHTML
|
||||
v_main_content = new Vue({
|
||||
store,
|
||||
render: h => h(VTestContent)
|
||||
}).$mount('#block-pagetitle')
|
||||
render: h => h(VMainContent, {props:{html:main_html}})
|
||||
}).$mount('#main-content')
|
||||
// console.log('initTestVContent', v_test_content);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user