137

Release v2.5.0 Level E · vuejs/vue · GitHub

 6 years ago
source link: https://github.com/vuejs/vue/releases/tag/v2.5.0
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Features & Improvements

Error Handling and Reporting

  • improve error handling with new errorCaptured hook b3cd9bc [Details]
  • improve template expression error message e38d006, closes #6771
  • improve option type checks b7105ae

TypeScript Declaration Improvements

Functional Components

  • compiled templates for functional component support ea0d227

  • scoped CSS support for functional components 050bb33

    These features require vue-loader>=13.3.0. Thanks to the work by @blake-newman. [Details]

Server Side Rendering

  • renderToString now returns a Promise if no callback is passed f881dd1, closes #6160
  • add shouldPrefetch option (same signature as shouldPreload) 7bc899c, closes #5964
  • auto-remove initial state embed script if in production (#6763) 2d32b5d, closes #6761
  • now ships an environment-agnostic build of the server renderer in vue-server-renderer/basic.js c5d0fa0 [Details]

v-model

v-on

Scoped Slots

Provide/Inject

<keep-alive>

  • add max prop for <keep-alive> for limiting max number of instances cached 2cba6d4

Other Improvements

  • config.ignoredElements can now contain RegExp in addition to strings (#6769) 795b908
  • data function is now called with the vm instance as the first argument (#6760) 3a5432a
  • vue-template-compiler now ships an environment-agnostic build which can be used directly in browsers in vue-template-compiler/browser.js a5e5b31

Bug Fixes

Internals

We have changed the implementation of Vue.nextTick to fix a few bugs (related to #6566, #6690). The change involves using a macro task instead of a micro task to defer DOM updates when inside a DOM event handler attached via v-on. This means any Vue updates triggered by state changes inside v-on handlers will be now deferred using a macro task. This may lead to changes in behavior when dealing with native DOM events.

For more details regarding micro/macro tasks, see this blog post.

For the new implementation, see source code for nextTick.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK