GV.init(function (_require) { new (function () { this.require = _require; var Vue = this.Vue = _require('Vue'); var CleanVue = function () { for (var i in Vue.options.components){ delete Vue.options.components[i]; } }; this.VueRouter = _require('vue-router'); this.Vue.use(this.VueRouter); this.axios = _require('axios'); var htmlparser2 = _require('htmlparser2'); axiosUse(this); this.qs = _require('qs'); this.GoVueMount = function (app, context) { var ctx = GetGoVueTemplate(GoHtmlSrc); var cleanInlineJsCtx = GetGoVueTemplateInlineJs(ctx.template); app.$options.template = ctx.content; var template = ctx.template; if (cleanInlineJsCtx){ template = cleanInlineJsCtx.template; } var renderer = _require('vue-server-renderer').createRenderer({ template: template }); if (!context) { context = {} } context.GoVueTemplate = "" + Base64Encode(encodeURIComponent(ctx.content)) + "" context.GoVueData = "" + Base64Encode(encodeURIComponent(JSON.stringify(app.$data))) + "" renderer.renderToString(app, context, function (err, html) { if (err) { CleanVue(); throw err } else { if (cleanInlineJsCtx){ html = html.replace("",cleanInlineJsCtx.content); } GoReturn(html); } }) } try { eval(GoUseCallback) } catch (e) { GoSetError(JSON.stringify({ code: GoUseCallback, error: e.toString(), })); CleanVue(); throw e } var codes = GetGoVueJsCode(htmlparser2, GoHtmlSrc) // console.log(JSON.stringify(codes)) for (var i in codes) { // console.log("with(this){\n" + codes[i] + "\n}"); try { eval("with(this){\n" + codes[i] + "\n}") } catch (e) { GoSetError(JSON.stringify({ code: "with(this){\n" + codes[i] + "\n}", error: e.toString(), })); CleanVue(); throw e } } CleanVue(); })() });