`

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);
    });
};

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics