Skip to content

Releases: vuejs/vue

v2.0.0-alpha.5

17 Jun 18:36
Compare
Choose a tag to compare
v2.0.0-alpha.5 Pre-release
Pre-release

New

  • The render function now receives the component instance's $createElement method as its only argument. This avoids having to aliasing this.$createElement to something less verbose:

    Vue.extend({
      render (h) {
        return h('div', null, 'hello!')
      }
    })
  • Functional components:

    A component can be defined as a stateless functional component with functional: true.

    • A functional component has no instance and is simply a function that receives props and children vnodes via arguments, and also return vnode(s).
    • Unlike stateful components, functional components are not restricted by the "single root node" rule and can return an Array of multiple vnodes.
    • A functional component's render function receives the following arguments:
      • createElement: the parent component's $createElement method.
      • props: an object containing props
      • children: children inside the component's tag as vnodes

    Example usage:

    Vue.component('wrap-with-tag', {
      functional: true,
      props: ['tag'],
      render (h, props, children) {
        return h(props.tag, null, children)
      }
    })

    When used in template:

    <wrap-with-tag tag="div">hello</wrap-with-tag>

    Will render:

    <div>hello</div>

Breaking Changes

  • v-ref is now no longer a directive: it is now a special attribute similar to key and transition:

    <!-- before -->
    <comp v-ref:foo></comp>
    
    <!-- after -->
    <comp ref="foo"></comp>

    Dynamic ref bindings are now also supported:

    <comp :ref="dynamicRef"></comp>
  • The <render> tag is removed in favor of stateless functional components.

  • It is now prohibited to replace a component instance's root $data. This prevents some edge cases in the reactivity system and makes the component state more predictable (especially with type-checking systems).

v2.0.0-alpha.4

16 Jun 17:04
Compare
Choose a tag to compare
v2.0.0-alpha.4 Pre-release
Pre-release

New

  • Vue.config.ignoredElements: an Array of element tag names to ignore during render. Elements listed in this option will be rendered as plain elements instead of components.

Fixed

  • Wrong v-for alias check regex in template compilation error detection

v1.0.25

16 Jun 22:33
Compare
Choose a tag to compare

New

  • mixins option can now use constructors returned by Vue.extend in addition to plain objects. (@ktsn)

Fixed

  • fix unknown element warning for <details> etc in Firefox
  • #2890 fix json filter with 0 indent (@posva)
  • #2983 fix v-model select initial value edge cases in IE
  • #2988 fix falsy value output for one time text bindings (@dsonet)
  • #2993 fix comment inside <template> being treated as string (@simplesmiler)
  • #3027 fix MutationObserver-related issues in iOS 9.3 UIWebView (@miccycn)
  • #3039 fix component local name option being overwritten by global registration (@kazupon)
  • #3062 fix multi-line expression inside HTML interpolation

v2.0.0-alpha.3

15 Jun 18:27
Compare
Choose a tag to compare
v2.0.0-alpha.3 Pre-release
Pre-release

Breaking Changes

  • When used with vue-loader or vueify for the scoped CSS feature, content inserted via <slot> will be affected by scoped styles in both the parent and the child, similar to the root element of the child component. This allows the child component to apply scoped styles to inserted content, although this also means the child component needs to be more careful about its selectors.

Fixed

  • Improved template error detection (fixed a number of false alarms)
  • Properly HTML-encode text in server-side rendering.
  • Properly support scoped CSS attributes in server-side rendering.

v2.0.0-alpha.2

13 Jun 23:39
Compare
Choose a tag to compare
v2.0.0-alpha.2 Pre-release
Pre-release

Breaking Changes

  • v-for iteration syntax change: see #3073

Fixed

  • Fixed nested <template> handling in single-file component parser
  • #3054 components not correctly copying static render functions from options (@simplesmiler)

v2.0.0-alpha.1

10 Jun 23:30
Compare
Choose a tag to compare
v2.0.0-alpha.1 Pre-release
Pre-release

This is the first release of 2.0.

  • Recommended for: experiments, prototypes, upgrading small, non-critical 1.x apps
  • NOT recommended for: production use, upgrading production 1.x apps

Documentation still needs to be worked on. In the meanwhile for changes from 1.x and upgrade information, please refer to this thread.

There is also a recorded video of the livestream session that went through some of the major changes in 2.0.

Installation

v1.0.24

11 May 22:01
Compare
Choose a tag to compare

Fixed

  • #2852 fixed regression in 1.0.23 that breaks app if the page contains iframes with different origins.

v1.0.23

11 May 16:24
Compare
Choose a tag to compare

Fixed

  • #2821 fix prop watcher not firing when change is triggered from another watcher
  • #2831 fix ready hook not firing when instance is mounted into iframes
  • #2837 fix <template slot> content disappearing on subsequent mounts

v1.0.22

07 May 22:02
Compare
Choose a tag to compare

New

  • new option: propsData. This option allows you to pass props to an instance created imperatively with new without having to wrap it in a parent instance. This is primarily intended to make unit testing easier. docs
  • new option: extends. Allows declaratively extending another component (could be either a plain options object or a constructor) without having to use Vue.extend. This is primarily intended to make it easier to extend between single file components. (@pespantelis) docs
  • #2676 Added support for decimal places in currency filter (@phanan) docs

Fixed

  • #2642 reserve non-resolved is attribute for native custom elements
  • #2659 exclude .capture from v-on key filters (@eric6356)
  • #2663 fix handling v-if along with v-for on a template tag (@simplesmiler)
  • #2666 remove :is attribute even when component is cached (@GuillaumeLeclerc)
  • #2670 ensure dynamic method resolution for component inline v-on
  • #2674 fix async update in WeChat browser (@duanjun)
  • #2686 fix deep watch on objects with circular references (@flytreeleft)
  • #2687 fix data function being called twice (@blake-newman)
  • #2707 fix modifiers being incorrectly passed to terminal directives (@blake-newman)
  • #2723 default slot should use fallback content if it has only whitespace
  • #2731 fix Vue.delete when used on a Vue instance (@Jinjiang)
  • #2745 handle v-for anchor position when moved by external lib
  • #2750 ensure correct watcher invocation order for changes triggered inside user watchers
  • #2773 fix v-model cursor position by only setting value property when value is changed (@zigomir)
  • #2789 do not merge empty class on component placeholder
  • #2805 treat template tags as string templates to workaround iOS Safari 9 crash bug
  • #2808 v-bind:class multiple class names support for array syntax

v1.0.21

07 Apr 22:13
Compare
Choose a tag to compare

New

  • Component prop type can now be an array of types (@ealves-pt):

    props: {
      myProp: [String, Number] // can either be a string or a number
    }
  • Most of the warnings now come with the name of the component it is found in (if a name is available).

  • Runtime warnings now use console.error, which means they come with stack traces by default. Setting Vue.config.debug = true now only enables comment anchor nodes.

  • orderBy filter improvements (@posva)

    The orderBy array filter can now accept:

    • multiple sort keys, or
    • an array of sort keys, or
    • a custom comparator function (same with the comparator used in Array.prototype.sort)

    See updated docs for examples.

  • :class bindings now support using a string of multiple classes (@phanan):

    <div :class="{ 'a b c': true }"></div>
  • track-by for v-for can now accept a path instead of a simple key.

Fixed

  • #2567 fix IE9 inline style bindings that need vendor prefix
  • #2573 ensure v-if and v-for compilation order is not dependent on appearance order. (v-for always comes first)
  • #2580 initially invalid props should still be reactive
  • #2593 fix explicitly setting Vue.config.devtools to non-default value
  • #2606 prop coercion should be applied to default values (@simplesmiler)
  • #2620 text parser should not remove newlines, also fix cache hit (@sirlancelot)