Commit Graph

173 Commits

Author SHA1 Message Date
Evan You 3b64508e3b feat: v-memo 2021-07-16 14:30:49 -04:00
HcySunYang ceff89905b perf: improve VNode creation performance with compiler hints (#3334) 2021-07-16 14:30:49 -04:00
Evan You c0db807844 refactor: simplify static content insertion 2021-07-15 13:16:19 -04:00
Evan You ba89ca9eca fix(runtime-dom): fix static node content caching edge cases
reverts fded1e8

fix #4023, #4031, #4037
2021-07-01 19:19:53 -04:00
Evan You 32e21333dd fix(runtime-core): stricter compat root mount check 2021-05-27 20:47:46 -04:00
HcySunYang a641eb201f
fix(runtime-core): fix cases of reused children arrays in render functions (#3670)
fix #3666
2021-05-27 17:06:55 -04:00
Evan You 9f24195d2c fix(suspense): fix suspense patching in optimized mode
fix #3828
2021-05-27 16:32:31 -04:00
HcySunYang e8ddf86080
fix(runtime-core): properly check forwarded slots type (#3781)
fix #3779
2021-05-26 11:52:03 -04:00
HcySunYang 201060717d
fix(runtime-core): should not track dynamic children when the user calls a compiled slot inside template expression (#3554)
fix #3548, partial fix for #3569
2021-05-25 13:33:41 -04:00
Evan You bb76cfae12 wip: test for v-model compat 2021-04-29 16:22:39 -04:00
Evan You 86703c23a6 wip: ref v-for compat 2021-04-26 17:35:41 -04:00
Evan You 1b8f14ee76 wip: more compat progress 2021-04-21 15:09:18 -04:00
Evan You 183f9b0013 wip: component v-model compat 2021-04-09 23:10:29 -04:00
Evan You f05d6dfd98 wip: render function compat 2021-04-09 18:56:31 -04:00
Evan You 18cf63ff05 wip: async component compat 2021-04-08 16:11:28 -04:00
Evan You aea88c3280 refactor: fix implementation of SFC :slotted id handling
fix #2892
2021-03-05 18:28:12 -05:00
Evan You 5a7a1b8293 fix(hmr): deep clone reused hoisted trees during dev
fix vitejs/vite#2022
2021-02-15 15:09:27 -05:00
Evan You 64d4681e4b fix(async-component): forward refs on async component wrapper
fix #2671
2020-11-30 18:59:14 -05:00
被雨水过滤的空气 edd49dcab4
fix(runtime-core): avoid mutating EMPTY_ARR when setting dev root (#2419)
also freeze EMPTY_ARR in dev

fix #2413
2020-10-19 18:08:54 -04:00
ᴜɴвʏтᴇ 052a621762
feat(compile-core): handle falsy dynamic args for v-on and v-bind (#2393)
fix #2388
2020-10-19 17:15:53 -04:00
Katashin 422f05e085
fix(hmr): make hmr working with class components (#2144) 2020-09-18 00:14:59 -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
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
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 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
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
Li Chen 0f8c9917f8
chore(runtime-core): use ReactiveFlags.SKIP in vnode for consistency (#1901) 2020-08-21 13:45:42 -04:00
Evan You f02e2f99d9 fix(runtime-core): disable block tracking when calling compiled slot function in tempalte expressions
fix #1745, fix #1918
2020-08-21 12:47:45 -04:00
HcySunYang 7ffb79c563
fix(runtime-core): correctly track dynamic nodes in renderSlot (#1911) 2020-08-20 09:37:26 -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 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
Evan You fbf865d9d4 fix(compiler-core): always compile Teleport and Suspense as blocks 2020-07-28 11:12:43 -04:00
Evan You c852bf18d7 fix(v-model): v-model listeners should not fallthrough to plain element root
fix #1643
2020-07-21 14:17:48 -04:00
Evan You 1af3531719 fix(runtime-core): fix attr fallthrough on compiled framgent w/ single static element + comments 2020-07-21 13:11:19 -04:00
Evan You 6390ddfb7d fix(runtime-core): do not use bail patchFlag on cloned vnodes
fix #1665

- cloned vnodes with extra props will receive only the full props flag
- this commit affects `cloneVNode` behavior when used in manual render
  functions.
  - ok for normal elements since elements only use patchFlags for own
    props optimization
  - full props flag is skipped for fragments because fragments use
    patchFlags only for children optimization
  - this also affects `shouldUpdateComponent` where it should now only
    respect patchFlags in optimized mode, since component vnodes use
    the patchFlag for both props and slots optimization checks.
2020-07-21 13:11:19 -04:00
Evan You 03c681e396 refactor(types): move component props interfaces + expose `AllowedComponentProps`
fix #1632
2020-07-19 14:09:53 -04:00
Stanislav fa5ddf8d06
chore(types): convert type literals to records (#1615) 2020-07-18 22:56:28 -04:00
HcySunYang 5d8a64d53a
feat(types): deny unknown attributes on component by default (#1614)
close #1519
2020-07-17 11:43:28 -04:00
Evan You aab99abd28 fix(slots): properly force update on forwarded slots
fix #1594
2020-07-15 20:12:49 -04:00
Pick 2b60870f8a
refactor(types): improve code readability & friendly to type hints (#1560) 2020-07-14 16:33:30 -04:00
Evan You d7184c99e6 refactor(types): add VNode to VNodeTypes 2020-07-06 21:12:15 -04:00
Evan You 31e37b417b chore: warn NaN vnode key 2020-07-06 18:56:21 -04:00
Evan You c9629f2692 feat(runtime-core): support creating vnode from existing vnode
This allows passing vnode around with curried props and use it in
places where VNodeType is expected, e.g. `<component :is=""/>`
2020-07-01 19:48:01 -04:00
Evan You d5dbd27193 fix(ssr): handle fallthrough attrs in ssr compile output 2020-06-26 16:55:37 -04:00
Albert Liu a60f3b1430
refactor(types): remove unnecessary as any (#1411) 2020-06-25 11:05:39 -04:00
Evan You be69beed5e fix(runtime-core): cloneVNode should preserve correct ctx instance when normalizing ref
fix #1311
2020-06-15 15:57:37 -04:00
Evan You e76ed4c269 refactor(hmr): simplify hmr force update check 2020-06-12 14:53:48 -04:00
Evan You 3fafc3b3ac
types(runtime-core): improve types for transition hook (#1009)
* types(runtime-core): improve types for transition hook

fix #1000

* Update packages/runtime-core/src/components/BaseTransition.ts

Co-Authored-By: Carlos Rodrigues <david-181@hotmail.com>

* fix: run ci

Co-authored-by: Carlos Rodrigues <david-181@hotmail.com>
2020-06-11 16:39:18 -04:00
Evan You e4dc03a8b1 feat(types): adjust type exports for manual render function and tooling usage
- v-model and v-show directives are now exposed as public
- compiler-used runtime helpers are now exposed for TS tooling, but marked as @private

close #1329
2020-06-10 14:57:21 -04:00
Evan You 24168bbb33 chore: improve comments 2020-05-18 11:17:57 -04:00