Commit Graph

135 Commits

Author SHA1 Message Date
Evan You 052febc127 feat(compiler): convert text mixed with elements into createVNode calls
This ensures they are tracked as dynamic children when inside blocks.
Also guaruntees compiled vnodes always have vnode children in arrays
so that they can skip normalizeVNode safely in optimized mode.
2019-10-21 15:52:29 -04:00
Evan You a0d570b16d Revert "feat(compiler-core): hoist element with static ref (#344)"
Static refs still need to be tracked in dynamicChildren because unmount
also takes the fast path when dynamicChildren is present, and all refs
need to be properly unmounted.

This reverts commit 920773fc6b.
2019-10-21 15:17:29 -04:00
HcySunYang 920773fc6b feat(compiler-core): hoist element with static ref (#344) 2019-10-21 10:29:17 -04:00
Evan You 1b9bd6912e perf: v-for fragments do not need to track dynamicChildren 2019-10-21 10:00:45 -04:00
HcySunYang 71f3826f99 chore: rename & property missing (#335) 2019-10-21 10:00:23 -04:00
Evan You 869ae19c41 fix(compiler): cache handlers should be per-instance, fix hoist w/ cached handlers 2019-10-20 17:00:11 -04:00
Dmitry Sharshakov 39157f7671 chore: fix ci (#338) 2019-10-19 20:03:15 -04:00
Evan You 58593c4714 feat(v-on): cache handlers 2019-10-18 21:51:34 -04:00
Evan You e98a85f3cb refactor: applyDirectives -> withDirectives 2019-10-18 16:35:01 -04:00
宋铄运 7f23eaf661 feat(core): support dynamic component via <component :is> (#320) 2019-10-18 12:09:04 -04:00
大江东去 bb9dca2047 test(compiler-core): add test for custom delimiter (#315) 2019-10-17 15:04:52 -04:00
Evan You e97951dd2e feat: emit compiler error for invalid JavaScript expressions 2019-10-16 17:43:41 -04:00
Evan You d69db0b2fd feat(compiler-core/v-slot): only force dynamic slots when referencing scope vars
This feature is only applied with prefixIdentifiers: true.
2019-10-16 15:35:04 -04:00
Evan You 5e97643c85 feat(compiler-core/v-model): generate modelModifiers for component v-model 2019-10-16 15:35:04 -04:00
Evan You 25dd507f71 feat(compiler-core/v-model): error when v-model is used on scope variable 2019-10-16 15:35:04 -04:00
Evan You 5481f76ce8 feat(compiler-core/v-model): avoid patching v-model handler when possible 2019-10-16 15:35:04 -04:00
Evan You 6a75c3463b feat(compiler-core): do not generate TEXT flag if child is constant 2019-10-16 12:00:55 -04:00
xiaoboost 32499b16e7 types: improve typing (#309) 2019-10-16 10:31:40 -04:00
月迷津渡 f71bf2f1d3 feat: add isCustomElement option (#299) 2019-10-15 17:30:47 -04:00
HcySunYang 3385480ba7 fix(compiler-core): avoid prefixing empty interpolations (#290) 2019-10-15 16:58:01 -04:00
Evan You 4cee06ddab refactor(compiler-core): follow up on #276 2019-10-15 11:51:52 -04:00
HcySunYang 68a3879b88 feat(compiler-core): more hoisting optimizations (#276) 2019-10-15 11:41:24 -04:00
terencez 4547d85a38 feat(compiler-core): support <portal> in template (#203) 2019-10-14 15:11:04 -04:00
likui 46e64b257c feat(compiler-core/runtime-core): show codeframe in runtime compile errors (#220) 2019-10-12 19:49:23 -04:00
Illya Klymov 584ac88b54 fix(compiler): update v-if directive to use Comment instead of Empty (#208) 2019-10-11 11:04:55 -04:00
Evan You e6d0d08a43 test(compiler): test for DirectiveTransform returning needRuntime: Symbol 2019-10-10 18:05:43 -04:00
Evan You d376439167 wip(compiler-dom): v-model runtime 2019-10-10 18:02:51 -04:00
Adam Dorling 497ed19277 chore: remove copy-paste comment from v-cloak (#193) 2019-10-10 14:54:50 -04:00
月迷津渡 78f60347dc feat(compiler): add isNativeTag option for determining element type (#139) 2019-10-10 14:54:06 -04:00
月迷津渡 f71d252ffe fix(compiler-core): assest id (#190)
* fix(compile-core): asset id

* test(compile-core): asset id
2019-10-10 13:55:26 -04:00
Cédric Exbrayat 4ca32c537d test(compiler): fix copy paste in v-once spec (#191) 2019-10-10 13:54:22 -04:00
Illya Klymov 80f5cb2700 fix(compiler): do not hoist element with dynamic key (#187) 2019-10-10 11:19:17 -04:00
Evan You f11dadc1d2 refactor(compiler): improve member expression check for v-on & v-model 2019-10-10 11:15:24 -04:00
Rahul Kadyan 87c3d2edae feat(compiler-core): create transform for v-model (#146) 2019-10-10 10:33:58 -04:00
Evan You 93c6aa4c90 feat: v-once
Note: only compiler transform is tested - integration with runtime
still needs to be tested.
2019-10-09 17:32:58 -04:00
Evan You 5dfb271551 feat(compiler): implement support for v-pre 2019-10-09 16:00:08 -04:00
Rahul Kadyan 19c65a61ea refactor(compiler-core): use directive name in error code identifier (#163) 2019-10-09 10:27:24 -04:00
Evan You 0615cf0108 refactor(compiler): flush transform onExit in reverse 2019-10-08 16:53:26 -04:00
Evan You f15528350e test: test expression transform for reserved literals 2019-10-08 11:27:48 -04:00
Evan You 16da9ae89f fix(compiler): handle block nodes with custom directives + improve ast types 2019-10-08 10:50:10 -04:00
Evan You 57a5c61320 test: tests for hoistStatic 2019-10-07 17:12:22 -04:00
Evan You c4f9b6d592 test: fix import 2019-10-05 23:20:02 -04:00
Evan You 82bd9eb1db refactor(compiler): refine codegen node types 2019-10-05 22:48:13 -04:00
Evan You bfecf2cdce refactor(compiler): use symbols for runtime helpers 2019-10-05 22:48:13 -04:00
Andrey Sukhonosov de9507b6ff fix(compiler/codegen): add simple expression node opening bracket for ConditionalExpression (#110) 2019-10-05 15:42:49 -04:00
Vladimir f48a2ffc76 chore: fix typos (#103) 2019-10-05 10:48:54 -04:00
Martin Rojo ea4a352ee6 fix(typo): transformSlotOutlet name correction (#83) 2019-10-04 22:12:51 -04:00
Evan You 277651ce89 fix(compiler): avoid hoisting components and directive calls 2019-10-04 14:34:26 -04:00
Evan You caccf92721 test: fix vbind tests 2019-10-04 08:38:53 -04:00
Evan You 6059fe69e8 fix(compiler): patchFlag analysis should factor in props returned by directive transforms 2019-10-04 08:37:10 -04:00