gpt4 book ai didi

webpack - 什么是点菜组件?我应该使用它吗?

转载 作者:行者123 更新时间:2023-12-03 11:19:16 25 4
gpt4 key购买 nike

当使用 vue-cli 开始一个新项目时,它会询问一些问题来自定义设置。一般项目名称,描述,是否使用 eslint 进行 linting,karma 和 mocha 进行测试等。这次它问我

? Use a-la-carte components?

我在 vue-cli 文档中搜索了它,但没有发现任何东西。
那么谁能告诉我什么是“点菜组件”以及我是否应该使用它?

最佳答案

À la carte is an English language loan phrase meaning "according to the menu." It refers to "food that can be ordered as separate items, rather than part of a set meal."



因此,如果您使用 a-la-carte 组件,则意味着您只包含您需要(想要)使用的组件,而不是获取所有组件

Vuetify example:

Vuetify allows you to easily import only what you need, drastically lowering its footprint.


import {
Vuetify,
VApp,
VNavigationDrawer,
VFooter,
VList,
VBtn
} from 'vuetify'

Vue.use(Vuetify, {
components: {
VApp,
VNavigationDrawer,
VFooter,
VList,
VBtn
}
})

编辑 2018 年 11 月 14 日:

vuetify 1.3.0 ,
vuetify-loader (包含在 vuetify cli 安装中)
自动处理您的应用程序的点菜需求,这意味着它会在您使用时自动导入所有 Vuetify 组件。

关于webpack - 什么是点菜组件?我应该使用它吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46680467/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com