Commit Graph

59 Commits

Author SHA1 Message Date
Evan You
da49c863a2 fix(keep-alive): fix unmounting late-included components
fix #3648
based on #3650
2022-05-12 11:52:54 +08:00
那里好脏不可以
6042ab0f2f
chore: type [ci skip] 2022-05-09 22:51:51 -04:00
Thorsten Lünborg
053c65bc5e
dx(suspense): warn when using async setup when not inside a Suspense boundary (#5565)
close #3649
2022-04-13 05:36:43 -04:00
ygj6
820a143457
fix(runtime-core): handle error in async KeepAlive hooks (#4978) 2021-11-22 02:50:19 -05:00
Evan You
47f488350c chore: run updated prettier 2021-07-19 18:24:18 -04:00
b31712ecc5
test(teleport): fix meaningless test case (#2872) 2021-07-15 16:36:36 -04:00
Eduardo San Martin Morote
ab6e927041
fix(Suspense): emit initial fallback and pending events (#3965)
Fix #3964
2021-06-21 17:03:07 -04:00
Evan You
44996d1a0a fix(suspense): fix suspense regression for errored template component
fix #3857
2021-05-31 17:19:03 -04:00
HcySunYang
9e3708ca75
fix(keep-alive): include/exclude should work with async component (#3531)
fix #3529
2021-05-25 10:50:00 -04:00
HcySunYang
3736496006
fix(runtime-core): avoid unmount teleport's children multiple times (#3499)
fix #3497
2021-03-29 15:15:08 -04:00
HcySunYang
776951315d
fix(Teleport): component with multi roots should be removed when unmounted (#3157)
fix #3156
2021-03-25 11:02:50 -04:00
21d1288133
fix(teleport): targetAnchor should also be removed when unmounted (#2870)
* fix(teleport): targetAnchor should also be removed when unmounted

* fix(teleport): targetAnchor should also be removed when unmounted
2021-03-23 10:19:09 +01:00
HcySunYang
67a0290c0a
fix(transition): toggling branches with in-out mode should be transitioned correctly (#3109)
fix #3104
2021-03-22 16:56:24 -04:00
Evan You
aea88c3280 refactor: fix implementation of SFC :slotted id handling
fix #2892
2021-03-05 18:28:12 -05:00
Yasser Lahbibi
cd92836223
fix(teleport): Teleport into SVG elements (#2648)
fix #2652
2020-11-30 17:30:41 -05:00
Evan You
cf7f1dbc9b fix(suspense): fix nested async child toggle inside already resovled suspense
fix #2215
2020-11-26 11:06:55 -05:00
Evan You
0227b4a697 fix(suspense): fix suspense nested child updates in template mode
fix #2214
2020-10-20 12:28:02 -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
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
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
被雨水过滤的空气
890ca8aa34
fix(keep-alive): should use onMounted and onUpdated to invoke cacheSubtree (#1984) 2020-09-14 20:50:06 -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
d4cc7b2496 fix(teleport): only inherit el for non-patched nodes
fix #1903
2020-08-20 10:44:28 -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
zhangzhonghe
233d191d0d
fix(keep-alive): fix activated hook invocation on nested components (#1743)
fix #1742
2020-08-06 09:42:52 -04:00
underfin
04a4ebaaeb
fix(runtime-core): use correct container for moving Teleport content (#1703) 2020-07-28 11:23:39 -04:00
Evan You
341b30c961 fix(watch): post flush watchers should not fire when component is unmounted
fix #1603
2020-07-17 11:17:29 -04:00
Evan You
d86b01ba3a fix(keep-alive): fix keep-alive with scopeId/fallthrough attrs
fix #1511
2020-07-06 18:17:40 -04:00
Evan You
4e8e689572 fix: ensure vnode hooks are called consistently regardless of keep-alive 2020-07-01 19:50:13 -04:00
Evan You
7ae70ea44c fix(transition): fix appear hooks handling 2020-06-25 16:02:28 -04:00
underfin
8b85aaeea9
fix(runtime-core): should call Suspense fallback unmount hook (#1061)
fix #1059
2020-05-01 16:20:16 -04:00
HiiTea
22717772dd
chore: fix typos (#1090) 2020-05-01 09:42:58 -04:00
Carlos Rodrigues
239270c38a
fix(keep-alive): do not invoke onVnodeBeforeUnmount if is KeepAlive component (#1079) 2020-04-30 14:52:03 -04:00
Carlos Rodrigues
f3a9b516bd
fix(types): make return type of defineComponent assignable to Component type (#1032)
fix #993
2020-04-24 13:22:58 -04:00
Evan You
21bcdec943 refactor(runtime-core): adjust attr fallthrough behavior
BREAKING CHANGE: attribute fallthrough behavior has been adjusted
according to https://github.com/vuejs/rfcs/pull/154
2020-04-03 09:20:37 -04:00
Evan You
eee5095692 refactor: rename <portal> to <teleport>
BREAKING CHANGE: `<portal>` has been renamed to `<teleport>`.

    `target` prop is also renmaed to `to`, so the new usage will be:

    ```html
    <Teleport to="#modal-layer" :disabled="isMobile">
      <div class="modal">
        hello
      </div>
    </Teleport>
    ```

    The primary reason for the renaming is to avoid potential naming
    conflict with [native portals](https://wicg.github.io/portals/).
2020-04-01 21:55:19 -04:00
Evan You
8ce3da0104 feat(portal): support disabled prop 2020-03-30 11:24:28 -04:00
Evan You
aafb880a0a feat(portal): support multiple portal appending to same target 2020-03-27 18:42:57 -04:00
Cédric Exbrayat
ebc587376c
refactor(runtime-core): rename createAsyncComponent to defineAsyncComponent (#888)
BREAKING CHANGE: `createAsyncComponent` has been renamed to `defineAsyncComponent` for consistency with `defineComponent`.
2020-03-26 11:59:54 -04:00
Evan You
925ba6bb7b chore: fix tests 2020-03-25 17:55:09 -04:00
Evan You
16cd8eee78 fix(portal): portal should always remove its children when unmounted 2020-03-25 17:27:55 -04:00
Evan You
dbbd9990e0 chore: fix Portal test types 2020-03-24 12:58:12 -04:00
Evan You
123738727a fix(keep-alive): should update re-activated component with latest props 2020-03-24 10:28:00 -04:00
Evan You
b8c1be18f3 refactor(types): use stricter settings
fix #847
2020-03-23 11:08:22 -04:00
hareku
257727569a
types(runtime-core): update error type to unknown (#798) 2020-03-09 15:58:52 -04:00
Evan You
11d2fb2594 refactor(fragments): remove visible anchors for fragments 2020-02-26 16:32:06 -05:00
Evan You
99a2e18c97 feat(runtime-core): add watchEffect API
BREAKING CHANGE: replae `watch(fn, options?)` with `watchEffect`

    The `watch(fn, options?)` signature has been replaced by the new
    `watchEffect` API, which has the same usage and behavior. `watch`
    now only supports the `watch(source, cb, options?)` signautre.
2020-02-22 08:19:10 +01:00