|
| 1 | +title: Vue.js 0.10 is here! |
| 2 | +date: 2014-03-22 19:00:13 |
| 3 | +type: '{{type}}' |
| 4 | +--- |
| 5 | + |
| 6 | +Vue.js 0.10.0 (Blade Runner) has been released! This release comes with many useful additions based on the suggestions from the users, notably interpolation in literal directives, dynamic components with the new `v-view` directive, array filters, and the option to configure interpolation delimiters. Internally, the codebase has received many refactoring and inprovements which makes Vue.js even faster. |
| 7 | + |
| 8 | +<!-- more --> |
| 9 | + |
| 10 | +See the [Installation](/guide/installation.html) page for the latest builds. |
| 11 | + |
| 12 | +### New |
| 13 | + |
| 14 | +- Literal directives can now contain interpolation tags. These tags will be evaluated only once at compile time. An example usage is conditionally decide which component to instantiate with `v-component="{{type}}"`. [Doc](/guide/directives.html#literal-directives). |
| 15 | +- Attributes listed in the `paramAttributes` option now accept mustache interpolations too. They will also only be evaluated once. |
| 16 | +- `v-repeat` now accepts an argument which will be used as the identifier for the wrapped object. This allows more explicit property access in repeaters. [Doc](/guide/list.html#using-an-identifier). |
| 17 | +- Added `v-view` directive which binds to a string value and dynamically instantiate different components using that string as the component ID. [Doc](/api/directives.html#v-view). |
| 18 | +- Added `filterBy` and `orderBy` filters for `v-repeat`. [Doc](/api/filters.html#filterby). |
| 19 | +- Custom filters that access properties on its `this` context will be considered **computed filters**. [Doc](/guide/filters.html#computed-filters). |
| 20 | +- You can now access the event in `v-on` handler expressions as `$event`. Example: `<a v-on="click:handle('hello', $event)">Hello</a>` |
| 21 | +- Interpolation delimiters can now be customized via the `delimiters` global config option. Example: `Vue.config({ delimiters: ["[", "]"] })` will change the matched interpolation tags to `[[ ]]` for text bindings and `[[[ ]]]` for html bindings. |
| 22 | + |
| 23 | +### Changed |
| 24 | + |
| 25 | +- To use a component as a custom element, the component ID must now contain a hyphen (`-`). This is consistent with the current custom element spec draft. |
| 26 | +- `v-repeat` Arrays' augmented methods have been renamed to `$set(index, value)` and `$remove(index | value)` to better differentiate from native methods. The `replace` method has been removed. |
| 27 | +- When iterating over an Object with `v-repeat`, the object no longer gets a `$repeater` array. Instead, the object is now augmented with two methods: `$add(key, value)` and `$delete(key)`, which will trigger corresponding view updates. |
| 28 | +- Production build now strips all warnings and debug logs. To leverage `debug: true` you now have to use the development version. |
| 29 | +- `v-if` now creates and destroys a child ViewModel instance when the binding value changes, instead of simply removing/inserting the DOM node. In addition, it can no longer be used with `v-repeat`. Use `v-show` or the new built-in array filters instead. |
| 30 | +- `v-with` can no longer be used alone. It now must be used with either `v-component` or `v-view`. `v-component` can also be used as an empty directive just to create a child VM using the default `Vue` constructor. |
| 31 | + |
| 32 | +### Fixed |
| 33 | + |
| 34 | +- `event.stopPropagation()` and `event.preventDefault()` inside `v-on` handlers now work as expected. |
| 35 | +- `parent` option now works properly when used in `Vue.extend` |
| 36 | +- Mustache bindings inside `<textarea>` are now properly interpolated before being set as value. |
| 37 | + |
| 38 | +### Internal |
| 39 | + |
| 40 | +- `v-component`, `v-with` and `v-if` have been re-written for a cleaner compile flow. |
| 41 | +- `v-repeat` has been re-written to use refined diff algorithm which triggers minimum DOM manipulations when the array is set to a different instance containing overlapping elements. This makes it efficient to pipe an Array through filters. |
| 42 | +- The compiling procedure has been further optimized and instantiation perf has increased roughly 20%. |
0 commit comments