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