Skip to content

Commit

Permalink
refactor(reactive): change model default batch annotation to action a…
Browse files Browse the repository at this point in the history
…nnotation
  • Loading branch information
janryWang committed Aug 11, 2021
1 parent 8af0467 commit 6162639
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/reactive/src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { observable } from './observable'
import { getObservableMaker } from './internals'
import { isObservable, isAnnotation, isSupportObservable } from './externals'
import { Annotations } from './types'
import { batch } from './batch'
import { action } from './action'
import { ProxyRaw, RawProxy } from './environment'

export function define<Target extends object = any>(
Expand Down Expand Up @@ -34,7 +34,7 @@ export function model<Target extends object = any>(target: Target): Target {
if (descriptor && descriptor.get) {
buf[key] = observable.computed
} else if (isFn(target[key])) {
buf[key] = batch
buf[key] = action
} else {
buf[key] = observable
}
Expand Down

0 comments on commit 6162639

Please sign in to comment.