vue 全局组件注册
With the new versions of Vue3 out now, it’s useful to start learning how the new updates will change the way we write code. One example is the changes in the way we write our index.js file (the file that handles creating our Vue app).
随着新版本Vue3的发布,开始学习新更新将如何改变我们编写代码的方式非常有用。 一个例子是我们编写index.js文件(用于处理创建Vue应用程序的文件)的方式的变化。
Today, we’ll take a look at how to register Vue3 Global Components that can be used across our entire Vue app. It’s a little different from how we declared them in Vue2, but it’s just as simple.
今天,我们将研究如何注册可在整个Vue应用程序中使用的Vue3全局组件。 与我们在Vue2中声明它们的方式稍有不同,但它很简单。
For this tutorial, I am working with the beta release of Vue3 that can be found via the vue-next Github repository.
对于本教程,我正在使用Vue3的