File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ func NewComponent(
72
72
opt .Data = vmfn
73
73
opt .Template = templateStr
74
74
opt .Replace = replace
75
- opt .OnLifeCycleEvent (EvtInit , func (vm * ViewModel ) {
75
+ opt .OnLifeCycleEvent (VmInit , func (vm * ViewModel ) {
76
76
vm .Options .Set ("methods" , js .MakeWrapper (vmfn ()))
77
77
vMap [vmfn ()] = vm
78
78
})
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ func (m *Model) Inc() {
42
42
func (m * Model ) Repeat () {
43
43
m .Str = strings .Repeat (m .Str , 3 )
44
44
vm := vue .GetVM (m )
45
- println ("Get(m):" , vm )
46
- println ("m keys:" , js .Keys (m .Object ))
45
+ // println("Get(m):", vm)
46
+ // println("m keys:", js.Keys(m.Object))
47
47
// for i, key := range js.Keys(m.Object) {
48
48
// println(i, key)
49
49
// }
Original file line number Diff line number Diff line change @@ -10,15 +10,15 @@ import (
10
10
type LifeCycleEvent string
11
11
12
12
const (
13
- EvtInit LifeCycleEvent = "init"
14
- EvtCreated LifeCycleEvent = "created"
15
- EvtBeforeCompile LifeCycleEvent = "beforeCompile"
16
- EvtCompiled LifeCycleEvent = "compiled"
17
- EvtReady LifeCycleEvent = "ready"
18
- EvtAttached LifeCycleEvent = "attached"
19
- EvtDetached LifeCycleEvent = "detached"
20
- EvtBeforeDestroy LifeCycleEvent = "beforeDestroy"
21
- EvtDestroyed LifeCycleEvent = "destroyed"
13
+ VmInit LifeCycleEvent = "init"
14
+ VmCreated LifeCycleEvent = "created"
15
+ VmBeforeCompile LifeCycleEvent = "beforeCompile"
16
+ VmCompiled LifeCycleEvent = "compiled"
17
+ VmReady LifeCycleEvent = "ready"
18
+ VmAttached LifeCycleEvent = "attached"
19
+ VmDetached LifeCycleEvent = "detached"
20
+ VmBeforeDestroy LifeCycleEvent = "beforeDestroy"
21
+ VmDestroyed LifeCycleEvent = "destroyed"
22
22
)
23
23
24
24
// Option are used to organize mutiple sub component together to
You can’t perform that action at this time.
0 commit comments