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 f278311

Browse files
committed
remove replace
1 parent e3e436f commit f278311

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

‎component.go‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,10 @@ func NewComponent(
6363
p.counter += 1
6464
return p.structPtr
6565
}
66-
replace := true
67-
if len(replaceMountPoint) > 0 {
68-
replace = replaceMountPoint[0]
69-
}
7066
// opts
7167
opt := NewOption()
7268
opt.Data = vmfn
7369
opt.Template = templateStr
74-
opt.Replace = replace
7570
opt.OnLifeCycleEvent(EvtBeforeCreate, func(vm *ViewModel) {
7671
vm.Options.Set("methods", js.MakeWrapper(vmfn()))
7772
vMap[vmfn()] = vm

‎vue.go‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ type ViewModel struct {
277277
// on an already mounted instance will have no effect.
278278
// The method returns the instance itself so you can chain other
279279
// instance methods after it.
280-
Mount func(elementOrselector string) *ViewModel `js:"$mount"`
280+
Mount func(elementOrselector ...interface{}) *js.Object `js:"$mount"`
281281

282282
// vm.$destroy( [remove] )
283283
// remove Boolean optional
@@ -287,16 +287,6 @@ type ViewModel struct {
287287
// Also, all $on and $watch listeners will be automatically removed.
288288
Destroy func(remove bool) `js:"$destroy"`
289289

290-
// vm.$compile( element )
291-
// element HTMLElement
292-
// Partially compile a piece of DOM (Element or DocumentFragment).
293-
// The method returns a decompile function that tearsdown the directives
294-
// created during the process.
295-
// Note the decompile function does not remove the DOM.
296-
// This method is exposed primarily for
297-
// writing advanced custom directives.
298-
Compile func(element string) `js:"$compile"`
299-
300290
// vm.$addChild( [options, constructor] )
301291
// options Object optional
302292
// constructor Function optional
@@ -391,7 +381,7 @@ func GetVM(structPtr interface{}) *ViewModel {
391381
return vm
392382
}
393383

394-
// WatchEx using a simpler form to do Vue.$watch
384+
// Watch using a simpler form to do Vue.$watch
395385
func (v *ViewModel) Watch(expression string, callback func(newVal *js.Object)) (unwatcher func()) {
396386
obj := v.Call("$watch", expression, callback)
397387
return func() {

0 commit comments

Comments
(0)

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