Skip to content

Releases: vuejs/vue

0.12.15

19 Sep 21:37
Compare
Choose a tag to compare

Fixed

  • #1321 options param for <select v-model> doesn't work with Array of numbers
  • #1322 elements with transition stuck in DOM if it is hidden by CSS
  • #1327 v-model firing unnecessary update at compositionend in lazy mode
  • #1330 template parser entity regex fails to detect entities in hex format

1.0.0-alpha.4

11 Sep 19:26
Compare
Choose a tag to compare
1.0.0-alpha.4 Pre-release
Pre-release

Alpha versions are pre-releases and the API may change at any time. By using the alpha releases you are responsible for any risk involved. If you have an in-production 0.12 app, it's recommended to wait until the stable 1.0 migration release before upgrading.

Changes from 1.0.0-alpha.3

Breaking

For latest binding syntax, see #1173

  • Literal directives now use the #= syntax instead of .=:

    <a v-link#="/a/b/c"></a>
  • Prop binding type indicators are now placed in the attribute name instead of the value:

    <comp
      bind-two-way@="something"
      bind-one-time*="something">
    </comp>
  • v-el and v-ref are deprecated and now use dedicate syntax:

    <!-- registers vm.$.child -->
    <comp $.child></comp>
    
    <!-- registers vm.$$.node -->
    <div $$.node></div>
    
    <!-- caveat: must use dash-case instead of camelCase, similar to props -->
    <!-- registers vm.$.someComp -->
    <comp $.some-comp></comp>
  • v-component has been deprecated in favor of the is attribute, which is now usable on any element.

  • The prefix global config has been deprecated.

New

  • v-else: must be used following an element with v-if.

    <div v-if="ok">OK</div>
    <div v-else>NOT OK</div>
  • Unsafe delimiters for HTML interpolation can now be configured separately:

    Vue.config.unsafeDelimiters = ['{!!', '!!}']

    Note in 1.0.0-alpha when you set Vue.config.delimiters, it will still implicitly update the unsafe delimiters following the current rules, but in 1.0.0-beta and above setting delimiters will have no effect on unsafeDelimiters.

Non-breaking Changes

  • Removed overly aggressive "unobservable object" warnings.
  • slot attributes on transcluded content are now preserved.

Fixed

  • Fixed issue where minified build calling non-existent deprecation warning when using legacy syntax
  • #1249 v-for error when used with 3rd party sortable plugins (@weislanes)
  • #1268 component <slot> not compiled in correct scope when inside v-for
  • #1282 <slot> fallback content not compiled in correct scope when inside v-for
  • #1295 error when triggering transitions on fragments

Internals, for Advanced Users

  • FragmentFactory is now exposed as Vue.FragmentFactory.

  • User can now extend Vue's option merging strategies by adding functions to Vue.config.optionMergeStrategies:

    Vue.config.optionMergeStrategies.myOption = function (parentValue, childValue) {
      // return merged value
    }

    The above function will be called when calling Vue.extend({ myOptions: { ... }}), or when applying a mixin that includes myOption.

0.12.14

11 Sep 18:30
Compare
Choose a tag to compare

Fixed

  • Removed overly aggressive "unobservable object" warnings
  • #1291 component attached hook not called when toggled by v-if inside transcluded content
  • #1299 v-model options rebuild error when using optgroups (@evantre)

1.0.0-alpha.3

07 Sep 20:28
Compare
Choose a tag to compare
1.0.0-alpha.3 Pre-release
Pre-release

Alpha versions are pre-releases and the API may change at any time. By using the alpha releases you are responsible for any risk involved. If you have an in-production 0.12 app, it's recommended to wait until the stable 1.0 migration release before upgrading.

Known Issue

  • Not working with vue-router 0.5.2. Please wait for a vue-router update. Please upgrade to vue-router 0.6.0.

Changes since 1.0.0-alpha.2

For an detailed overview of the data-binding syntax changes, see the latest proposal.

  • All fixes in 0.12.13

  • Props now share the same bind- syntax with normal attributes.

    <comp
      literal-prop="string"
      bind-dynamic-prop="someThing"
      bind-two-way="@someThing"
      bind-one-time="*someThing">
    </comp>
  • Add : shorthand for bind-.

    The example above can be shortened as:

    <comp
      literal-prop="string"
      :dynamic-prop="someThing"
      :two-way="@someThing"
      :one-time="*someThing">
    </comp>
  • Event handler key filter delimiter changed from : to -:

    <!-- 1.0.0-alpha.2 -->
    <input on-keyup:esc="handleEsc">
    
    <!-- 1.0.0-alpha.3 -->
    <input on-keyup-esc="handleEsc">
  • bind-style now support an Array of style objects:

    <div bind-style="[styleObjectA, styleObjectB]"></div>
  • Use .= syntax to pass a literal string to directives:

    <a v-link.="/a/b/c">

    v-link's update function will be called once with "/a/b/c".

0.12.13

07 Sep 20:11
Compare
Choose a tag to compare

Fixed

  • Observer will only attempt to convert a data object if it is not a native object, e.g window.
  • #1219 inherit: true constructor cache should be context-sensitive
  • #1248 performance regression when v-repeat has a particularly large source Array.
  • #1241 Triggering a transitionend event after enter transition is done in in-out mode causes error (@nkovacs)
  • #1244 Leave transition hook is called twice if css:false in in-out mode

Improvements

  • Added space alias for key filter. (@Coffcer)

1.0.0-alpha.2

01 Sep 20:27
Compare
Choose a tag to compare
1.0.0-alpha.2 Pre-release
Pre-release

Alpha versions are pre-releases and the API may change at any time. By using the alpha releases you are responsible for any risk involved. If you have an in-production 0.12 app, it's recommended to wait until the stable 1.0 migration release before upgrading.

Changed

  • Computed properties are again cached by default (was uncached by default in alpha 1).

Fixed

  • #1234 Filters are not applied with the correct scope inside v-for
  • Calling Vue.use more than once on a plugin will not install it again.

1.0.0-alpha.1

31 Aug 21:14
Compare
Choose a tag to compare
1.0.0-alpha.1 Pre-release
Pre-release

Alpha versions are pre-releases and the API may change at any time. By using the alpha releases you are responsible for any risk involved. If you have an in-production 0.12 app, it's recommended to wait until the stable 1.0 migration release before upgrading.

1.0.0-alpha.1 is the first release of the 1.0.0-alpha stage. As promised in 1.0.0 release planning, this release contains no breaking changes, but a lot of deprecation warnings and tips on how to migrate to the new features. Try it out in your ^0.12.10 compatible app and let me know how it goes!

For detailed changes, see the tracking issues and in app deprecation warnings.

Note that at this stage, the API design is still not locked yet; issues marked as "1.0 proposal" are still open to discussion. Feedback after trying it out in real apps are particularly appreciated.

You will probably notice the file is a bit larger than previous versions, this is because the alpha releases contain all the backwards compatible code. Once removed in the beta, the file will slim down again.

Installing

NPM

npm install [email protected]

Bower

bower install vue#1.0.0-alpha.1

Standalone files in the 1.0.0-alpha branch: https://github.com/yyx990803/vue/tree/1.0.0-alpha/dist

0.12.12

26 Aug 09:09
Compare
Choose a tag to compare

Improvements

  • v-model on checkbox can now bind the model value to expressions instead of just true or false. Example:

    <input type="checkbox" v-model="example" true-exp="a" false-exp="b">
    // when checked:
    vm.example === vm.a
    // when unchecked:
    vm.example === vm.b
  • v-model on radio also gets the same feature:

    <input type="radio" v-model="example" exp="a">
    // when checked:
    vm.example === vm.a

Fixed

  • v-model on checkbox should now update the input checked state based on truthy-ness again. In 0.12.11 it is only checked when value strictly equals true.

0.12.11

25 Aug 16:58
Compare
Choose a tag to compare

Improvements

  • Two-way filters for v-model have been reworked. A v-model binding with read filters will no longer attempt to format the value when the user is still typing; instead it formats the value on blur. This results in a much more natural UX and makes two-way filters much more usable. Demo

  • <select v-model="x" options="options"> now supports Object values. That is to say you can provide the options array like this:

    options = [
      { text: 'a', value: { msg: 'A' }},
      { text: 'b', value: { msg: 'B' }},
      { text: 'c', value: { msg: 'C' }}
    ]

    And the bound value x will be the actual object instead of a serialized string.

  • filterBy filter has been improved (#1094):

    1. It now accepts multiple dataKeys arguments
    2. Each dataKey argument can be either a String or an Array of Strings.
    3. You can alternatively provide a custom filter function as the first argument.

    Example:

    <!-- multiple dataKeys -->
    <div v-repeat="user in users | filterBy searchText in 'fieldA' 'fieldB'">
    
    <!-- Array dataKeys -->
    <!-- fields = ['fieldA', 'fieldB'] -->
    <div v-repeat="user in users | filterBy searchText in fields">
    
    <!-- filter by function -->
    <div v-repeat="user in users | filterBy myCustomFilterFunction">
  • currency filter can now accept an empty string argument to output the result without a currency symbol.

  • When in debug mode, Vue will also print async stack traces for warnings. Previously the stack trace stops at the internal batcher handler due to Vue's async update queue; now the stack trace goes all the way back to what originally triggered the update.

  • Component asset names can also be in PascalCase in addition to camelCase: myComponent and MyComponent will both be interpreted as my-component during the lookup.

  • Data object properties prefixed with _ and $ are now also observed; this means they can be used for data binding, however if it is a root-level property it will not be proxied on the vm instance.

    For example:

    var vm = new Vue({
      data: {
        _test: 123
      }
    })
    vm._test // -> undefined
    vm.$data._test // -> 123
    <!-- also need to access via $data in templates -->
    <p>{{ $data._test }}</p>
  • Computed Property Caching

    You can now turn off caching for a specific computed property so that it behaves like a simple getter.

    By default, a computed propoerty's cache is only invalidated when one of its reactive dependencies have changed, but this can result in confusion when the user assumes it behaves like a getter.

    For example:

    computed: {
      example: function () {
        return Date.now() + this.msg
      }
    }

    The cache for vm.example only invalidates when vm.msg has changed, because Vue has no way to detect whether Date.now() has changed or not (polling is obviously a bad idea). So, when you access vm.example, it will not change unless vm.msg has changed.

    This is different from a simple getter-like behavior, where the function is re-evaludated every time the property is accessed. If that is what you want, you can turn off caching for that property like this:

    computed: {
      example: {
        get: function () { /* same getter */ },
        cache: false
      }
    }

New

  • Added debounce filter which can be used with v-on for debouncing DOM events.

    Example:

    <input v-on="input: onInput | denounce 300">

Fixed

  • v-attr should also set corresponding properties for selected and checked.
  • #1139 error when compiling props for a component with fragment el
  • #1150 keep-alive and wait-for not working together
  • #1152 dynamic component left undestroyed with keep-alive + wait-for
  • #1155 select option with empty string initial value not initialized properly
  • #1162 computed properties evaluation affected by order of data manipulations
  • #1185 v-if linker cache not taking transclusion host into account
  • #1191 resolveAsset not working properly for transcluded components in strict mode

0.12.10

10 Aug 03:46
Compare
Choose a tag to compare

Improvements

  • Support one static <option> inside <select> with v-model + dynamic options:

    <select v-model="selectedUser" options="users">
      <option value="">Select a user...</option>
    </select>

    This static option will be selected by default if the v-model value is falsy (excluding 0). Options created from users will be appended after the default option.

  • Dynamic component wait-for listeners are now attached in the component's created hook, thus firing the event synchronously in compiled hook will now properly trigger the DOM insertion.

Fixed

  • template parser now trims empty textNodes from <script> templates, avoiding unnecessarily turning components into fragment mode.
  • #1109 mustach tags inside <textarea> are interpolated only once
  • #1116 transition hangs when immediately leaving after entering
  • #1117 synchronously calling done in leave transition hook causes error
  • #1118 nested <template> not rendering in Safari
  • #1119 out-in transition mode not working as desired when switching faster than transition duration.
  • #1124 number attribute param for v-model not respected on <input type="radio">.