Commit Graph

302 Commits

Author SHA1 Message Date
Evan You 00ab9e2e85 refactor: adjust event options handling to be JSX friendly 2020-07-14 13:20:59 -04:00
Evan You 380c6792d8 fix(v-on): refactor DOM event options modifer handling
fix #1567

Previously multiple `v-on` handlers with different event attach option
modifers (`.once`, `.capture` and `.passive`) are generated as an array
of objects in the form of `[{ handler, options }]` - however, this
makes it pretty complex for `runtime-dom` to properly handle all
possible value permutations, as each handler may need to be attached
with different options.

With this commit, they are now generated as event props with different
keys - e.g. `v-on:click.capture` is now generated as a prop named
`onClick.capture`. This allows them to be patched as separate props
which makes the runtime handling much simpler.
2020-07-14 11:48:05 -04:00
Evan You ba3b3cdda9 fix(runtime-core/emits): merge emits options from mixins/extends
fix #1562
2020-07-13 11:55:46 -04:00
Evan You 00f6031fbf test: assert vnode invalid key warning for NaN 2020-07-08 11:48:12 -04:00
Felix Rilling 829b35e426
chore: typo fixes (#1546)
* chore: fix typos in comments/JSDoc.

* chore: fix typo in internal function name.

* chore: fix typos in test comments/descriptions/variable names.
2020-07-08 12:32:42 +02: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 36b6b4f022 fix(runtime-core/template-ref): template ref used in the same template should trigger update
fix #1505
2020-07-06 16:40:00 -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 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 978d9522e8 fix(runtime-core): fix scopeId inheritance for component inside slots 2020-06-26 22:28:55 -04:00
Stanislav Lashmanov 6bc0e0a31a
feat(ssr): renderToStream (#1197) 2020-06-26 11:09:47 -04:00
underfin 1c4e1b6792
fix(runtime-core): should remove no longer present camelCase props (#1413)
fix #1412
2020-06-26 09:16:06 -04:00
Evan You 7ae70ea44c fix(transition): fix appear hooks handling 2020-06-25 16:02:28 -04:00
Evan You e68209bfdb test: bump jest 2020-06-16 12:11:51 -04:00
underfin 6c8bfa1018
fix(runtime-core): fix parent el update on nested HOC self-update (#1360)
fix #1357
2020-06-15 16:46:29 -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
Cathrine Vaage 250eb4a5bc
fix(runtime-core): properly capitalize v-on object keys (#1358) 2020-06-15 11:12:08 -04:00
Carlos Rodrigues 6e9789cef1
test(runtime-core): test multi-root ref assignment (#1374) 2020-06-15 09:31:14 -04:00
Evan You 51510adacb test: fix hmr test 2020-06-12 17:17:01 -04:00
Carlos Rodrigues 8f2a7489b7
fix(hmr): force full update on nested child components (#1312) 2020-06-12 14:31:56 -04:00
Cédric Exbrayat cab769f174
fix(types): add RawSlots in h signature (#1293) 2020-06-12 10:38:56 -04:00
underfin c463a71bb3
fix(ssr): fix unintended error on `Teleport` hydration mismatch (#1271)
fix #1235
2020-06-12 10:01:56 -04:00
tangjinzhou d437a0145d
fix(runtime-core): default value for function type prop (#1349)
fix #1348
2020-06-12 09:06:28 -04:00
Evan You 215c106297 test: test for mixin/extends props merging 2020-06-09 16:20:33 -04:00
doly mood d3c436ae2e
feat(types): mixins/extends support in TypeScript (#626) 2020-06-09 10:37:00 -04:00
Evan You 2408a65662 fix(hmr): force full update in child component on slot update 2020-05-29 10:50:01 -04:00
Evan You 0a7932c6b3 fix(ssr): should set ref on hydration 2020-05-21 17:37:23 -04:00
Yang Mingshan ba62ccd55d
feat(watch): support directly watching reactive object in multiple sources with deep default (#1201) 2020-05-18 11:02:51 -04:00
underfin 520cad7d4d
test(runtime-core): add test case for `createBlock` with disableTracking (#1169) 2020-05-18 10:20:05 -04:00
underfin efa3214866
test(runtime-core): add test for `renderSlot` (#1160) 2020-05-18 10:14:09 -04:00
Evan You dc229bcda4 wip(hydration): hydrate multi-element static nodes 2020-05-15 16:30:20 -04:00
Evan You aa1672a8bd test: fix hmr test id 2020-05-11 15:44:13 -04:00
Evan You 1b946c85df fix(hmr): always force full child component props update in HMR mode 2020-05-11 14:17:35 -04:00
Evan You 8df6bc0132 refactor: reuse parseStringStyle across compiler and runtime 2020-05-06 11:22:49 -04:00
t-zzzzzzzzz 2d9f136077
fix(runtime-dom/style): normalize string when merging styles (#1127) 2020-05-06 11:14:07 -04:00
Evan You 6b33cc4229 feat(watch): support directly watching reactive object with deep default
Also warn invalid watch sources

close #1110
2020-05-04 09:27:28 -04:00
Evan You d901b6bea8 refactor(reactivity): use more efficient reactive checks
WeakSets and WeakMaps shows degrading performance as the amount of
observed objects increases. Using hidden keys result in better
performance especially when repeatedly creating large amounts of
reactive proxies.

This also makes it possible to more efficiently declare non-reactive
objects in userland.
2020-05-02 16:58:17 -04:00
underfin 8b85aaeea9
fix(runtime-core): should call Suspense fallback unmount hook (#1061)
fix #1059
2020-05-01 16:20:16 -04:00
Evan You 68e1ce8b66 refactor(types): mark more internal APIs 2020-05-01 10:37:40 -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
Evan You ded92f93b4 fix(runtime-core): dynamic component should support falsy values without warning 2020-04-24 15:32:47 -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 d7379c7647 fix(runtime-core): fix key/ref resolution for cloneVNode
fix #1041
2020-04-24 12:42:46 -04:00
Evan You dcf2458fa8 fix(runtime-core): fix dynamic node tracking in dynamic component that resolves to plain elements
fix #1039
2020-04-24 12:18:51 -04:00
Evan You ff4d1fcd81 fix(runtime-core): mixin options that rely on this context should be deferred
Also ensure consistent option apply order with Vue 2, close #1016, close #1029
2020-04-22 16:36:18 -04:00
Andrew Talbot cebad64d22
feat(runtime-core): improve warning for extraneous event listeners (#1005)
fix #1001
2020-04-20 16:40:59 -04:00
Evan You 171cfa404f fix(runtime-core): should not cast prop value if prop did not change
fix #999
2020-04-20 14:16:25 -04:00
Evan You d7ca1c5c6e fix(runtime-core): fix user attched public instance properties that start with "$" 2020-04-17 10:23:10 -04:00
Carlos Rodrigues 99fd158d09
fix(watch): fix deep watchers on refs containing primitives (#984) 2020-04-17 09:55:41 -04:00