GV.init(function (_require) { new (function () { this.require = _require; this.Vue = _require('Vue'); 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) app.$options.template = ctx.content; // console.log(ctx.template) var renderer = _require('vue-server-renderer').createRenderer({ template: ctx.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) { throw err } else { GoReturn(html); } }) } try { eval(GoUseCallback) } catch (e) { GoSetError(JSON.stringify({ code: GoUseCallback, error: e.toString(), })) 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(), })) throw e } } })() })