refactor: expose $self

This commit is contained in:
Evan You
2019-03-01 13:47:28 -05:00
parent fa2240143c
commit 66686f38a7
4 changed files with 10 additions and 8 deletions

View File

@@ -22,7 +22,7 @@ function getBoundMethod(fn: Function, target: any, receiver: any): Function {
const renderProxyHandlers = {
get(target: ComponentInstance<any, any>, key: string, receiver: any) {
let i: any
if (key === '_self') {
if (key === '$self') {
return target
} else if ((i = target._rawData) !== null && i.hasOwnProperty(key)) {
// data