Skip to content

Releases: vuejs/vue

v1.0.20

26 Mar 21:28
Compare
Choose a tag to compare

This is a small patch release with only bug fixes. There were a few new features in 1.0.19 - make sure to check it out.

Fixed

  • #2563 Fixed error in custom terminal directive implementation that caused infinite loop. (@kazupon)
  • #2565 Fixed camelCase <-> kebab-case conversion for custom directive params
  • #2569 Fixed reactivity for prop default values
  • #2566 Fixed activate hook + keep-alive transition error

v1.0.19

25 Mar 07:36
Compare
Choose a tag to compare

New

  • Custom terminal directives: It is now possible to author custom terminal directives (like v-if and v-for). See docs for details. (@kazupon)

  • Improved v-bind:class syntax: It is now possible to mix objects inside arrays (@FadyMak):

    <div :class="[classOne, { classTwo: true, classThree: false }]">
    </div>
  • is attribute can now be bound to an actual component constructor in addition to string Ids. This makes it possible to pass down components as props and then render it using dynamic component:

    <!-- pass the registered "item" component as a prop -->
    <example :component="$options.components.item">
    </example>

    Inside <example>'s template:

    <!-- just bind "is" to the passed component -->
    <component :is="component"></component>

Fixed

  • 1.0.18 regression: data functions that do not return an object should not cause a crash. A warning has also been added. (#2517, #2528)
  • 1.0.18 regression: fixed a few cases where props reactivity not working as intended. (#2516, #2549)
  • #2542 fixed elements with transition occasionally stuck on leave when removed right after enter.
  • Boolean props in the form of a="a" should be interpreted as true, just like HTML boolean attributes. This also deals with cases where html-minifier auto expands boolean props with no value.
  • Fixed cases in IE9 where classes are not merged properly during transclusion.

v1.0.18

18 Mar 00:50
Compare
Choose a tag to compare

New

  • Due to security concerns, the devtools hooks are now disabled in production builds by default. However, you can explicitly enable it by setting:

    Vue.config.devtools = true
  • Vue's internal observation mechanism has been improved to allow you to take advantage of data that are supposed to be immutable. A common use case is when you are simply replacing a huge data structure that you know will never be mutated with a fresh copy. You can now freeze it with Object.freeze and Vue will skip the getter/setter conversion (including its nested values) for that object.

    As a reference, in the DBMonster benchmark, simply freezing the data results in 50%+ FPS increase.

  • Decent performance improvement (~15%) to watcher's dependency collection process.

Fixed

  • Dynamic slot names were disabled in last version, but is now available again.
  • #2424 fix async queue scheduling: new watchers should not be triggered before current watcher's callback is complete.
  • #2426 fix error when merging classes with extra whitespace during transclusion.
  • #2435 fix slot resolution inside template tags
  • #2445 fix attached/ready hooks not called for child components when parent component uses an async activate hook and is inside a fragment.
  • #2491 fix two-way filter regression on blur
  • #2500 fix template-parser wrongly wrapping certain custom elements as SVG

v1.0.17

29 Feb 02:12
Compare
Choose a tag to compare

New

  • v-for now also supports using of as the delimiter:

    <div v-for="item of items"></div>
  • Vue.config.convertAllProperties is now enabled by default, and this config option has been removed.

  • keyCode aliases are now exposed as Vue.directive('on').keyCodes. For example you can define a custom key modifier:

    Vue.directive('on').keyCodes.f1 = 112
  • The internal transition API is now exposed on Vue.transition. For example this function will be exposed as Vue.transition.applyTransition. For example usage, see v-show's source code. Note: this is an internal API exposed for advanced use cases - the API may change.

Fixed

  • #2278 allow expressions for literal values in root instance props
  • #2287 fix transition hooks call context to be consistent with compilation scope rules
  • #2291 fix CSP build minification error
  • #2297 avoid implicit reference to global variables (fix usage in NW.js)
  • #2300 fix currency filter negative number display
  • #2305 fix multiple activate hooks merging
  • #2312 fix named/default slot distribution when a slot is passed down as content to a child
  • #2345 improve real custom element detection to avoid unnecessary warnings
  • #2348 fix slot with v-if fallback compilation scope
  • #2364 fix expression parsing with ES6 template strings (note: this only fixes the expression parsing, it still depends on whether the browser natively supports ES6 template strings)
  • #2366 fix custom terminal directive with global mixin (@rhyzx)
  • #2393 fix observing objects with enumerable but non-configurable properties (@saul)
  • #2396 fix SVG element transition detection in Chrome
  • #2400 fix v-model with debounce value not immediately synced on form submission
  • #2406 fix SVG element fragment linker caching in IE
  • #2407 fix v-bind value for non-boolean enumerable attributes that expects "true" or "false" values, e.g. draggable
  • #2411 null or undefined should not trigger type check warning for a non-required prop

v1.0.16

30 Jan 10:31
Compare
Choose a tag to compare

New

  • Improved v-for re-rendering performance in production mode.

  • Vue Devtools is now supported in production builds as well.

  • New modifier for v-on: .capture. Attach the event listener in capture mode.

  • New modifier for v-on: .self. Only triggers the handler if the event was dispatched from the element itself, i.e. e.target === e.currentTarget.

  • New modifier for v-bind: .camel, which converts the bound attribute name back to camelCase. This is a workaround for dynamically binding SVG valid camelCase attributes, e.g. viewBox, because the browser parses :viewBox as :viewbox.

    Example:

    <svg :view-box.camel="viewBoxValue"></svg>
  • The .delete key modifier for v-on now also gets triggered on Backspace (which is "delete" on Mac keyboards). (@thecrypticace)

Fixed

  • When manually creating a Vue instance, the props can be passed in via the data option and it will no longer cause a warning.
  • #2144 when a inserted slot element is toggled off by v-if, the slot's fallback content will be rendered instead.
  • #2169 when binding attributes with v-bind, the boolean value true now renders to an empty attribute value. This makes the rendered result more consistent with the HTML5 spec. If the value "true" is desired, then the value passed to v-bind should be an actual string rather than a boolean value. (@rhyzx)
  • #2199 fix v-model jQuery < 1.7 compatibility
  • #2206 fix v-else fragment not properly destroyed on instance teardown.
  • #2219 fix v-style prefix detection for -webkit-filter in Chrome.
  • #2242 fix literal prop handling for negative numbers when used on root instance.
  • #2253 templates that has comments outside the root node no longer gets parsed as fragment instances.
  • #2254 avoid asset resolution error when asset id is not a string
  • #2265 fix v-for range edge cases (when value is NaN)

v1.0.15

18 Jan 19:58
Compare
Choose a tag to compare

Fixed

  • Fixed npm distributed build not stripping development-only code when used in Webpack/Browserify production builds.
  • #2145 v-for now works better with Sortable.
  • #2161 fix fragment GC (@elsassph)
  • #2163 fix slot duplicated insertion when used with v-if
  • #2182 improve template parser cache hit (@tgeorgiev)
  • #2183 fix cache size bug when putting multiple entries with the same key (@tgeorgiev)

v1.0.14

11 Jan 20:57
Compare
Choose a tag to compare

New

  • Transition definitions can now specify the type of CSS effect it should wait for, either transition or animation. This is only necessary in situations where you explicitly want Vue's transition system to only care about one type while being able to use the other type. For example, you may want Vue's transition to be based on a CSS animation, but the element also has CSS transition effects on hover.

    Example:

    Vue.transition('fade', {
      type: 'animation' // only wait for `animationend` events.
    })
  • Transition definitions can now specify the enterClass and leaveClass for CSS-based transitions. This will override the conventional class names. Useful when you want to combine Vue's transition system with an existing CSS animation library, e.g. Animate.css.

    Example:

    Vue.transition('bounce', {
      type: 'animation',
      enterClass: 'bounceInLeft',
      leaveClass: 'bounceOutRight'
    })
    <div v-show="ok" class="animated" transition="bounce">
      Watch me bounce
    </div>

Fixed

  • #2083 avoid v-model with lazy firing twice on focus/blur
  • #2085 transclude class merging should skip interpolated class
  • #2097 one-time interpolations should now work properly inside attributes
  • #2100 fix evaluation errors when v-if is toggled with transitions
  • #2102 fix custom event propagation forwarding in inline statements (@rhyzx)
  • #2105 auto cast values to numbers in limitBy
  • #2118 fix literal value props with filters
  • #2137 allow empty expressions in terminal directives (@rhyzx)

v1.0.13

25 Dec 03:49
Compare
Choose a tag to compare

Fixed

  • Array.prototype.$set(index, value) now automatically casts the first argument to number. (@pespantelis)
  • Fixed vm.$watch callback not guaranteed to fire after all internal watchers. (@gebilaoxiong)
  • #2064 fix prop two-way sync not working in created hook
  • #2068 fixed value interpolation erasing initial value when used in combination with v-model
  • #2072 avoid reversing object keys enumeration order when observing objects in Safari (@yuhere & @galenyuan)
  • #2075 fixed class interpolation regression (@pespantelis)

v1.0.12

17 Dec 23:15
Compare
Choose a tag to compare

New

  • New prop option: coerce (@lepture)

    You can now provide a coerce function when defining a prop - every time the prop is updated from the parent, it will be passed through the coerce function. You can think of it as a one-way filter for props, but defined in the child component.

    export default {
      props: {
        msg: {
          type: String,
          coerce: function (val) {
            return val + '' // cast potential values to a string
          }
        }
      }
    }

Fixed

  • #2001 fix IE9 class merging with both class and :class during transclusion
  • #2015 handle 0 properly when using v-bind for input value
  • #2017 prevent v-model syncing value on blur after fragment is removed
  • #2021 improve template parser when parsing plain strings containing HTML entities
  • #2022 fix v-show stuck when it is compiled on out-of-dom element
  • #2023 avoid v-model attempting to sync value after debounce when it is already unbound
  • #2026 fix v-pre error when used on component root node
  • #2028 avoid debounce on blur for v-model
  • #2035 fix SVG class interpolation regression
  • #2036 non-deep watchers now fire properly when an object's structure has been changed by Vue.set or Vue.delete.
  • #2042 fix v-bind when binding muted attribute on <video> elements

v1.0.11

10 Dec 05:17
Compare
Choose a tag to compare

New

  • Vue.set(obj, key, val) now returns the set value.

  • Inline statement handlers for a v-on on component custom events now has access to the special $arguments property:

    <my-component @some-event="handle($arguments[0])"></my-component>
    // inside my-component
    // parent's `handle` method gets 'hello!' as the argument
    this.$emit('some-event', 'hello!')

Fixed

  • #1929 fix character escaping in expressions
  • #1935 fix parsing expressions with dynamic subpath in the form of ['prefix'+i+'suffix']
  • #1946 fix transclusion class merging in IE9
  • #1960 fix class interpolations not working with transitions
  • #1965 (1) fix default <slot> not rendering correct content when another named slot is present, and when both slots are inside a v-if fragment.
  • #1965 (2) fix default <slot> not rendering fallback content when all other content has been selected by named slots.
  • #1966 fix $destroy(true) not triggering "detached" hook on nested children (@tgeorgiev)
  • #1985 fix v-model checkbox/radio initial value issue (only happens with the combination of v-for and Chrome's overly-smart back button input state restoration behavior)
  • #1995 fix Observer error when using vue-router in Android 5.0 (should be a bug in Android 5.0 but we can work around it)