Releases: vuejs/vue
0.11.6
0.11.6 is finally here!
New
- Added
inline-templateparam forv-component. - Added
debounceparam forv-model. optionparam forv-modelnow supports filters.v-modelnow interopts with jQuery events.
Changed
<content select="">selectors now can only select top-level childNodes of the host node. This new behavior is more consistent with the Shadow DOM spec and also fixes issues where the selector can match unwanted nodes in nested transclusions.- JavaScript transition functions' invocation context are now always the closest vm of the node being transitioned, regardless of which vm the transition directive belongs to. This means if a node being transition is a vm's root node, that vm will be used as the
thiscontext. v-repeatnow uses an in-place update strategy for better DOM/instance reuse when the following conditions are met:- the repeated block doesn't contain components;
- the repeated list is not using transitions.
This change should not break existing usage.
Fixed
- #655 directives on block instance containers are not compiled
- #670 honor
numberoption for select with multiple attribute - #684 attach/detach hooks for transcluded components inside
v-ifare never called - #695
nameoption should be inherited - #707
v-repeatnot working on$data - #715 boolean literals not working with
v-with - #716 unwatch causing error during destroy
- #717 error parsing multiline expressions
- #720 return empty string for Infinity and properly format floating point values
- #721 support sorting by $key and $value in
orderByfilter - #728
v-ifandv-partialnot calling unlink functions when unbound - #736 parent content loses reactivity when transcluded
- #760
<textarea>placeholders become its value in IE10/11 - #761
v-modelnot working$valueinsidev-repeat - #766
<option value="">initial value is undefined - #772 reserved prefix check cannot handle Number arguments
- #779 bi-directional filters not working in attribute interpolations
- #781 reference errors are not handled in
vm.$get - #783 nested repeat instances inherting parent
_reusedflag - #784 Cannot use global
Dateand thenewkeyword inside expressions - #791 instances with
inherit:truecalling unlink functions of parent when destroyed
Many Thanks to These Awesome Contributors!
0.11.5
0.11.5 is mostly about shipping the changes and fixes that were already done a while ago - fixes for current issues will land in next release.
Changed
Vue.nextTicknow usesMutationObserverwhen available for asynchronous updates, and falls back tosetTimeout. This should fix issues where Vue doesn't update when the tab is out of focus.v-withis now two-way binding between a parent property and a child property, instead of a one-way update.
Fixed
0.11.4
New
-
New directive:
v-eventsThis directive allows you to listen to a child component's events in the template:
<!-- inside parent template --> <div v-component="child" v-events="change: onChildChange"></div>
When the child component fires a
changeevent (viavm.$emit('change'), not DOM events), the parent'sonChildChangemethod will be invoked. This allows more decoupled parent-child communication without having to hard-code event listeners into the parent component.Note
v-eventscan only be used together withv-component, i.e. on the root element of a child component. -
v-styleimprovements- Now accepts both camelCase and dash-case, so both
"margin-left"and"marginLeft"work the same way. - The old syntax for auto-prefixing (prefix with
$) has been deprecated;v-stylenow automatically detects and caches the appropriate prefix to add when setting the styles, so you can just use non-prefixed properties without worrying about it.
- Now accepts both camelCase and dash-case, so both
Changed
- User watcher callbacks registered via
vm.$watch()are now guaranteed to be fired after directives that depend on the same data have been updated. For example, if a directive and a$watchcallback both depend on the data propertya, whenachanges, the directive will perform the DOM update first, then the$watchcallback will be called. This ensures that inside$watchcallbacks the DOM will always be in a resolved state. Note this mechanism is not guaranteed whenVue.config.asynchas been set tofalse. - When
Vue.config.debugis set to true, Vue will now automatically use synchronous mode and throw adebuggerstatement when there is a warning. This enables the user to inspect the full stack trace in browser dev tools.
Fixed
- fixed a bug that causes custom element syntax +
v-repeatnot working together - #618
0.11.3
0.11.2
Changed
- Mixins are now resolved before the option object that contains it. An example is by the time your component's
createdhook is called, all its mixins'createdhooks would have already been called in order. - Mixins can be composed by including another mixin
Fixed
0.11.1
Component compilation scope change
When a component is used in a parent template, e.g.:
<div v-component="child" v-show="active" v-on="click:onClick">
<p>{{message}}</p>
</div>The directives (v-show and v-on) and the transclusion content ({{message}}) will now be compiled in the parent's scope. That means the value of active, onClick and message will be resolved against the parent. Any directives/interpolations inside the child's template will be compiled in the child's scope. This ensures a cleaner separation between parent and child components.
Advanced transition control parameters for v-component
-
wait-forAn event name to wait for on the incoming child component before switching it with the current component.
This allows you to wait for asynchronous data to be loaded before triggering the transition to avoid unwanted flash of emptiness in between.Example:
<div v-component="{{view}}" wait-for="data-loaded"></div>
// component definition { compiled: function () { var self = this $.ajax({ // ... success: function (data) { self.$data = data self.emit('data-loaded') } }) } }
-
transition-modeBy default, the transitions for incoming and outgoing components happen simultaneously.
This param allows you to configure two other modes:in-out: New component transitions in first, current component transitions out after incoming transition has finished.out-in: Current component transitions out first, new componnent transitions in after outgoing transition has finished.
Example
<div v-component="{{view}}" v-transition="fade" transition-mode="out-in"> </div>
Exposed additional internals:
Only intended for advanced users who wish to dynamically extend Vue and are familiar with the source code.
- Key code aliases for the
keyfilter: Now accessible asVue.filter('key').keyCodes - Input type handlers for
v-model: Now accessible asVue.directive('model').handlers - Parsers and Compiler: Now accessible as
Vue.parsers&Vue.compiler.
Other new features
-
v-stylenow accept an object of CSS property/value pairs. (suggested in #578, and thanks to @skovhus for the pull request!) -
New custom directive option:
deep.When this option is set to true and the directive is bound to an object, it will collect all nested properties of that object as dependencies, so that any nested property change will also trigger the directive's
upadtefunction. -
When using
dataoption in multiple extension/mixins, the returned values will now be recursively merged. (#594)Example:
var A = Vue.extend({ data: function () { return { a: 1 } } }) var B = A.extend({ data: function () { return { b: 2 } } }) var b = new B() b.$log() // -> { a: 1, b: 2 }
-
The
jsonfilter is now bi-directional and can be used on a<textarea>withv-modelfor two-way binding. -
trackbyforv-repeatis nowtrack-by, for more consistent naming. Thetrackbyusage is still preserved for backwards compatibility.
Bug fixes
v0.11.0: Cowboy Bebop
"There are ends we don't desire, but they're inevitable, we have to face them. It's what being human is all about." - Jet Black
0.11.0 is rewritten from the ground up and contains many breaking changes. Please read through the change list before upgrading.
Vuejs.org has been updated to match 0.11.0 API; Docs for 0.10.6 have been moved to legacy.vuejs.org.
Changes since 0.11.0-rc3
paramAttributesoption now auto stripsdata-prefixes and uses camelized attribute name as the property name. Docs- If there is a leaving transition, the
destroyedhook is now called after the transition has finished and the element has been removed from the DOM. - JavaScript transition functions now have their
thiscontext set to the owner vm. - Fixed: #512, #517, #520, #531, #536, #539, #541
0.11.0-rc3
New
- New partial compilation implementation. This enables a few new features/changes:
- dynamic partial:
<div v-partial="{{partialId}}"></div>now reacts to change ofpartialId. - new
v-ifimplementation: no longer using an anonymous wrapper instance, should work more intuitively. - new instance method:
vm.$compile()can dynamically compile a piece of DOM. more details
- dynamic partial:
- New global config option:
Vue.config.async. Defaults totrue; if set tofalsewill force Vue to use synchronous view/watcher updates. - New instantiation option:
watch
Changed
-
Custom directive API change:
isFnoption for directives is removed.- instead there's a new option:
acceptStatement.
-
Component directive scope change:
directives on the root element of a component from the parent's template will be compiled in the parent's scope. For example:
<div v-component="comp" v-show="ok"></div>
Here the
v-showwill be compiled in parent scope, thus it is bound to theokproperty on the parent, not the component itself.Note that if the directive is part of the component's own template, however, it will be compiled in the component's scope instead.
Fixed
0.11.0-rc2
API changes
$mount()now creates an empty div if no argument is provided.
Internal changes
No longer mutates data objects' __proto__ by default. Vue.config.proto now only affects observed Arrays.
Bug fixes
- fix v-repeat error when dealing with duplicate primitive values
- fix #447 computed properties bound to wrong context
- fix #448 v-attr should remove attribute when value === false
- fix #450 custom element component unnecessary warning
- fix $appendTo & $before target in document check
- fix content transclusion with replace:true + block instance
- fix #458 dynamic component using meta properties
- fix #468 dynamic literals with falsy initial value
- fix #471 merging default data with already observed instance data
0.11.0-rc
This is a release candidate for 0.11.0.
Changes
https://github.com/yyx990803/vue/blob/0.11.0-rc/changes.md
Installation
npm install [email protected]component install [email protected]bower install vue#0.11.0-rc- standalone build