Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

优化参数 #2030

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
!/karma/repeat.js
/nbproject/private/
/nbproject/private/
/node_modules
6 changes: 3 additions & 3 deletions src/vmodel/modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ function $watch(expr, callback, deep) {
}
}
}
export function watchFactory(core) {
export function watchFactory() {
return $watch
}

export function fireFactory(core) {
export function fireFactory() {
return $fire
}

Expand Down Expand Up @@ -80,4 +80,4 @@ platform.fireFactory = fireFactory
platform.watchFactory = watchFactory
platform.afterCreate = afterCreate
platform.hideProperty = hideProperty
platform.createViewModel = Object.defineProperties
platform.createViewModel = Object.defineProperties
6 changes: 3 additions & 3 deletions src/vmodel/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export function IProxy(definition, dd) {
}
}
if (dd === void 0) {
this.$watch = platform.watchFactory(this.$events)
this.$fire = platform.fireFactory(this.$events)
this.$watch = platform.watchFactory()
this.$fire = platform.fireFactory()
} else {
delete this.$watch
delete this.$fire
Expand Down Expand Up @@ -228,4 +228,4 @@ var modelAccessor = {
}

platform.toJson = toJson
platform.modelAccessor = modelAccessor
platform.modelAccessor = modelAccessor