Skip to content

Commit

Permalink
2.40.0
Browse files Browse the repository at this point in the history
  • Loading branch information
07akioni committed Sep 25, 2024
1 parent ce28e71 commit 5038519
Show file tree
Hide file tree
Showing 26 changed files with 84 additions and 84 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# CHANGELOG

## NEXT_VERSION
## 2.40.0

`xxxx-xx-xx`
`2024-09-26`

### Breaking Changes

Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# CHANGELOG

## NEXT_VERSION
## 2.40.0

`xxxx-xx-xx`
`2024-09-26`

### Breaking Changes

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "naive-ui",
"version": "2.39.0",
"version": "2.40.0",
"packageManager": "pnpm@9.5.0",
"description": "A Vue 3 Component Library. Fairly Complete, Theme Customizable, Uses TypeScript, Fast",
"author": "07akioni",
Expand Down
4 changes: 2 additions & 2 deletions src/config-provider/demos/enUS/index.demo-entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ inline-theme-disabled.vue
| --- | --- | --- | --- | --- |
| abstract | `boolean` | `false` | If `n-config-provider` has no wrapper DOM | |
| breakpoints | `{ [k: string]: number }` | `{ xs: 0, s: 640, m: 1024, l: 1280, xl: 1536, xxl: 1920 }` | Responsive breakpoints, it will be used in `n-grid`. The prop is not responsive, you need to set it on its first mount. | |
| cls-prefix | `string` | `undefined` | The class prefix of all inner components. (Since `NEXT_VERSION`) If you don't set the `cls-prefix` prop of `n-config-provider`, it will inherit the class prefix from its parent by default. Note that this prop is not reactive. | |
| cls-prefix | `string` | `undefined` | The class prefix of all inner components. (Since `2.40.0`) If you don't set the `cls-prefix` prop of `n-config-provider`, it will inherit the class prefix from its parent by default. Note that this prop is not reactive. | |
| date-locale | `DateLocale \| null` | `undefined` | The date locale object to be consumed by its child. If set to `null` it will use the default `dateEnUS` locale. If set to `undefined` it will inherit its parent `n-config-provider`. | |
| inline-theme-disabled | `boolean` | `false` | Whether to disabled inline theme CSS variables. If you won't change theme overrides frequently in client side, and need SSR or make devtools looks clear. You can enable the prop. Note that the prop is not responsive. | 2.26.0 |
| katex | `object` | `undefined` | Katex object for `n-equation`. | 2.34.0 |
| locale | `Locale \| null` | `undefined` | The locale object to be consumed by its child. If set to `null` it will use the default `enUS` locale. If set to `undefined` it will inherit its parent `n-config-provider`. | |
| namespace | `string` | `undefined` | Class name of detached parts of components inside `n-config-provider` | |
| preflight-style-disabled | `boolean` | `false` | Whether to disabled preflight style of naive-ui. If you disable it, you can take control of all global css. Also you can use `n-global-style` to apply global style (which is recommend since global style will be reactive). | 2.29.0 |
| style-mount-target | `ParentNode` | `undefined` | Mounting target of style elements of components. Note that this prop is not reactive. | NEXT_VERSION |
| style-mount-target | `ParentNode` | `undefined` | Mounting target of style elements of components. Note that this prop is not reactive. | 2.40.0 |
| tag | `string` | `'div'` | What tag `n-config-provider` will be rendered as | |
| theme | `Theme \| null` | `undefined` | The theme object to be consumed by its child. If set to `null` it will use the default light theme. If set to `undefined` it will inherit its parent `n-config-provider`. For more details please see [Customizing Theme](../docs/customize-theme). | |
| theme-overrides | `ThemeOverrides \| null` | `undefined` | The theme vars overrides to be consumed by its child. If set to `null` it will clear all theme vars. If set to `undefined` it will inherit its parent `n-config-provider`. For more details please see [Customizing Theme](../docs/customize-theme). | |
4 changes: 2 additions & 2 deletions src/config-provider/demos/zhCN/index.demo-entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ inline-theme-disabled.vue
| --- | --- | --- | --- | --- |
| abstract | `boolean` | `false` | 是否不存在 DOM 包裹 | |
| breakpoints | `{ [k: string]: number }` | `{ xs: 0, s: 640, m: 1024, l: 1280, xl: 1536, xxl: 1920 }` | 屏幕响应式断点,对 `n-grid` 生效。这个属性不是响应式的,你需要在组件第一次挂载时就设定好 | |
| cls-prefix | `string` | `undefined` | 内部所有组件的类的前缀。(从 `NEXT_VERSION` 开始)如果不设置 `n-config-provider` 的类前缀 `cls-prefix`,则默认继承父级的类前缀。注意,该属性不是响应式的。 | |
| cls-prefix | `string` | `undefined` | 内部所有组件的类的前缀。(从 `2.40.0` 开始)如果不设置 `n-config-provider` 的类前缀 `cls-prefix`,则默认继承父级的类前缀。注意,该属性不是响应式的。 | |
| date-locale | `DateLocale \| null` | `undefined` | 对后代组件生效的日期语言对象,为 `null` 时会使用默认 `dateEnUS`,为 `undefined` 时会继承上级 `n-config-provider` | |
| inline-theme-disabled | `boolean` | `false` | 是否禁用 inline css 主题变量,如果你不会频繁调整主题变量,并且需要 SSR 或者想让 devtools 看起来更干净,可以打开这个选项。注意,这个属性不是响应式的 | 2.26.0 |
| katex | `object` | `undefined` | 公式组件需要的 katex 对象 | 2.34.0 |
| locale | `Locale \| null` | `undefined` | 对后代组件生效的语言对象,为 `null` 时会使用默认 `enUS`,为 `undefined` 时会继承上级 `n-config-provider` | |
| namespace | `string` | `undefined` | `n-config-provider` 内部组件被卸载于其他位置的 DOM 的类名 | |
| preflight-style-disabled | `boolean` | `false` | 是否禁用默认样式,如果你禁用了它,便可以完全控制全局样式。你也可以使用 `n-global-style` 去挂载全局样式(推荐,样式是响应式的) | 2.29.0 |
| style-mount-target | `ParentNode` | `undefined` | 组件样式的挂载位置。注意,该属性不是响应式的。 | NEXT_VERSION |
| style-mount-target | `ParentNode` | `undefined` | 组件样式的挂载位置。注意,该属性不是响应式的。 | 2.40.0 |
| tag | `string` | `'div'` | `n-config-provider` 被渲染成的元素 | |
| theme | `Theme \| null` | `undefined` | 对后代组件生效的主题对象,为 `null` 时会使用默认亮色,为 `undefined` 时会继承上级 `n-config-provider`。更多信息参见[调整主题](../docs/customize-theme) | |
| theme-overrides | `ThemeOverrides \| null` | `undefined` | 对后代组件生效的主题变量覆盖,为 `null` 时会清除全部覆盖变量,为 `undefined` 时会继承上级 `n-config-provider`。更多信息参见[调整主题](../docs/customize-theme) | |
14 changes: 7 additions & 7 deletions src/data-table/demos/enUS/index.demo-entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,19 @@ export-csv.vue
| expanded-row-keys | `Array<string \| number>` | `undefined` | Expanded row keys. | |
| filter-icon-popover-props | `PopoverProps` | `{ trigger: click, placement: bottom }` | Filter icon's Popover attribute of the button, See [Popover props](popover#Popover-Props) | 2.39.0 |
| flex-height | `boolean` | `false` | Whether to make table body's height auto fit table area height. Make it enabled will make `table-layout` always set to `'fixed'`. | |
| header-height | `number` | `28` | Header height value when `virtual-scroll-header` is enabled. | NEXT_VERSION |
| height-for-row | `(rowData: object, index: number) => number` | `undefined` | Height configuration function for each row of the table. It must be used with `virtual-scroll-x`. If it's not configured, each rows height would be set to `min-row-height`. | NEXT_VERSION |
| header-height | `number` | `28` | Header height value when `virtual-scroll-header` is enabled. | 2.40.0 |
| height-for-row | `(rowData: object, index: number) => number` | `undefined` | Height configuration function for each row of the table. It must be used with `virtual-scroll-x`. If it's not configured, each rows height would be set to `min-row-height`. | 2.40.0 |
| indent | `number` | `16` | Indent of row content when using tree data. | |
| loading | `boolean` | `false` | Whether to display loading status. | |
| max-height | `number \| string` | `undefined` | The max-height of the table content. Can be a CSS value. | |
| min-height | `number \| string` | `undefined` | The min-height of the table content. Can be a CSS value. | |
| min-row-height | `number` | `28` | Min row height of the table when `virtual-scroll` or `virtual-scroll-x` is enabled. Each row's height must be larger than its value. | NEXT_VERSION |
| min-row-height | `number` | `28` | Min row height of the table when `virtual-scroll` or `virtual-scroll-x` is enabled. Each row's height must be larger than its value. | 2.40.0 |
| paginate-single-page | `boolean` | `true` | Whether show pagination data is less than one page. | 2.28.0 |
| pagination | `false \| object` | `false` | See [Pagination props](pagination#Pagination-Props) | |
| pagination-behavior-on-filter | `'first' \| 'current'` | `'current'` | The behavior of pagination after filter state is changed. `'first'` means returning to first page on filter, `'current'` means keep at current page on filter. | 2.28.3 |
| remote | `boolean` | `false` | If data-table do automatic paging. You may set it to `true` in async usage. | |
| render-cell | `(value: any, rowData: object, column: DataTableBaseColumn) => VNodeChild` | `undefined` | Render function of cell, it will be overwritten by columns' `render`. | 2.30.5 |
| render-expand-icon | `({ expanded, rowData }: { expanded: boolean, rowData: object }) => VNodeChild` | `undefined` | Render function of expand icon. | 2.32.2, `expanded`: 2.34.4, `rowData`: `NEXT_VERSION` |
| render-expand-icon | `({ expanded, rowData }: { expanded: boolean, rowData: object }) => VNodeChild` | `undefined` | Render function of expand icon. | 2.32.2, `expanded`: 2.34.4, `rowData`: `2.40.0` |
| row-class-name | `string \| (rowData: object, rowIndex : number) => string` | `undefined` | Class name of each row. | |
| row-key | `(rowData: object) => (number \| string)` | `undefined` | Generate the key of the row by row data (if you don't want to set the key). | |
| row-props | `(rowData: object, rowIndex : number) => HTMLAttributes` | `undefined` | Customize row attributes. | |
Expand All @@ -110,8 +110,8 @@ export-csv.vue
| summary-placement | `'top' \| 'bottom'` | `'bottom'` | Summary rows placement. | 2.33.3 |
| table-layout | `'auto' \| 'fixed'` | `'auto'` | Style `table-layout` of the table. When `ellipsis` or `max-height` or `flex-height` are set, it will always be `'fixed'` regardless of what you set. | |
| virtual-scroll | `boolean` | `false` | Whether to use virtual scrolling to deal with large data. Make sure `max-height` is set before using it. When `virtual-scroll` is `true`, `rowSpan` will not take effect. | |
| virtual-scroll-header | `boolean` | `false` | Whether to use virtual scrolling in table header. If there are too many columns, you can enable the prop. You must configure `header-height` at the same time. Enabling the prop will disable header cells that cross columns & rows. | NEXT_VERSION |
| virtual-scroll-x | `boolean` | `false` | Whether to use horizontal virtual scrolling in table body. If there are too many columns, you can enable the prop. Enabling the prop will disable body cells that cross columns & rows. If the prop is enabled, every column should have `width` prop configured and `virtual-scroll`, `scroll-x`, `min-row-height`, `height-for-row`, `virtual-scroll-header` (optional), `header-height` (optional) props should be configured at the same time. You can refer to <n-a href="#virtual-x.vue">the example</n-a>. | NEXT_VERSION |
| virtual-scroll-header | `boolean` | `false` | Whether to use virtual scrolling in table header. If there are too many columns, you can enable the prop. You must configure `header-height` at the same time. Enabling the prop will disable header cells that cross columns & rows. | 2.40.0 |
| virtual-scroll-x | `boolean` | `false` | Whether to use horizontal virtual scrolling in table body. If there are too many columns, you can enable the prop. Enabling the prop will disable body cells that cross columns & rows. If the prop is enabled, every column should have `width` prop configured and `virtual-scroll`, `scroll-x`, `min-row-height`, `height-for-row`, `virtual-scroll-header` (optional), `header-height` (optional) props should be configured at the same time. You can refer to <n-a href="#virtual-x.vue">the example</n-a>. | 2.40.0 |
| on-load | `(rowData: object) => Promise<void>` | `undefined` | Callback of async tree data expanding. | 2.27.0 |
| on-scroll | `(e: Event) => void` | `undefined` | Callback of table body scrolling. | 2.29.1 |
| on-update:checked-row-keys | `(keys: Array<string \| number>, rows: object[], meta: { row: object \| undefined, action: 'check' \| 'uncheck' \| 'checkAll' \| 'uncheckAll' }) => void` | `undefined` | The callback function triggered when the checked-row-keys value changes. | `rows` 2.30.5, `meta` 2.33.4 |
Expand All @@ -126,7 +126,7 @@ export-csv.vue
| Name | Type | Default | Description | Version |
| --- | --- | --- | --- | --- |
| align | `'left' \| 'right' \| 'center'` | `'left'` | Text align in column. | |
| allowExport | `boolean` | `true` | Can the column exported | NEXT_VERSION |
| allowExport | `boolean` | `true` | Can the column exported | 2.40.0 |
| titleAlign | `'left' \| 'right' \| 'center'` | `null` | alignment of the table header. If omitted, the value of the above align attribute will be applied | 2.34.4 |
| cellProps | `(rowData: object, rowIndex: number) => object` | `undefined` | HTML attributes of the column's cell. | 2.27.0 |
| children | `DataTableColumn[]` | `undefined` | Child nodes of a grouped column. | |
Expand Down
14 changes: 7 additions & 7 deletions src/data-table/demos/zhCN/index.demo-entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,19 @@ rtl-debug.vue
| expanded-row-keys | `Array<string \| number>` | `undefined` | 展开行的 key 值 | |
| filter-icon-popover-props | `PopoverProps` | `{ trigger: click, placement: bottom }` | 过滤按钮的 Popover 属性,属性参考 [Popover props](popover#Popover-Props) | 2.39.0 |
| flex-height | `boolean` | `false` | 是否让表格主体的高度自动适应整个表格区域的高度,打开这个选项会让 `table-layout` 始终为 `'fixed'` | |
| header-height | `number` | `28` | 在开启 `virtual-scroll-header` 属性的情况下,表头的高度 | NEXT_VERSION |
| height-for-row | `(rowData: object, index: number) => number` | `undefined` | 每行高度的配置函数,必须配合 `virtual-scroll-x` 使用,如果不进行配置,每一行的高度会被设为 `min-row-height` | NEXT_VERSION |
| header-height | `number` | `28` | 在开启 `virtual-scroll-header` 属性的情况下,表头的高度 | 2.40.0 |
| height-for-row | `(rowData: object, index: number) => number` | `undefined` | 每行高度的配置函数,必须配合 `virtual-scroll-x` 使用,如果不进行配置,每一行的高度会被设为 `min-row-height` | 2.40.0 |
| indent | `number` | `16` | 使用树形数据时行内容的缩进 | |
| loading | `boolean` | `false` | 是否显示 loading 状态 | |
| max-height | `number \| string` | `undefined` | 表格内容的最大高度,可以是 CSS 属性值 | |
| min-height | `number \| string` | `undefined` | 表格内容的最低高度,可以是 CSS 属性值 | |
| min-row-height | `number` | `28` | 在开启 `virtual-scroll``virtual-scroll-x` 的情况下,每一行的最小高度,所有的行的高度必须比这个值更大 | NEXT_VERSION |
| min-row-height | `number` | `28` | 在开启 `virtual-scroll``virtual-scroll-x` 的情况下,每一行的最小高度,所有的行的高度必须比这个值更大 | 2.40.0 |
| paginate-single-page | `boolean` | `true` | 当表格数据只有一页时是否显示分页面 | 2.28.0 |
| pagination | `false \| object` | `false` | 属性参考 [Pagination props](pagination#Pagination-Props) | |
| pagination-behavior-on-filter | `'first' \| 'current'` | `'current'` | 过滤操作后页面的状态,`'first'` 为回到首页,`'current'` 为停留在当前页 | 2.28.3 |
| remote | `boolean` | `false` | 表格是否自动分页数据,在异步的状况下你可能需要把它设为 `true` | |
| render-cell | `(value: any, rowData: object, column: DataTableBaseColumn) => VNodeChild` | `undefined` | 自定义单元格渲染,优先级低于列的 `render` | 2.30.5 |
| render-expand-icon | `({ expanded, rowData }: { expanded: boolean, rowData: object }) => VNodeChild` | `undefined` | 自定义渲染展开图标 | 2.32.2, `expanded`: 2.34.4, `rowData`: `NEXT_VERSION` |
| render-expand-icon | `({ expanded, rowData }: { expanded: boolean, rowData: object }) => VNodeChild` | `undefined` | 自定义渲染展开图标 | 2.32.2, `expanded`: 2.34.4, `rowData`: `2.40.0` |
| row-class-name | `string \| (rowData: object, index : number) => string` | `undefined` | 每一行上的类名 | |
| row-key | `(rowData: object) => (number \| string)` | `undefined` | 通过行数据创建行的 key(如果你不想给每一行加上 key) | |
| row-props | `(rowData: object, rowIndex : number) => HTMLAttributes` | `undefined` | 自定义行属性 | |
Expand All @@ -121,8 +121,8 @@ rtl-debug.vue
| summary-placement | `'top' \| 'bottom'` | `'bottom'` | 总结栏的位置 | 2.33.3 |
| table-layout | `'auto' \| 'fixed'` | `'auto'` | 表格的 `table-layout` 样式属性,在设定 `ellipsis``max-height` 的情况下固定为 `'fixed'` | |
| virtual-scroll | `boolean` | `false` | 是否开启虚拟滚动,应对大规模数据,开启前请设定好 `max-height`。当 `virtual-scroll``true` 时,`rowSpan` 将不生效 | |
| virtual-scroll-header | `boolean` | `false` | 是否打开表头的虚拟滚动,如果横向列太多,可以考虑打开此属性,打开此属性会导致表头单元格跨行列的功能不可用,同时必须要配置 `header-height` | NEXT_VERSION |
| virtual-scroll-x | `boolean` | `false` | 是否打开表主体的横向虚拟滚动,如果横向列太多,可以考虑打开此属性,打开此属性会导致单元格跨行列的功能不可用,此属性开启时,必须要和 `virtual-scroll``scroll-x``min-row-height``height-for-row``virtual-scroll-header``header-height` 属性配合使用,同时每一列必须都配置 `width` 属性,你可以参考 <n-a href="#virtual-x.vue">完整的例子</n-a> | NEXT_VERSION |
| virtual-scroll-header | `boolean` | `false` | 是否打开表头的虚拟滚动,如果横向列太多,可以考虑打开此属性,打开此属性会导致表头单元格跨行列的功能不可用,同时必须要配置 `header-height` | 2.40.0 |
| virtual-scroll-x | `boolean` | `false` | 是否打开表主体的横向虚拟滚动,如果横向列太多,可以考虑打开此属性,打开此属性会导致单元格跨行列的功能不可用,此属性开启时,必须要和 `virtual-scroll``scroll-x``min-row-height``height-for-row``virtual-scroll-header``header-height` 属性配合使用,同时每一列必须都配置 `width` 属性,你可以参考 <n-a href="#virtual-x.vue">完整的例子</n-a> | 2.40.0 |
| on-load | `(rowData: object) => Promise<void>` | `undefined` | 异步展开树形数据的回调 | 2.27.0 |
| on-scroll | `(e: Event) => void` | `undefined` | 表格主体滚动的回调 | 2.29.1 |
| on-update:checked-row-keys | `(keys: Array<string \| number>, rows: object[], meta: { row: object \| undefined, action: 'check' \| 'uncheck' \| 'checkAll' \| 'uncheckAll' }) => void` | `undefined` | checked-row-keys 值改变时触发的回调函数 | `rows` 2.30.5, `meta` 2.33.4 |
Expand All @@ -137,7 +137,7 @@ rtl-debug.vue
| 名称 | 类型 | 默认值 | 说明 | 版本 |
| --- | --- | --- | --- | --- |
| align | `'left' \| 'right' \| 'center'` | `'left'` | 列内的文本排列 | |
| allowExport | `boolean` | `true` | 这一列是否可以导出 | NEXT_VERSION |
| allowExport | `boolean` | `true` | 这一列是否可以导出 | 2.40.0 |
| titleAlign | `'left' \| 'right' \| 'center'` | `'null'` | 表头列对齐方式,若不设置该项,则使用列内的文本排列 | 2.34.4 |
| cellProps | `(rowData: object, rowIndex: number) => object` | `undefined` | 该列单元格的 HTML 属性 | 2.27.0 |
| children | `DataTableColumn[]` | `undefined` | 成组列头的子节点 | |
Expand Down
Loading

0 comments on commit 5038519

Please sign in to comment.