Commit Graph

302 Commits

Author SHA1 Message Date
Evan You
02339b67d8 perf: hoist dynamic props lists 2021-07-16 14:30:49 -04:00
Evan You
63a51ffcab chore: fix test failing types 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
5af718ba41 fix(v-model): support calling methods in v-model expression
close #3993
2021-07-15 13:34:42 -04:00
Evan You
395572b593 fix(v-on): proper member exp detection for bracket assignment
fix #4097
2021-07-15 13:26:09 -04:00
Evan You
963085d18c fix(v-on): properly detect member expressions with optional chaining
fix #4107
2021-07-15 12:23:07 -04:00
edison
c23153d82e
fix(compiler-core): fix forwarded slots detection on template slots (#4124)
fix #4123
2021-07-15 11:37:11 -04:00
Evan You
08e93220f1 fix(compiler-core/compat): fix is prop usage on components
also fix v-bind:is usage on plain element in compat mode

fix #3934
2021-06-21 16:16:49 -04:00
Evan You
bc100c5c48 fix(compiler-core): improve member expression check
fix #3910
2021-06-09 11:57:48 -04:00
HcySunYang
9b2e894017
fix(compiler-core): improve the isMemberExpression function (#3675) 2021-05-27 21:07:26 -04:00
HcySunYang
47da92146c
fix(compiler-core): fix whitespace management for slots with whitespace: 'preserve' (#3767)
fix #3766
2021-05-13 18:24:43 -04:00
HcySunYang
a56ab148fd
fix(compiler-core): bail out to array children when the element has custom directives + only one text child node (#3757) 2021-05-12 16:12:32 -04:00
Evan You
7a8cee8688 wip: remove v-if key warning as there are legit use cases 2021-05-05 16:35:44 -04:00
Evan You
b047a0864c refactor(compiler): improve whitespace: 'preserve' behavior from #1600
- discard leading/ending whitespace inside an element
- condense preserved whitesapce into single space
2021-04-26 11:46:17 -04:00
CodeDaraW
dee3d6ab8b feat(compiler-core): whitespace handling strategy 2021-04-26 09:44:27 -04:00
Evan You
c5c304af14 wip: compiler should default to v3 behavior 2021-04-17 15:55:14 -04:00
Calvin Liang
0fe567abfc
fix(compiler-core): properly transform replaced nodes (#2927) 2021-03-29 18:08:10 -04:00
Evan You
f5827fdf78 fix(compiler-sfc): do not resolve assets from setup bindings
when not using script setup

fix #3270, fix #3275
2021-03-29 16:11:38 -04:00
HcySunYang
555b016dcb
fix(compiler-core): allow PascalCase dynamic component tag usage (#3508)
fix #3507
2021-03-29 15:18:25 -04:00
Evan You
37c17091fd fix: ensure backwards compat for pre-compiled sfc components
fix #3493
2021-03-27 10:53:45 -04:00
Evan You
abd129d845 fix(component): prioritize registered component over implicit self-reference via filename
ref: #2827
2021-03-26 10:04:36 -04:00
HcySunYang
ebedcccdc0
fix(compiler-core): allow unicode to appear in identifiers (#3443)
fix #3440
2021-03-25 17:24:18 -04:00
HcySunYang
7715c49af9
fix(compiler-core): avoid generating useless createVNode helper (#2938)
close #2739
2021-03-25 17:01:50 -04:00
HcySunYang
b4b82159e2
fix(compiler-core): should not condense whitespace in RCDATA text mode (#3482)
fix #3479
2021-03-25 15:53:03 -04:00
HcySunYang
4bf7ba19bf
fix(compiler-core): detect v-if branch root with comment as dev fragment (#2785)
fix #2780
2021-03-25 15:43:44 -04:00
HcySunYang
602b58ebd1
fix(compiler-core): fix the detection of forwarded slots with v-if or v-for (#3353)
fix #3347
2021-03-22 16:34:46 -04:00
Evan You
ff4d4ec249 chore: fix all test cases 2021-03-05 18:28:12 -05:00
Evan You
02cbbb718c perf: support only attaching slot scope ids when necessary
This is done by adding the `slotted: false` option to:

- compiler-dom
- compiler-ssr
- compiler-sfc (forwarded to template compiler)

At runtime, only slotted component will render slot fragments with
slot scope Ids. For SSR, only slotted component will add slot scope Ids
to rendered slot content. This should improve both runtime performance
and reduce SSR rendered markup size.

Note: requires SFC tooling (e.g. `vue-loader` and `vite`) to pass on
the `slotted` option from the SFC descriptoer to the `compileTemplate`
call.
2021-03-05 18:28:12 -05:00
Evan You
aea88c3280 refactor: fix implementation of SFC :slotted id handling
fix #2892
2021-03-05 18:28:12 -05:00
Evan You
338d869c70 test(compiler-core): test expression transform w/ bindingMetadata 2020-12-04 16:46:00 -05:00
Evan You
11a76ebd94 chore: fix snapshot 2020-12-01 09:21:39 -05:00
Evan You
e4f09c1419 fix(compiler-core/v-on): handle falsy values when caching v-on handlers
fix #2605
2020-11-30 16:30:36 -05:00
Evan You
9db7095962 fix(compiler-core): fix scope var reference check for v-on expressions
fix #2564
2020-11-30 15:19:32 -05:00
Evan You
e41b46c396 chore: annotate generated slot flag 2020-11-30 15:19:32 -05:00
Evan You
67d1aac6ae feat(sfc): allow sfcs to recursively self-reference in template via name inferred from filename
e.g. A file named `FooBar.vue` can refer to itself as `<FooBar/>`. This gets rid of the need for the `name` option.
2020-11-30 12:30:51 -05:00
Evan You
3bc2914e32 fix(attr-fallthrough): ensure consistent attr fallthrough for root fragments with comments
fix #2549
2020-11-27 18:04:26 -05:00
edison
ef59a30cab
fix(compiler-core): transform kebab case props to camelcase on slots (#2490)
fix #2488
2020-11-27 09:48:30 -05:00
Evan You
90bdf59f4c refactor(compiler): better constant hoist/stringify checks 2020-11-20 19:26:07 -05:00
Evan You
8ac2241b22 wip: more consistent compiler-sfc usage + inline mode for ssr 2020-11-20 14:23:09 -05:00
Hunter
6d2a1cb64d
fix(compiler-core): fix multiline member expression check (#2436)
fix #2426
2020-10-20 09:31:08 -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
meteorlxy
e2c9ab1991
test(compiler-core): more test cases for baseParse (#2211) 2020-10-13 16:03:33 -04:00
ᴜɴвʏтᴇ
692197be33
fix(compiler-core): fix v-if key injection with v-on object syntax (#2368)
fix #2366
2020-10-13 12:04:52 -04:00
ᴜɴвʏтᴇ
89c5909a6f
fix(compiler-core): allow spaces between if-else branches (#2305)
fix #2299
2020-10-07 20:57:17 -04:00
Evan You
f9566f00df test(compiler-core): add test case for v-on event case conversion 2020-10-06 18:31:04 -04:00
Evan You
f4119249f2 fix(compiler-core): consistently remove comment nodes for pre tags in production
close #2217
2020-10-05 17:53:34 -04:00
HcySunYang
9499871582
fix(compiler-core): make v-once work with v-if/else-if/else (#2182)
Partial fix for #2035
2020-10-05 11:58:37 -04:00
meteorlxy
64f44c671a
chore(compiler-core): fix typo in tests (#2209) 2020-09-23 12:25:52 +02:00
Evan You
be946ea549 fix(compiler-core): fix prefixing for <template v-for> key expressions
fix #2085
2020-09-14 17:04:27 -04:00
Evan You
a096a58e41 fix(compiler-core): fix v-if block handling for components that fail to resolve
fix #2058
2020-09-14 12:41:35 -04:00