mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-04-12 14:40:47 +08:00
2.31.0
This commit is contained in:
parent
cb497696b6
commit
dbc538ad12
@ -1,6 +1,6 @@
|
||||
# CHANGELOG
|
||||
|
||||
## NEXT_VERSION
|
||||
## 2.31.0
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# CHANGELOG
|
||||
|
||||
## NEXT_VERSION
|
||||
## 2.31.0
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "naive-ui",
|
||||
"version": "2.30.8",
|
||||
"version": "2.31.0",
|
||||
"description": "A Vue 3 Component Library. Fairly Complete, Theme Customizable, Uses TypeScript, Fast",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -26,8 +26,8 @@ v-show-debug.vue
|
||||
| bordered | `boolean` | `false` | Whether to display a avatar with border. | |
|
||||
| color | `string` | `undefined` | The background color of the avatar. | |
|
||||
| fallback-src | `string` | `undefined` | Image URL to show when avatar fails to load. | |
|
||||
| lazy | `boolean` | `false` | Whether to show after it enters viewport configured by `intersection-observer-options` | NEXT_VERSION |
|
||||
| intersection-observer-options | `{ root?: Element \| Document \| string \| null, rootMargin?: string, threshold?: number \| number[]; }` | `undefined` | Intersection observer's config to be applied when `lazy=true`. | NEXT_VERSION |
|
||||
| lazy | `boolean` | `false` | Whether to show after it enters viewport configured by `intersection-observer-options` | 2.31.0 |
|
||||
| intersection-observer-options | `{ root?: Element \| Document \| string \| null, rootMargin?: string, threshold?: number \| number[]; }` | `undefined` | Intersection observer's config to be applied when `lazy=true`. | 2.31.0 |
|
||||
| object-fit | `'fill' \| 'contain' \| 'cover' \| 'none' \| 'scale-down'` | `'fill'` | Object-fit type of the image in the container. | |
|
||||
| size | `'small' \| 'medium' \| 'large' \| number` | `'medium'` | Avatar's size. |
|
||||
| src | `string` | `undefined` | Avatar's image source. | |
|
||||
@ -50,7 +50,7 @@ see [Avatar Props](avatar#Props)
|
||||
| Name | Parameters | Description | Version |
|
||||
| --- | --- | --- | --- |
|
||||
| default | `()` | The content of the avatar. | |
|
||||
| placeholder | `()` | Placeholder shown when image is not loaded. | NEXT_VERSION |
|
||||
| placeholder | `()` | Placeholder shown when image is not loaded. | 2.31.0 |
|
||||
|
||||
### AvatarGroup Slots
|
||||
|
||||
|
@ -27,8 +27,8 @@ rtl-debug.vue
|
||||
| bordered | `boolean` | `false` | 头像是否带边框 | |
|
||||
| color | `string` | `undefined` | 头像的背景色 | |
|
||||
| fallback-src | `string` | `undefined` | 头像加载失败时显示的图片的地址 | |
|
||||
| lazy | `boolean` | `false` | 是否在进入 `intersection-observer-options` 配置的视口之后再开始加载 | NEXT_VERSION |
|
||||
| intersection-observer-options | `{ root?: Element \| Document \| string \| null, rootMargin?: string, threshold?: number \| number[]; }` | `undefined` | `lazy=true` 时 intersection observer 观测的配置 | NEXT_VERSION |
|
||||
| lazy | `boolean` | `false` | 是否在进入 `intersection-observer-options` 配置的视口之后再开始加载 | 2.31.0 |
|
||||
| intersection-observer-options | `{ root?: Element \| Document \| string \| null, rootMargin?: string, threshold?: number \| number[]; }` | `undefined` | `lazy=true` 时 intersection observer 观测的配置 | 2.31.0 |
|
||||
| object-fit | `'fill' \| 'contain' \| 'cover' \| 'none' \| 'scale-down'` | `'fill'` | 头像的图片在容器内的的适应类型 | |
|
||||
| size | `'small' \| 'medium' \| 'large' \| number` | `'medium'` | 头像的尺寸 |
|
||||
| src | `string` | `undefined` | 头像的地址 | |
|
||||
@ -48,10 +48,10 @@ rtl-debug.vue
|
||||
|
||||
### Avatar Slots
|
||||
|
||||
| 名称 | 参数 | 说明 | 版本 |
|
||||
| ----------- | ---- | -------------------------- | ------------ |
|
||||
| default | `()` | 头像内填充的内容 | |
|
||||
| placeholder | `()` | 图像没有加载成功时候的占位 | NEXT_VERSION |
|
||||
| 名称 | 参数 | 说明 | 版本 |
|
||||
| ----------- | ---- | -------------------------- | ------ |
|
||||
| default | `()` | 头像内填充的内容 | |
|
||||
| placeholder | `()` | 图像没有加载成功时候的占位 | 2.31.0 |
|
||||
|
||||
### AvatarGroup Slots
|
||||
|
||||
|
@ -25,6 +25,6 @@ reset.vue
|
||||
|
||||
### Countdown Methods
|
||||
|
||||
| Name | Type | Description | Version |
|
||||
| ----- | ------------ | ---------------- | ------------ |
|
||||
| reset | `() => void` | Reset countdown. | NEXT_VERSION |
|
||||
| Name | Type | Description | Version |
|
||||
| ----- | ------------ | ---------------- | ------- |
|
||||
| reset | `() => void` | Reset countdown. | 2.31.0 |
|
||||
|
@ -26,6 +26,6 @@ finish-debug.vue
|
||||
|
||||
### Countdown Methods
|
||||
|
||||
| 名称 | 类型 | 说明 | 版本 |
|
||||
| ----- | ------------ | ---- | ------------ |
|
||||
| reset | `() => void` | 重置 | NEXT_VERSION |
|
||||
| 名称 | 类型 | 说明 | 版本 |
|
||||
| ----- | ------------ | ---- | ------ |
|
||||
| reset | `() => void` | 重置 | 2.31.0 |
|
||||
|
@ -131,7 +131,7 @@ render-cell.vue
|
||||
| fixed | `'left \| 'right' \| false` | `false` | Whether the column needs to be fixed. | |
|
||||
| key | `string \| number` | `undefined` | Unique key of this column, this is not repeatable. | |
|
||||
| minWidth | `number \| string` | `undefined` | Min width of the column. | 2.28.3 |
|
||||
| multiple | `boolean` | `true` | Whether to enable multiple selection mode. Only works when `type` is `'selection'`. | NEXT_VERSION |
|
||||
| multiple | `boolean` | `true` | Whether to enable multiple selection mode. Only works when `type` is `'selection'`. | 2.31.0 |
|
||||
| options | `Array<'all' \| 'none' \| { label: string, key: string \| number, onSelect: (pageData: RowData) => void }>` | `undefined` | Options of custom selection. Only work with `type='selection'`. | |
|
||||
| render | `(rowData: object, rowIndex: number) => VNodeChild` | `undefined` | Render function of column row cell. | |
|
||||
| renderExpand | `(rowData: object, rowIndex: number) => VNodeChild` | `undefined` | Render function of the expand area. Only works when `type` is `'expand'`. | |
|
||||
|
@ -137,7 +137,7 @@ ellipsis-debug.vue
|
||||
| fixed | `'left \| 'right' \| false` | `false` | 该列是否需要 fixed | |
|
||||
| key | `string \| number` | `undefined` | 这一列的 key,不可重复。 | |
|
||||
| minWidth | `number \| string` | `undefined` | 列的最小宽度 | 2.28.3 |
|
||||
| multiple | `boolean` | `true` | 是否开启多选,仅在 `type` 为 `'selection'` 的时候生效 | NEXT_VERSION |
|
||||
| multiple | `boolean` | `true` | 是否开启多选,仅在 `type` 为 `'selection'` 的时候生效 | 2.31.0 |
|
||||
| options | `Array<'all' \| 'none' \| { label: string, key: string \| number, onSelect: (pageData: RowData) => void }>` | `undefined` | 自定义选择项的选项,只对 `type='selection'` 生效 | |
|
||||
| render | `(rowData: object, rowIndex: number) => VNodeChild` | `undefined` | 渲染函数,渲染这一列的每一行的单元格 | |
|
||||
| renderExpand | `(rowData: object, rowIndex: number) => VNodeChild` | `undefined` | 展开区域的渲染函数,仅在 `type` 为 `'expand'` 的时候生效 | |
|
||||
|
@ -28,14 +28,14 @@ resizable.vue
|
||||
| block-scroll | `boolean` | `true` | Whether to disabled body scrolling when it's active. | 2.28.3 |
|
||||
| close-on-esc | `boolean` | `true` | Whether to close drawer on Esc is pressed. | 2.24.2 |
|
||||
| content-style | `string \| Object` | `undefined` | Style of drawer's scrollable content node. | |
|
||||
| default-width | `number \| string` | `251` | Default width of the drawer, works when placement is `left` and `right`. | NEXT_VERSION |
|
||||
| default-height | `number \| string` | `251` | Default height of the drawer, works when placement is `top` and `bottom`. | NEXT_VERSION |
|
||||
| default-width | `number \| string` | `251` | Default width of the drawer, works when placement is `left` and `right`. | 2.31.0 |
|
||||
| default-height | `number \| string` | `251` | Default height of the drawer, works when placement is `top` and `bottom`. | 2.31.0 |
|
||||
| display-directive | `'if' \| 'show'` | `'if'` | The display directive to use when `n-drawer` is rendered. `'if'` corresponds to `v-if` and `'show'` corresponds to `v-show`. | |
|
||||
| height | `number \| string` | `undefined` | Works when placement is `top` and `bottom`. | |
|
||||
| native-scrollbar | `boolean` | `true` | Whether to use native scrollbar on drawer. | |
|
||||
| mask-closable | `boolean` | `true` | Whether to emit `hide` event when click mask. | |
|
||||
| placement | `'top' \| 'right' \| 'bottom' \| 'left'` | `'right'` | Drawer placement. | |
|
||||
| resizable | `boolean` | `false` | Whether to resize the width / height of drawer. | NEXT_VERSION |
|
||||
| resizable | `boolean` | `false` | Whether to resize the width / height of drawer. | 2.31.0 |
|
||||
| show | `boolean` | `false` | Whether to show drawer. | |
|
||||
| show-mask | `boolean` | `true` | Whether to show mask. If set to `'transparent'`, transparent mask would be shown. If set to false, `trap-focus` will be disabled. | 2.28.3 |
|
||||
| style | `string \| Object` | `undefined` | Style of the drawer. | |
|
||||
@ -47,9 +47,9 @@ resizable.vue
|
||||
| on-after-leave | `() => void` | `undefined` | Callback after drawer is closed. | 2.28.0 |
|
||||
| on-esc | `() => void` | `undefined` | Callback fired when the escape key is pressed and focus is within drawer. | 2.24.2 |
|
||||
| on-mask-click | `(e: MouseEvent) => void` | `undefined` | Callback triggered on mask clicked. | |
|
||||
| on-update:height | `(height: number) => void` | `undefined` | Callback trigger on drawer height change. | NEXT_VERSION |
|
||||
| on-update:height | `(height: number) => void` | `undefined` | Callback trigger on drawer height change. | 2.31.0 |
|
||||
| on-update:show | `(show: boolean) => void` | `undefined` | Callback triggered on drawer display status would change. | |
|
||||
| on-update:width | `(width: number) => void` | `undefined` | Callback trigger on drawer width change. | NEXT_VERSION |
|
||||
| on-update:width | `(width: number) => void` | `undefined` | Callback trigger on drawer width change. | 2.31.0 |
|
||||
|
||||
### DrawerContent Props
|
||||
|
||||
|
@ -34,14 +34,14 @@ resizable.vue
|
||||
| block-scroll | `boolean` | `true` | 是否在打开时禁用 body 滚动 | 2.28.3 |
|
||||
| close-on-esc | `boolean` | `true` | 是否在摁下 Esc 键的时候关闭 Drawer | 2.24.2 |
|
||||
| content-style | `string \| Object` | `undefined` | 抽屉可滚动内容节点的样式 | |
|
||||
| default-width | `number \| string` | `251` | 抽屉的默认宽度,在位置是 `left` 和 `right` 时生效 | NEXT_VERSION |
|
||||
| default-height | `number \| string` | `251` | 抽屉的默认高度,在位置是 `top` 和 `bottom` 时生效 | NEXT_VERSION |
|
||||
| default-width | `number \| string` | `251` | 抽屉的默认宽度,在位置是 `left` 和 `right` 时生效 | 2.31.0 |
|
||||
| default-height | `number \| string` | `251` | 抽屉的默认高度,在位置是 `top` 和 `bottom` 时生效 | 2.31.0 |
|
||||
| display-directive | `'if' \| 'show'` | `'if'` | `n-drawer` 在控制内容是否渲染时使用的指令,`'if'` 对应 `v-if`,`'show'` 对应 `v-show` | |
|
||||
| height | `number \| string` | `undefined` | 抽屉的高度,在位置是 `top` 和 `bottom` 时生效 | |
|
||||
| mask-closable | `boolean` | `true` | 点击遮罩时是否发出 `update:show` 事件 | |
|
||||
| native-scrollbar | `boolean` | `true` | 是否使用原生滚动 | |
|
||||
| placement | `'top' \| 'right' \| 'bottom' \| 'left'` | `'right'` | 抽屉展示的位置 | |
|
||||
| resizable | `boolean` | `false` | 抽屉是否可以调整宽度、高度 | NEXT_VERSION |
|
||||
| resizable | `boolean` | `false` | 抽屉是否可以调整宽度、高度 | 2.31.0 |
|
||||
| show | `boolean` | `false` | 是否展示抽屉 | |
|
||||
| show-mask | `boolean \| 'transparent'` | `true` | 是否显示遮罩,如果设为 `'transparent'` 会展示透明遮罩,如果设为 `false` 会禁用 `trap-focus` | 2.28.3 |
|
||||
| style | `string \| Object` | `undefined` | 抽屉的样式 | |
|
||||
@ -53,9 +53,9 @@ resizable.vue
|
||||
| on-after-leave | `() => void` | `undefined` | Drawer 关闭后的回调 | 2.28.0 |
|
||||
| on-esc | `() => void` | `undefined` | 焦点在 Drawer 内部时按下 Esc 键的回调 | 2.24.2 |
|
||||
| on-mask-click | `(e: MouseEvent) => void` | `undefined` | 点击遮罩的回调 | |
|
||||
| on-update:height | `(height: number) => void` | `undefined` | 抽屉高度改变时执行的回调函数 | NEXT_VERSION |
|
||||
| on-update:height | `(height: number) => void` | `undefined` | 抽屉高度改变时执行的回调函数 | 2.31.0 |
|
||||
| on-update:show | `(show: boolean) => void` | `undefined` | 抽屉显示状态改变时执行的回调函数 | |
|
||||
| on-update:width | `(width: number) => void` | `undefined` | 抽屉宽度改变时执行的回调函数 | NEXT_VERSION |
|
||||
| on-update:width | `(width: number) => void` | `undefined` | 抽屉宽度改变时执行的回调函数 | 2.31.0 |
|
||||
|
||||
### DrawerContent Props
|
||||
|
||||
|
@ -32,7 +32,7 @@ render-option.vue
|
||||
| key-field | `string` | `'key'` | Field name of key. | |
|
||||
| label-field | `string` | `'label'` | Field name of label. | |
|
||||
| node-props | `(option: DropdownOption \| DropdownGroupOption) => HTMLAttributes` | `undefined` | Option HTML attributes generator. | 2.29.1 |
|
||||
| menu-props | `(option: DropdownOption \| undefined, options: (DropdownOption \| DropdownGroupOption)[]) => HTMLAttributes` | `undefined` | Menu HTML attributes generator. | NEXT_VERSION |
|
||||
| menu-props | `(option: DropdownOption \| undefined, options: (DropdownOption \| DropdownGroupOption)[]) => HTMLAttributes` | `undefined` | Menu HTML attributes generator. | 2.31.0 |
|
||||
| options | `Array<DropdownOption \| DropdownGroupOption \| DropdownDividerOption \| DropdownRenderOption>` | `[]` | Dropdown options. | |
|
||||
| render-icon | `(option: DropdownOption) => VNodeChild` | `undefined` | Render function that renders option icons. | |
|
||||
| render-label | `(option: DropdownOption) => VNodeChild` | `undefined` | Render function that renders option labels. | |
|
||||
|
@ -34,7 +34,7 @@ scrollable-debug.vue
|
||||
| key-field | `string` | `'key'` | key 的字段名 | |
|
||||
| label-field | `string` | `'label'` | label 的字段名 | |
|
||||
| node-props | `(option: DropdownOption \| DropdownGroupOption) => HTMLAttributes` | `undefined` | 批量处理下拉菜单选项的 HTML 属性 | 2.29.1 |
|
||||
| menu-props | `(option: DropdownOption \| undefined, options: (DropdownOption \| DropdownGroupOption)[]) => HTMLAttributes` | `undefined` | 批量处理下拉菜单的 HTML 属性 | NEXT_VERSION |
|
||||
| menu-props | `(option: DropdownOption \| undefined, options: (DropdownOption \| DropdownGroupOption)[]) => HTMLAttributes` | `undefined` | 批量处理下拉菜单的 HTML 属性 | 2.31.0 |
|
||||
| options | `Array<DropdownOption \| DropdownGroupOption \| DropdownDividerOption \| DropdownRenderOption>` | `[]` | 下拉菜单传入的 options | |
|
||||
| render-icon | `(option: DropdownOption) => VNodeChild` | `undefined` | 批量处理下拉菜单图标渲染 | |
|
||||
| render-label | `(option: DropdownOption) => VNodeChild` | `undefined` | 批量处理下拉菜单标签渲染 | |
|
||||
|
@ -25,7 +25,7 @@ finish.vue
|
||||
| precision | `number` | `0` | Decimal precision of the displayed value. | 2.23.2 |
|
||||
| show-separator | `boolean` | `false` | Whether to show separator. | 2.23.2 |
|
||||
| to | `number` | `undefined` | Target value. | 2.23.2 |
|
||||
| on-finish | `() => void` | `undefined` | The callback on animation is finished. | NEXT_VERSION |
|
||||
| on-finish | `() => void` | `undefined` | The callback on animation is finished. | 2.31.0 |
|
||||
|
||||
### NumberAnimation Methods
|
||||
|
||||
|
@ -25,7 +25,7 @@ finish.vue
|
||||
| precision | `number` | `0` | 精度,保留小数点后几位 | 2.23.2 |
|
||||
| show-separator | `boolean` | `false` | 是否显示分隔符 | 2.23.2 |
|
||||
| to | `number` | `undefined` | 目标值 | 2.23.2 |
|
||||
| on-finish | `() => void` | `undefined` | 动画结束的回调 | NEXT_VERSION |
|
||||
| on-finish | `() => void` | `undefined` | 动画结束的回调 | 2.31.0 |
|
||||
|
||||
### NumberAnimation Methods
|
||||
|
||||
|
@ -35,7 +35,7 @@ slots.vue
|
||||
| display-directive | `'if' \| 'show'` | `'if'` | The conditionally render directive to show popover content. `if` means using `v-if` to render content, `show` means using `v-show` to render content. | |
|
||||
| duration | `number` | `100` | Popover vanish delay when trigger is `hover`. | |
|
||||
| flip | `boolean` | `true` | Whether to flip the popover when there is no space for current placement. | |
|
||||
| footer-style | `Object \| string` | `undefined` | Footer style of the popover. | NEXT_VERSION |
|
||||
| footer-style | `Object \| string` | `undefined` | Footer style of the popover. | 2.31.0 |
|
||||
| header-style | `Object \| string` | `undefined` | Header style of the popover. | 2.28.3 |
|
||||
| keep-alive-on-hover | `boolean` | `true` | Whether to keep popover shown when hover on popover itself with `trigger="hover"`. | 2.25.0 |
|
||||
| overlap | `boolean` | `false` | Overlap trigger element. | |
|
||||
@ -59,7 +59,7 @@ slots.vue
|
||||
| Name | Parameters | Description | Version |
|
||||
| --- | --- | --- | --- |
|
||||
| trigger | `()` | The element or component that triggers popover. | |
|
||||
| footer | `()` | The footer content of the popover. | NEXT_VERSION |
|
||||
| footer | `()` | The footer content of the popover. | 2.31.0 |
|
||||
| header | `()` | The header content of the popover. | 2.28.3 |
|
||||
| default | `()` | The content inside popover. | |
|
||||
|
||||
|
@ -42,7 +42,7 @@ center-arrow-debug.vue
|
||||
| display-directive | `'if' \| 'show'` | `'if'` | 条件渲染使用的指令,`if` 会让内容被使用 `v-if` 渲染,`show` 会让内容被使用 `v-show` 渲染 | |
|
||||
| duration | `number` | `100` | 悬浮关闭弹出信息的延迟 | |
|
||||
| flip | `boolean` | `true` | 是否在当前放置方式不能提供足够空间的时候调整弹出信息的位置 | |
|
||||
| footer-style | `Object \| string` | `undefined` | popover footer 的样式 | NEXT_VERSION |
|
||||
| footer-style | `Object \| string` | `undefined` | popover footer 的样式 | 2.31.0 |
|
||||
| header-style | `Object \| string` | `undefined` | popover header 的样式 | 2.28.3 |
|
||||
| keep-alive-on-hover | `boolean` | `true` | 是否在 trigger 为 hover 的时候,悬浮在 popover 时保持 popover 显示 | 2.25.0 |
|
||||
| overlap | `boolean` | `false` | 覆盖触发元素 | |
|
||||
@ -63,12 +63,12 @@ center-arrow-debug.vue
|
||||
|
||||
### Popover Slots
|
||||
|
||||
| 名称 | 参数 | 说明 | 版本 |
|
||||
| ------- | ---- | ------------------------ | ------------ |
|
||||
| trigger | `()` | 触发弹出信息的组件或元素 | |
|
||||
| footer | `()` | 弹出的 footer 内容 | NEXT_VERSION |
|
||||
| header | `()` | 弹出的 header 内容 | |
|
||||
| default | `()` | 弹出的内容 | |
|
||||
| 名称 | 参数 | 说明 | 版本 |
|
||||
| ------- | ---- | ------------------------ | ------ |
|
||||
| trigger | `()` | 触发弹出信息的组件或元素 | |
|
||||
| footer | `()` | 弹出的 footer 内容 | 2.31.0 |
|
||||
| header | `()` | 弹出的 header 内容 | |
|
||||
| default | `()` | 弹出的内容 | |
|
||||
|
||||
### Popover Methods
|
||||
|
||||
|
@ -29,7 +29,7 @@ checkbox-placement.vue
|
||||
|
||||
| Name | Type | default | Description | Version |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| accordion | `boolean` | `false` | Whether to use accrodion expand mode. | NEXT_VERSION |
|
||||
| accordion | `boolean` | `false` | Whether to use accrodion expand mode. | 2.31.0 |
|
||||
| allow-checking-not-loaded | `boolean` | `false` | Whether to allow cascade checking on not loaded nodes. If you want to use this, you should know the `check-keys` may be incomplete. Also, you should aware about the consistency bewteen naive's checking logic and your backend's checking logic, especially when there are disabled nodes. | 2.28.1 |
|
||||
| allow-drop | `(info: { dropPosition: DropPosition, node: TreeOption, phase: 'drag' \| 'drop' }) => boolean` | A function that prohibit dropping inside leaf node. | Whether to allow dropping. | |
|
||||
| block-line | `boolean` | `false` | Nodes spread out the whole row. | |
|
||||
@ -41,7 +41,7 @@ checkbox-placement.vue
|
||||
| checkbox-placement | `'left' \| 'right'` | `'left'` | Checkbox's placement. | 2.28.3 |
|
||||
| children-field | `string` | `'children'` | The children field in `TreeOption`. | |
|
||||
| checked-keys | `Array<string \| number>` | `undefined` | Checked keys of the tree. | |
|
||||
| check-on-click | `boolean \| ((node: TreeOption) => boolean)` | `false` | Allow node clicking to trigger check when `checkable` is `true`. | NEXT_VERSION |
|
||||
| check-on-click | `boolean \| ((node: TreeOption) => boolean)` | `false` | Allow node clicking to trigger check when `checkable` is `true`. | 2.31.0 |
|
||||
| data | `Array<TreeOption>` | `[]` | The node data of the tree. Reset `data` will cause clearing of some uncontrolled status. If you need to modify data, you'd better make tree work in a controlled manner. | |
|
||||
| default-checked-keys | `Array<string \| number>` | `[]` | Multiple options selected by default. | |
|
||||
| default-expand-all | `boolean` | `false` | Expand all options. | |
|
||||
|
@ -33,7 +33,7 @@ scroll-debug.vue
|
||||
|
||||
| 名称 | 类型 | 默认值 | 说明 | 版本 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| accordion | `boolean` | `false` | 是否使用手风琴展开模式 | NEXT_VERSION |
|
||||
| accordion | `boolean` | `false` | 是否使用手风琴展开模式 | 2.31.0 |
|
||||
| allow-checking-not-loaded | `boolean` | `false` | 是否允许级联勾选还没有完全加载的节点。如果你要用这个属性,请记住 `checked-keys` 可能是不完整的,并且请注意勾选行为和后端计算逻辑的一致性,尤其是有禁用节点的情况下 | 2.28.1 |
|
||||
| allow-drop | `(info: { dropPosition: DropPosition, node: TreeOption, phase: 'drag' \| 'drop' }) => boolean` | 一个不允许 drop 在叶节点内部的函数 | 是否允许 drop | |
|
||||
| block-line | `boolean` | `false` | 节点整行撑开 | |
|
||||
@ -45,7 +45,7 @@ scroll-debug.vue
|
||||
| checkbox-placement | `'left' \| 'right'` | `'left'` | 复选框的位置 | 2.28.3 |
|
||||
| children-field | `string` | `'children'` | 替代 `TreeOption` 中的 children 字段名 | |
|
||||
| checked-keys | `Array<string \| number>` | `undefined` | 如果设定则 `checked` 状态受控 | |
|
||||
| check-on-click | `boolean \| ((node: TreeOption) => boolean)` | `false` | 是否允许点击节点进行勾选,仅在 `checkable` 为 `true` 时生效 | NEXT_VERSION |
|
||||
| check-on-click | `boolean \| ((node: TreeOption) => boolean)` | `false` | 是否允许点击节点进行勾选,仅在 `checkable` 为 `true` 时生效 | 2.31.0 |
|
||||
| data | `Array<TreeOption>` | `[]` | 树的节点数据。重新设置 `data` 会将一些非受控状态清空,如果你需要在使用中改动 `data`,最好以受控的方式控制树 | |
|
||||
| default-checked-keys | `Array<string \| number>` | `[]` | 默认选中的多选项 | |
|
||||
| default-expand-all | `boolean` | `false` | 展开全部选项 | |
|
||||
|
@ -1 +1 @@
|
||||
export default '2.30.8'
|
||||
export default '2.31.0'
|
||||
|
Loading…
x
Reference in New Issue
Block a user