重磅来袭 Vue 3.0 One Piece 正式发布

代号为One Piece 的Vue3.0 在9月19日凌晨正式发布!!css

这次vue3.0 为用户提供了全新的 composition-api 以及更小的包大小,和更好的 TypeScript 支持。html

发布地址vue

Vue-nextgit

Vue3.0 是当前很是流行的框架,Vue3.0更是酝酿了2年多的时间,通过2600屡次commit,600屡次PR,中间也发布了不少beta版本。github

终于在通过尤大神和社区的共同努力下,Vue3.0带着全新的 composition-api 正式发布了。vue-router

一块儿发布的新特性还有:vuex

Teleport 组件vue-cli

Treeshaking的全新APIapi

Vue3.0官方文档markdown

也能够再在线体验Vue3.0: codepen.io/yyx990803/p…

<template>
  <div id="app">
    <h1>{{message}}</h1>

    <p>
      Learn more with the
      <a
        href="https://v3.vuejs.org/"
        target="_blank"
        rel="noopener"
      >Vue Docs &amp; Resources</a>.
    </p>

    <button @click="doSomething">Say hello.</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      message: 'Welcome to Vue 3!'
    };
  },
  methods: {
    doSomething() {
      alert('Hello!');
    }
  }
};
</script>

<!-- Use preprocessors via the lang attribute! e.g. <style lang="scss"> -->
<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}

a,
button {
  color: #4fc08d;
}

button {
  background: none;
  border: solid 1px;
  border-radius: 2em;
  font: inherit;
  padding: 0.75em 2em;
}
</style>

 

 

有兴趣也能够观看尤大神在19号凌晨发布的视频

m.youtube.com/watch?v=Vp5…  

直播中尤大神也讲诉了整个Vue3.0 的历程,同时也介绍了一些新的特性。

 

 

 

 

  

另外,全部的官方生态库和工具,例如vue-cli、vue-router、vuex、Vue-Test-utils、vue devtools、VSCode插件Vetur,如今都支持Vue3,但大多数仍然处于beta状态,并在NPM的"next"标签目录下发布。

官方计划在2020年年末以前稳定全部项目并将其转换为使用"latest"标签。

官方发布的推文

 

 

Vue 3.0 正式版

 

 

 
 

做者:shenjp1连接:https://juejin.im/post/6873980597472067597