v4.1.0
✨ 重大更新
📦 新增 Empty 组件
现已提供新的空组件,用于在没有内容可显示时展示空状态(#5200).
⚡️ 组件虚拟化
属性来为大型数据集启用虚拟化,适用于CommandPalette, InputMenu, SelectMenu, Table和Tree组件(#5162).
<template>
<UTable :data="data" :columns="columns" virtualize />
</template>
🎯 实验性组件检测
文件中启用新的选项,以自动检测实际使用的组件,并且只为这些组件(包括它们的依赖项)生成必要的 CSS(🚨 重大变更#5222).
export default defineNuxtConfig({
modules: ['@nuxt/ui'],
css: ['~/assets/css/main.css'],
ui: {
experimental: {
componentDetection: true
}
}
})
我们对这些微小的重大变更表示歉意。在拥有 110 多个组件的库中,我们偶尔需要进行一些修正以保持一致性和质量。我们的目标是尽量减少重大变更,但有时为了长远的开发者体验,它们是必要的。
(
- edda8a6#4397) (属性来定制子项的图标。)
Table: 在 select 事件中保持参数顺序一致(
<template>
- <UCommandPalette :trailing-icon="i-lucide-arrow-right" />
+ <UCommandPalette :children-icon="i-lucide-arrow-right" />
</template>
- 9526a1b。)
🚀 新功能
<template>
- <UTable @select="(row, e) => {}" />
+ <UTable @select="(e, row) => {}" />
</template>
属性(
- bb4f42c#5138) (CommandPalette: 在搜索结果中保留分组顺序()
- edda8a6#4397) (属性来定制子项的图标。)
- 38647a2#5197) (()
- 63c0a5f#5207) (()
- 70cf05f#5193) (components: 实现虚拟化()
- c744d6f#5162) (Empty: 新组件()
- 6a6de8d#5200) (作为布尔值处理()
- 选项(#4805) (1858908)
- f80474c#5222) (方法()
- 53c6508#5176) (过渡()
- d502c30#4998) (Tree: 添加全局事件处理程序和复选框示例()
- 84f87a5#5195) (()
- fcf6117#5239) (Tree: 提供额外的 slot props()
- c8b01c9#5194) (全局配置()
- e4c6113#5068) (🐛 Bug 修复)
属性中使用任意 attrs(
- 9632f99),关闭(#5276
- cc8cbf3ChatMessage: 确保左侧占据全部宽度((#4771
- af8c023ChatMessage: 仅在右侧应用 max-width()
- a85b0e1ChatMessage: 重置上下边距()
- 8f9176c滚动()
- db73765#5252) (属性类型()
- 240bc1a#5234) (角色恢复项包装器()
- 70aaf4a属性((#4945
- d1afe90#5205) (ContextMenu/DropdownMenu: 允许覆盖项内容类()
- ab5032dDrawer/Modal/Slideover: 移除关闭自动聚焦阻止((#5277
- (#5191) (8099440)
- 2a09ac0FileUpload: 处理禁用文件删除按钮((#4955
- 08c30cfFileUpload: 选项卡时卡住焦点((#5249
- 2477d44#5128) (FileUpload: 使用原生 img 元素进行 blob URL 预览()
- 69906bcInputMenu/SelectMenu: 丰富可重用模板项属性((#5121 #4824
- 63074d6InputMenu: 确保在数字时可以删除标签()
- 028538a类()
- 4095c9a#5238) (NavigationMenu: 当 badge 不为 undefined 时显示尾部 slot()
- f24204f((#4670
- 9526a1b。)
- c019f8f🌐 国际化(#5230 #5162
locale: 添加克罗地亚语(
@OlegChuev 首次贡献于
- https://github.com/nuxt/ui/pull/5136@victorgarciaesgi 首次贡献于
- https://github.com/nuxt/ui/pull/5178@DevAdedeji 首次贡献于
- https://github.com/nuxt/ui/pull/5169@KazimirPodolski 首次贡献于
- https://github.com/nuxt/ui/pull/5176@Antoine-Regembal 首次贡献于
- https://github.com/nuxt/ui/pull/5219@Lenni009 首次贡献于
- https://github.com/nuxt/ui/pull/5283@Ismaele-silla 首次贡献于
- https://github.com/nuxt/ui/pull/5197@mbanusic 首次贡献于
- https://github.com/nuxt/ui/pull/5293@brendonmatos 首次贡献于
- https://github.com/nuxt/ui/pull/5291完整变更日志
https://github.com/nuxt/ui/compare/v4.0.1...v4.1.0: v3.3.7