Vue 2.5 && 2.5.1(Bug Fixes) 正式发布!! 带来大量的更新!

6,821 阅读2分钟
原文链接: github.com

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