We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f66892 commit 04551e6Copy full SHA for 04551e6
component.go
@@ -72,7 +72,7 @@ func NewComponent(
72
opt.Data = vmfn
73
opt.Template = templateStr
74
opt.Replace = replace
75
- opt.OnLifeCycleEvent(EvtInit, func(vm *ViewModel) {
+ opt.OnLifeCycleEvent(VmInit, func(vm *ViewModel) {
76
vm.Options.Set("methods", js.MakeWrapper(vmfn()))
77
vMap[vmfn()] = vm
78
})
examples/features/features.go
@@ -42,8 +42,8 @@ func (m *Model) Inc() {
42
func (m *Model) Repeat() {
43
m.Str = strings.Repeat(m.Str, 3)
44
vm := vue.GetVM(m)
45
- println("Get(m):", vm)
46
- println("m keys:", js.Keys(m.Object))
+ // println("Get(m):", vm)
+ // println("m keys:", js.Keys(m.Object))
47
// for i, key := range js.Keys(m.Object) {
48
// println(i, key)
49
// }
option.go
@@ -10,15 +10,15 @@ import (
10
type LifeCycleEvent string
11
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"
+ VmInit LifeCycleEvent = "init"
+ VmCreated LifeCycleEvent = "created"
+ VmBeforeCompile LifeCycleEvent = "beforeCompile"
+ VmCompiled LifeCycleEvent = "compiled"
+ VmReady LifeCycleEvent = "ready"
+ VmAttached LifeCycleEvent = "attached"
+ VmDetached LifeCycleEvent = "detached"
+ VmBeforeDestroy LifeCycleEvent = "beforeDestroy"
+ VmDestroyed LifeCycleEvent = "destroyed"
22
)
23
24
// Option are used to organize mutiple sub component together to
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments