Vue-SSR-demo1

示例代码:

// server-entry.js
import Vue from 'vue';
import App from './component/List.vue';


const app = new Vue({
	render(createElement){
		return createElement(App, {props: {title: 'test'}});
	}
});
// the default export should be a function
// which will receive the context of the render call
export default function (context) {
    return new Promise((resolve, reject) => {
        resolve(app);
    });
};

 

posted @ 2017-09-26 23:49  mjian  阅读(78)  评论(0)    收藏  举报