Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6459973

Browse files
committed
update
1 parent 86ef847 commit 6459973

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

‎examples/basic/basic.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func main() {
8989
return time.Now().String() + fmt.Sprintf(" ==> i:%d", m.IntValue)
9090
}
9191
v := vue.New("#app", m)
92-
v.WatchEx("integer", func(val *js.Object) {
92+
v.Watch("integer", func(val *js.Object) {
9393
println("IntValue changed to:", val, "m.IntValue:", m.IntValue)
9494
m.Str = fmt.Sprintf("after watch:%d", m.IntValue)
9595
})

‎examples/component/index.html‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
</head>
77

88
<body>
9+
first:
10+
<my-el></my-el>
11+
second:
912
<my-el></my-el>
1013
<script type="text/javascript" src="component.js"></script>
1114
</body>

‎examples/component/main.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type controller struct {
3030
}
3131

3232
func main() {
33-
vue.Component("my-el", New, template)
33+
vue.NewComponent(New, template).Register("my-el")
3434
vm := vue.New("body", new(controller))
3535
js.Global.Set("vm", vm)
3636
println("vm:", vm)

‎examples/directive/main.go‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,7 @@ func main() {
2424
}
2525
m.Text = "a string"
2626
vue.New("body", m)
27+
m2 := &Model{
28+
Object: js.Global.Get("Object").New(),
29+
}
2730
}

‎examples/unwritableTime/main.go‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package main
22

33
import (
44
"github.com/gopherjs/gopherjs/js"
5-
"github.com/oskca/gopherjs-vue"
65
"time"
76
)
87

@@ -17,7 +16,6 @@ func main() {
1716
Object: js.Global.Get("Object").New(),
1817
}
1918
t.Text = "Hello World"
19+
println(time.Now())
2020
t.Time = time.Now()
21-
vm := vue.New("#app", t)
22-
js.Global.Set("vm", vm)
2321
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /