Commit Graph

64 Commits

Author SHA1 Message Date
赵鑫晖
59dbd4a414 fix: ensure $attrs and $listeners are always objects (#6441)
fix #6263
2017-08-29 22:59:39 +02:00
Evan You
61187596b9 feat(core): $attrs, $listeners & inheritAttrs option
New features intended for easier creation of higher-order components.

- New instance properties: $attrs & $listeners. these are essentially aliases
  of $vnode.data.attrs and $vnode.data.on, but are reactive.

- New component option: inheritAttrs. Turns off the default behavior where
  parent scope non-prop bindings are automatically inherited on component root
  as attributes.

close #5983.
2017-07-11 22:38:09 +08:00
Evan You
11614d63b7 feat(v-on): support v-on object syntax with no arguments
Note this does not support modifiers and is meant to be used for handling
events proxying in higher-order-components.
2017-07-11 16:36:04 +08:00
wenlu.wang
3965e5053a feat: support sync modifier for v-bind="object" (#5943)
close #5937
2017-06-30 08:46:54 +08:00
Evan You
c994e5cf48 upgrade flow 2017-06-13 17:42:16 +08:00
Evan You
36bdf48550 handle dynamic class 2017-05-17 23:46:14 +08:00
Evan You
9fbca0dc79 remove unused, fix type 2017-05-17 14:40:06 +08:00
Evan You
26953f5cac add semis to flow decls for better syntax highlighting 2017-05-15 16:01:30 +08:00
Evan You
0ccefff794 support v-for on scoped slots (fix #5615) 2017-05-09 23:22:55 +08:00
Herrington Darkholme
bb7c543fc2 fix #5539: improve isDef type definition (#5549)
* fix #5539: improve flow type coverage

* skip unnecessary object creation

* use flow internal syntax to enable predicate type
2017-04-29 14:24:06 +08:00
Evan You
a7965292f4 comments for flow type nodes 2017-04-07 16:10:36 +08:00
kazuya kawaguchi
0922b1d8aa improve set/delete API (#5050) 2017-03-03 12:07:42 +08:00
Bojan
1b38a261c5 support multi event (#5056) 2017-03-03 11:51:57 +08:00
Evan You
e7a2510e63 Revert "[WIP] Support for ref callback (#4807)"
This reverts commit acec8db2c4.
2017-02-24 18:17:04 -05:00
Evan You
4cf49828c0 properly handle cosntructor options modification before global mixin application (fix #4976) 2017-02-23 18:11:18 -05:00
Evan You
73c5614740 update types for new features 2017-02-21 22:35:50 -05:00
Evan You
689c107de4 feat: config.performance 2017-02-20 18:35:04 -05:00
Evan You
9ccffe72db invoke activate/deactivate recursively + refactor (close #4242) 2017-02-17 18:56:09 -05:00
kingwl
8bb6c2bdaa support $on multi event (#4860) 2017-02-15 18:39:53 -05:00
Rahul Kadyan
acec8db2c4 [WIP] Support for ref callback (#4807)
*  Tests for ref callback

*  Support for ref callback

* Add test of inline ref callback

* adjust ref implementation strategy

* fix patch ref registration

* fix tests

* fix flow

* fix test for phantomjs
2017-02-15 17:29:13 -05:00
Evan You
406352baba move computed properties definition to component prototype when possible 2017-02-14 12:03:14 -05:00
Evan You
87ffd0da9f tweaks 2017-02-14 11:39:05 -05:00
yantene
22f9560c92 add $props 2017-02-14 11:39:05 -05:00
Evan You
e7083d09f1 fix scoped slots with dynamic slot names + force update for child components with scoped slots (fix #4779) 2017-01-24 11:04:02 -05:00
Evan You
dacd0cf582 createElement flow type correction 2016-12-21 16:42:18 -05:00
Evan You
7ffa77f3df optimize instance hook event lookup 2016-12-13 21:01:12 -05:00
Evan You
7c9e81e772 optimize initEvents 2016-12-13 19:29:07 -05:00
Marshall Shen
6cfd6c7fe9 change any to mixed to make it more type-safe (#4458) 2016-12-12 20:27:18 -05:00
Evan You
4b51ad0483 rename _h -> _c so that vue-template-es2015-compiler can use the new internal createElement without breaking backwards compatibility 2016-12-05 02:36:40 +01:00
Evan You
207c18c47f further reduce normalizeChildren usage 2016-12-05 02:36:40 +01:00
Evan You
79e1058799 wip: refactor compiler to skip normalization when possible
wip fix

wip fix

wip fix
2016-12-05 02:36:40 +01:00
Evan You
e8d6bd9dc7 allow modifier key modifiers on keyboard events and warn overwriting in config.keyCodes 2016-12-01 14:31:55 -05:00
chengchao
6ea9a4db42 Support mutliple keys for keycode (#4328)
* support mutliple keys for keycode

* update flow type

* add test case

* update comment

* update flow type

* update comment
2016-11-30 12:16:10 -05:00
Evan You
aa5f5d1198 ensure $scopedSlots is always an object (close #4301) 2016-11-23 18:04:35 -05:00
Evan You
9ddbbcc340 wip: scoped slot implementation 2016-11-20 12:03:43 -05:00
Evan You
ec824be88e fix v-once inside v-for (fix #3964) 2016-11-02 22:34:36 -04:00
Evan You
99ea0f8229 adjust named slot resolve check (fix #3819) 2016-09-30 14:19:16 -04:00
Evan You
56960b5fbc support object looseEqual in v-model (fix #3673) 2016-09-14 11:35:30 -04:00
Evan You
d6a7568891 improve v-bind implementation and make it work on components (fix #3670) 2016-09-14 10:14:45 -04:00
Evan You
4afccc8eec proper slot duplication warning (fix #3595) 2016-09-08 11:47:22 +02:00
Evan You
4d640ce4d9 tweak v-if to avoid unnecessary node replacement 2016-08-27 17:01:57 -04:00
Evan You
1e74675053 expose Vue.set/delete on instances as vm.$set/$delete 2016-08-17 13:53:50 -04:00
Evan You
18386c4cf4 fix static nodes optimization inside v-for (fix #3406) 2016-08-08 19:03:00 -04:00
Evan You
e6871a33c1 update flow annotations 2016-07-15 17:48:42 -04:00
Evan You
7630622689 expose component placeholder node in render fns as this.$vnode 2016-07-06 12:50:08 -04:00
Evan You
3661b4e78e add _inactive property 2016-06-28 04:00:32 -04:00
Evan You
cf8aeddc12 fix v-once with v-for and remove unused _t method (fix #3155) 2016-06-27 11:18:06 -04:00
Evan You
1d8f3a264e better global mixin strategy 2016-06-25 10:43:19 -04:00
Evan You
3fe127b05a fix v-model number conversion (fix #3140) 2016-06-22 21:43:52 -04:00
Evan You
f0b8f2e290 attach __vue__ to elements to support devtools 2016-06-22 14:18:56 -04:00