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

Appearance settings

Commit 399ffa2

Browse filesBrowse files
committed
remove ElementDirective to upgrade to V2
1 parent d99f002 commit 399ffa2
Copy full SHA for 399ffa2

File tree

1 file changed

+0
-33
lines changed
Filter options

1 file changed

+0
-33
lines changed

‎directive.go

Copy file name to clipboardExpand all lines: directive.go
-33Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -89,36 +89,3 @@ func (d *Directive) SetUpdater(fnCallback interface{}) *Directive {
8989
func (d *Directive) Register(name string) {
9090
js.Global.Get("Vue").Call("directive", name, d.Object)
9191
}
92-
93-
// In some cases, we may want our directive to be used in the form of
94-
// a custom element rather than as an attribute.
95-
// This is very similar to Angular’s notion of “E” mode directives.
96-
// Element directives provide a lighter-weight alternative to
97-
// full-blown components (which are explained later in the guide).
98-
//
99-
// Element directives cannot accept arguments or
100-
// expressions, but it can read the element’s attributes to
101-
// determine its behavior.
102-
//
103-
// A big difference from normal directives is that
104-
// element directives are terminal, which means once Vue encounters
105-
// an element directive, it will completely skip that element
106-
// - only the element directive itself will be
107-
// able to manipulate that element and its children.
108-
type ElementDirective struct {
109-
*Directive
110-
}
111-
112-
func NewElementDirective(updaterCallBack ...interface{}) *ElementDirective {
113-
d := &ElementDirective{
114-
Directive: NewDirective(updaterCallBack...),
115-
}
116-
if len(updaterCallBack) > 0 {
117-
d.SetUpdater(updaterCallBack[0])
118-
}
119-
return d
120-
}
121-
122-
func (d *ElementDirective) Register(name string) {
123-
js.Global.Get("Vue").Call("elementDirective", name, d.Object)
124-
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.