Browse Source

fix

tags/v1.0.1 v1.0.1
郑荣升 5 years ago
parent
commit
b58bceafb8
  1. 20
      govue/bindata.go
  2. 3
      govue/govue-runtime/header.js
  3. 1
      govue/govue-runtime/runtime.js
  4. 48
      govue/govue.go
  5. 4
      jsruntime/timeout.go

20
govue/bindata.go
File diff suppressed because it is too large
View File

3
govue/govue-runtime/header.js

@ -1,13 +1,12 @@
var domino, window, document, location, Vue, VueRouter, vuessr, navigator, axios, Promise, GoUseCall, GoUse,
GoUseRegistered,
govueId, useRoute, goUseCallCache, $, jQuery, GoParam, qs, Intl, process,Node;
govueId, useRoute, goUseCallCache, $, jQuery, GoParam, qs, Intl, process, Node;
var global = this;
global.Vue = Vue;
global.VueRouter = VueRouter;
global.Intl = Intl;
global.process = process;
global.Node = Node;
process = {
env: {
VUE_ENV: "server",

1
govue/govue-runtime/runtime.js

@ -1,5 +1,6 @@
if (!IS_VUE_SSR) {
Vue.GV = true;
try {
LoadPage(GoHtmlSrc, GoHref);
} catch (e) {

48
govue/govue.go

@ -67,46 +67,46 @@ func (gv *GoVue) initRender(debug bool) (err error) {
govueScriptFile = "govue-dev.js"
}
polyfill, err := ioutil.ReadFile(filepath.Join("govue", "govue-runtime", "polyfill.js"))
if err != nil {
return
}
headerScript, err := ioutil.ReadFile(filepath.Join("govue", "govue-runtime", "header.js"))
if err != nil {
return
}
govueScript, err := ioutil.ReadFile(filepath.Join("govue", "govue-runtime", govueScriptFile))
if err != nil {
return
}
mainScript, err := ioutil.ReadFile(filepath.Join("govue", "govue-runtime", "runtime.js"))
if err != nil {
return
}
//polyfill, err := gv.Resources.Asset(filepath.Join("govue-runtime", "polyfill.js"))
//polyfill, err := ioutil.ReadFile(filepath.Join("govue", "govue-runtime", "polyfill.js"))
//if err != nil {
// return
//}
//
//headerScript, err := gv.Resources.Asset(filepath.Join("govue-runtime", "header.js"))
//headerScript, err := ioutil.ReadFile(filepath.Join("govue", "govue-runtime", "header.js"))
//if err != nil {
// return
//}
//
//govueScript, err := gv.Resources.Asset(filepath.Join("govue-runtime", govueScriptFile))
//govueScript, err := ioutil.ReadFile(filepath.Join("govue", "govue-runtime", govueScriptFile))
//if err != nil {
// return
//}
//
//mainScript, err := gv.Resources.Asset(filepath.Join("govue-runtime", "runtime.js"))
//mainScript, err := ioutil.ReadFile(filepath.Join("govue", "govue-runtime", "runtime.js"))
//if err != nil {
// return
//}
polyfill, err := gv.Resources.Asset(filepath.Join("govue-runtime", "polyfill.js"))
if err != nil {
return
}
headerScript, err := gv.Resources.Asset(filepath.Join("govue-runtime", "header.js"))
if err != nil {
return
}
govueScript, err := gv.Resources.Asset(filepath.Join("govue-runtime", govueScriptFile))
if err != nil {
return
}
mainScript, err := gv.Resources.Asset(filepath.Join("govue-runtime", "runtime.js"))
if err != nil {
return
}
gv.jsRuntimePool = pool.NewJsRuntimePool(string(mainScript), gv.UseJsPath, gv.StaticPath, jsruntime.Relys{
jsruntime.Rely{
Src: string(polyfill),

4
jsruntime/timeout.go

@ -15,8 +15,8 @@ func (jr *JsRuntime) EnableTimeoutFunc() {
if len(call.Arguments) > 2 {
args = call.Arguments[2:]
}
time.Sleep(time.Duration(delay) * time.Millisecond)
//
//time.Sleep(time.Duration(delay) * time.Millisecond)
fn(nil, args...)
}

Loading…
Cancel
Save