Commit Graph

375 Commits

Author SHA1 Message Date
Evan You
390589ec6d fix(reactivity): should not trigger watch on computed ref when value is unchanged
fix #2231
2020-10-06 18:16:20 -04:00
Evan You
5c3e8e9840 fix(runtime-core): ensure this context for $nextTick callback
fix #2282
2020-10-05 18:18:38 -04:00
ᴜɴвʏтᴇ
4d20ac8173
fix(runtime-core): make errorCaptured return value handling consistent with Vue 2 (#2289)
fix #2267
2020-10-05 17:37:26 -04:00
HcySunYang
ea1f87eabf
fix(reactivity): should add allowRecurse to the effect (#2213)
So that the scheduler also respects effect's allowRecurse option.

fix #2200
2020-10-05 16:36:02 -04:00
Philipp Rudloff
28d5fd7a28
fix(runtime-core): vnode.el is null in watcher after rerendering (#2295)
fix #2170
2020-10-05 16:05:43 -04:00
Evan You
376883d1cf fix(runtime-core): fix duplicated unmount traversal in optimized mode
fix #2169
2020-09-22 11:38:15 -04:00
Katashin
422f05e085
fix(hmr): make hmr working with class components (#2144) 2020-09-18 00:14:59 -04:00
Evan You
1c9a0b3e19 feat(watch): support dot-delimited path in watch option 2020-09-18 00:00:39 -04:00
Evan You
5bfcad155b fix(suspense): should discard unmount effects of invalidated pending branch 2020-09-17 23:49:06 -04:00
Evan You
49bb44756f refactor: watch APIs default to trigger pre-flush
BREAKING CHANGE: watch APIs now default to use `flush: 'pre'` instead of
`flush: 'post'`.

  - This change affects `watch`, `watchEffect`, the `watch` component
    option, and `this.$watch`.

  - As pointed out by @skirtles-code in
    [this comment](https://github.com/vuejs/vue-next/issues/1706#issuecomment-666258948),
    Vue 2's watch behavior is pre-flush, and the ecosystem has many uses
    of watch that assumes the pre-flush behavior. Defaulting to post-flush
    can result in unnecessary re-renders without the users being aware of
    it.

  - With this change, watchers need to specify `{ flush: 'post' }` via
    options to trigger callback after Vue render updates. Note that
    specifying `{ flush: 'post' }` will also defer `watchEffect`'s
    initial run to wait for the component's initial render.
2020-09-17 23:17:21 -04:00
Evan You
58c31e3699 feat(runtime-core): support using inject() inside props default functions 2020-09-17 15:59:01 -04:00
Evan You
c7b4a379cf fix(runtime-core/async-component): fix error component when there are no error handlers
fix #2129
2020-09-16 11:10:16 -04:00
Evan You
3810de7d6b fix(reactivity): effect shoud only recursively self trigger with explicit options
fix #2125
2020-09-16 10:52:31 -04:00
Evan You
5ae7380b4a
feat: update Suspense usage (#2099)
See https://github.com/vuejs/vue-next/pull/2099 for details.
2020-09-15 12:45:06 -04:00
HuangYi
98cc1f9d84
fix(KeepAlive): when exclude prop change, it should prune cache that not matched (#2111) 2020-09-15 10:33:50 -04:00
edison
0cddde6aa4
test(runtime-core): test app API warnings (#2079) 2020-09-14 21:48:38 -04:00
被雨水过滤的空气
890ca8aa34
fix(keep-alive): should use onMounted and onUpdated to invoke cacheSubtree (#1984) 2020-09-14 20:50:06 -04:00
Evan You
124c385baf perf: should not trigger child update if changed prop is declared emit listener
close #2072
2020-09-14 18:58:30 -04:00
Evan You
4de5b111ee test: fix cloneVNode ref tests 2020-09-14 18:55:00 -04:00
underfin
a32870a8f6
fix: inherit el for static nodes inside keyed template fragment (#2089)
fix #2080
2020-09-14 16:02:29 -04:00
Evan You
612eb6712a fix(runtime-core/refs): handle multiple merged refs for dynamic component with vnode
fix #2078
2020-09-14 15:33:38 -04:00
Stanislav Lashmanov
313dd06065
fix(runtime-core/inject): handle optional from option in inject object config (#2073) 2020-09-14 12:52:19 -04:00
Evan You
d4724619fc fix(inject): fix support for inject option default function
fix #2050
2020-09-04 12:07:30 -04:00
ᴜɴвʏтᴇ
95c07d8c36
fix(runtime-core): fix priority of option merging (#2041) 2020-09-03 10:35:43 -04:00
Evan You
ad93fa42fc fix(runtime-core): openBlock() should not be tracked when block tracking is disabled 2020-09-02 12:30:37 -04:00
HcySunYang
63f1f18064
fix(runtime-core): v-model listeners that already exists on the component should not be merged (#2011)
fix #1989
2020-09-01 22:24:20 -04:00
HcySunYang
93b8ff94a4
polish(teleport): do not warn missing target when teleport is disabled (#2021) 2020-09-01 21:05:51 -04:00
zhangzhonghe
0d0970f9cd
refactor(runtime-core): remove the deactivated branch in unmountComponent method (#2012) 2020-09-01 21:03:50 -04:00
Evan You
c0427b45ff fix(sfc/scoped-style): inherit scopeId through nested HOCs with inheritAttrs: false
fix #1988
2020-09-01 18:56:02 -04:00
HcySunYang
5b82c48c7b
fix(runtime-core): enable block tracking when normalizing plain element with slot children (#1987)
fix #1980
2020-09-01 12:38:47 -04:00
ᴜɴвʏтᴇ
706b52aadd
fix(runtime-core): ensure consistent $options merge behavior with 2.x (#1986)
close #1978 , close #1979
2020-08-31 21:04:06 -04:00
Evan You
8ed0b342d4 fix(runtime-core): fix props/emits resolving with global mixins
fix #1975
2020-08-31 18:32:07 -04:00
Evan You
0cb7f7f880 fix(runtime-core): fix resolving assets from mixins and extends
fix #1963
2020-08-26 18:09:54 -04:00
Pick
d0cc4b37d0
test(runtime-core): add tests for componentSlots (#1940) 2020-08-26 12:17:21 -04:00
HcySunYang
6df0e738cb
fix(runtime-core): properly call lifecycle hooks in chained mixins & extends (#1974)
fix #1973
2020-08-26 10:31:23 -04:00
HcySunYang
9153fc2d8a
fix(runtime-core): class and style should be properly normalized in cloneVNode (#1967)
fix #1964
2020-08-26 09:37:28 -04:00
Evan You
c15311cfe8 fix(runtime-core): fix data merge order for mixins/extends
fix #1953
2020-08-24 21:30:04 -04:00
Evan You
36fa42a88c fix(runtime-core/scheduler): handle nested flushPostFlushCbs calls
fix #1947
2020-08-24 18:47:15 -04:00
Yang Mingshan
10293c7a18
fix(watch): traverse refs in deep watch (#1939)
ref #1900
2020-08-23 14:41:11 -04:00
Evan You
54d06ec495 feat(runtime-core): support variadic children in h for simple JSX compat
ref: #1917
2020-08-21 21:54:33 -04:00
Evan You
7454e2a52b build(deps): upgrade to TypeScript 4 2020-08-20 17:48:28 -04:00
HcySunYang
255a2bd178
test(runtime-core): add tests for the optimized mode (#1884) 2020-08-20 10:56:31 -04:00
Evan You
d4cc7b2496 fix(teleport): only inherit el for non-patched nodes
fix #1903
2020-08-20 10:44:28 -04:00
Evan You
1eb6067a85 fix(runtime-core): fix beforeUpdate call timing to allow state mutation
fix #1899
2020-08-19 17:57:51 -04:00
Evan You
eb2ae44d94 refactor(types): widen Component type to include consutructor types
returned from `defineComponent`

ref: https://github.com/vuejs/vue-router-next/pull/421
also close #1880

Previous `Component` type is now exported as `ConcreteComponent`.

This introduces a minor breaking change when calling `h(comp, { ... })`
will now fail if `comp` is a of generic `Component` type, since it does
not specify what props it expects.
2020-08-19 16:19:25 -04:00
Evan You
223f180529 test(watch): add same value skipping trigger test 2020-08-14 17:35:49 -04:00
HcySunYang
caccec3f78
fix(runtime-core/scheduler): sort postFlushCbs to ensure refs are set before lifecycle hooks (#1854)
fix #1852
2020-08-14 09:50:23 -04:00
Evan You
611437a3fe fix(runtime-core/scheduler): allow component render functions to trigger itself
fix #1801
2020-08-13 17:42:47 -04:00
HcySunYang
3991ff03ce
fix(runtime-core): separate null vs. non-null ref value updates (#1835)
fix #1789, fix #1834
2020-08-13 12:27:17 -04:00
Evan You
791eff3dfb fix(runtime-core): avoid manual slot invocation in template expressions interfering with block tracking
fix #1745
2020-08-06 10:16:13 -04:00