This commit is contained in:
07akioni 2022-04-20 02:14:49 +08:00
parent 5e9ca25683
commit 4b97c47d33
17 changed files with 71 additions and 96 deletions

View File

@ -1,6 +1,6 @@
# CHANGELOG
## NEXT_VERSION
## 2.28.1
### Fixes

View File

@ -1,6 +1,6 @@
# CHANGELOG
## NEXT_VERSION
## 2.28.1
### Fixes

View File

@ -45,7 +45,7 @@ PRs are welcomed for locales that are not supported yet!
The following list is sorted by 'Config'.
| Language | Config | Date config | Version |
| ------------------------- | ------ | ----------- | ------------ |
| ------------------------- | ------ | ----------- | ------- |
| German (Germany) | deDE | dateDeDe | |
| English (British) | enGB | dateEnGB | 2.25.1 |
| English | enUS | dateEnUS | |
@ -55,10 +55,10 @@ The following list is sorted by 'Config'.
| Bahasa Indonesia | idID | dateIdID | |
| Italiano | itIT | dateItIT | 2.24.2 |
| Japanese | jaJP | dateJaJP | |
| Korean | koKR | dateKoKR | NEXT_VERSION |
| Korean (South Korea) | koKR | dateKoKR | 2.28.1 |
| Norwegian Bokmål (Norway) | nbNO | dateNbNO | |
| Polish (Poland) | plPL | datePlPL | 2.25.2 |
| Portuguese (Brazil) | ptBR | datePtBR | NEXT_VERSION |
| Portuguese (Brazil) | ptBR | datePtBR | 2.28.1 |
| Russian | ruRU | dateRuRU | |
| Slovak | skSK | dateSkSK | 2.25.3 |
| Thai (Thailand) | thTH | dateThTH | 2.27.0 |

View File

@ -45,7 +45,7 @@ Naive-ui 通过使用 `n-config-provider` 调整语言,默认情况下所有
以下列表依据‘配置’排序。
| 语言 | 配置 | 日期配置 | 版本 |
| ----------------- | ---- | -------- | ------------ |
| ----------------- | ---- | -------- | ------ |
| 德语 | deDE | dateDeDe | |
| 英国英语 | enGB | dateEnGB | 2.25.1 |
| 英语 | enUS | dateEnUS | |
@ -55,10 +55,10 @@ Naive-ui 通过使用 `n-config-provider` 调整语言,默认情况下所有
| 印度尼西亚语 | idID | dateIdID | |
| 意大利语 | itIT | dateItIT | 2.24.2 |
| 日语 | jaJP | dateJaJP | |
| 韩语 | koKR | dateKoKR | NEXT_VERSION |
| 韩语 | koKR | dateKoKR | 2.28.1 |
| 书面挪威语 | nbNO | dateNbNO | |
| 波兰语(波兰) | plPL | datePlPL | 2.25.2 |
| 葡萄牙语 (巴西) | ptBR | datePtBR | NEXT_VERSION |
| 葡萄牙语 (巴西) | ptBR | datePtBR | 2.28.1 |
| 俄罗斯语 | ruRU | dateRuRU | |
| 斯洛伐克语 | skSK | dateSkSK | 2.25.3 |
| 泰语(泰国) | thTH | dateThTH | 2.27.0 |

View File

@ -1,6 +1,6 @@
{
"name": "naive-ui",
"version": "2.28.0",
"version": "2.28.1",
"description": "A Vue 3 Component Library. Fairly Complete, Theme Customizable, Uses TypeScript, Fast",
"main": "lib/index.js",
"module": "es/index.js",

View File

@ -1,6 +1,6 @@
import { h } from 'vue'
import { mount } from '@vue/test-utils'
import { NButton, NButtonGroup, NxButton } from '../index'
import { NButton, NxButton } from '../index'
import { CashOutline as CashIcon } from '@vicons/ionicons5'
import { NIcon } from '../../icon'
@ -310,31 +310,4 @@ describe('n-button', () => {
).toBe(true)
wrapper.unmount()
})
it('should work with `button group`', async () => {
const wrapper = mount(NButtonGroup, {
slots: {
default: () => [
h(NButton, null, {
default: () => 'test1'
}),
h(NButton, null, {
default: () => 'test2'
}),
h(NButton, null, {
default: () => 'test3'
})
]
}
})
expect(wrapper.find('[role="group"]').classes()).toContain('n-button-group')
expect(wrapper.findAll('button').length).toBe(3)
await wrapper.setProps({ vertical: true })
expect(wrapper.find('[role="group"]').classes()).toContain(
'n-button-group--vertical'
)
wrapper.unmount()
})
})

View File

@ -25,7 +25,7 @@ status.vue
| Name | Type | Default | Description | Version |
| --- | --- | --- | --- | --- |
| 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-row-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. | NEXT_VERSION |
| 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-row-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 |
| cascade | `boolean` | `true` | Whether to cascade the checkbox selection onto children. | |
| check-strategy | `string` | `'all'` | The way to show checked options. `all` means showing all checked node. `parent` means showing all checked parent node when all child node are checked (not working in single select mode). `child` means showing all child node. | |
| children-field | `string` | `'children'` | The children field in `CascaderOption`. | |

View File

@ -25,7 +25,7 @@ status.vue
| 名称 | 类型 | 默认值 | 说明 | 版本 |
| --- | --- | --- | --- | --- |
| allow-checking-not-loaded | `boolean` | `false` | 是否允许级联勾选还没有完全加载的节点。如果你要用这个属性,请记住 `checked-row-keys` 可能是不完整的,并且请注意勾选行为和后端计算逻辑的一致性,尤其是有禁用节点的情况下 | NEXT_VERSION |
| allow-checking-not-loaded | `boolean` | `false` | 是否允许级联勾选还没有完全加载的节点。如果你要用这个属性,请记住 `checked-row-keys` 可能是不完整的,并且请注意勾选行为和后端计算逻辑的一致性,尤其是有禁用节点的情况下 | 2.28.1 |
| cascade | `boolean` | `true` | 在多选时是否关联选项 | |
| check-strategy | `string` | `'all'` | 设置勾选策略来指定显示的勾选节点,`all` 表示显示全部选中节点;`parent` 表示只显示父节点(当父节点下所有子节点都选中时,对于单选无效);`child` 表示只显示子节点 | |
| children-field | `string` | `'children'` | 替代 `CascaderOption` 中的 children 字段名 | |

View File

@ -2,7 +2,8 @@ import { h, HTMLAttributes, nextTick, ref } from 'vue'
import { mount } from '@vue/test-utils'
import { DataTableInst, NDataTable } from '../index'
import type { DataTableColumns } from '../index'
import { NButton, NButtonGroup } from '../../button'
import { NButton } from '../../button'
import { NButtonGroup } from '../../button-group'
describe('n-data-table', () => {
it('should work with import on demand', () => {

View File

@ -53,9 +53,9 @@ custom-icon.vue
### InputNumber Slots
| Name | Parameters | Description | Version |
| ---------- | ---------- | ------------------------- | ------------ |
| add-icon | `()` | icon of the add button. | NEXT_VERSION |
| minus-icon | `()` | icon of the minus button. | NEXT_VERSION |
| ---------- | ---------- | ------------------------- | ------- |
| add-icon | `()` | icon of the add button. | 2.28.1 |
| minus-icon | `()` | icon of the minus button. | 2.28.1 |
| prefix | `()` | Prefix content slot. | |
| suffix | `()` | Suffix content slot. | |

View File

@ -55,9 +55,9 @@ rtl-debug.vue
### InputNumber Slots
| 名称 | 参数 | 说明 | 版本 |
| ---------- | ---- | ------------------ | ------------ |
| add-icon | `()` | 增加按钮的图标 | NEXT_VERSION |
| minus-icon | `()` | 减少按钮的图标 | NEXT_VERSION |
| ---------- | ---- | ------------------ | ------ |
| add-icon | `()` | 增加按钮的图标 | 2.28.1 |
| minus-icon | `()` | 减少按钮的图标 | 2.28.1 |
| prefix | `()` | 输入框头部内容插槽 | |
| suffix | `()` | 输入框尾部内容插槽 | |

View File

@ -23,7 +23,7 @@ debug.vue
| Name | Type | Default | Description | Version |
| --- | --- | --- | --- | --- |
| 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-row-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. | NEXT_VERSION |
| 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-row-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 |
| cascade | `boolean` | `false` | Whether to link the selection of parent and child nodes. | |
| checkable | `boolean` | `false` | Whether to use a checkbox to select values. | |
| check-strategy | `string` | `'all'` | How to display selected nodes when parents and children are selected. | |

View File

@ -25,7 +25,7 @@ field-search-debug.vue
| 名称 | 类型 | 默认值 | 说明 | 版本 |
| --- | --- | --- | --- | --- |
| allow-checking-not-loaded | `boolean` | `false` | 是否允许级联勾选还没有完全加载的节点。如果你要用这个属性,请记住 `checked-row-keys` 可能是不完整的,并且请注意勾选行为和后端计算逻辑的一致性,尤其是有禁用节点的情况下 | NEXT_VERSION |
| allow-checking-not-loaded | `boolean` | `false` | 是否允许级联勾选还没有完全加载的节点。如果你要用这个属性,请记住 `checked-row-keys` 可能是不完整的,并且请注意勾选行为和后端计算逻辑的一致性,尤其是有禁用节点的情况下 | 2.28.1 |
| cascade | `boolean` | `false` | 使用 checkbox 进行多选时是否级联 | |
| checkable | `boolean` | `false` | 是否使用 checkbox 进行选择 | |
| check-strategy | `string` | `'all'` | 设置勾选策略来指定显示的勾选节点,`all` 表示显示全部选中节点;`parent` 表示只显示父节点(当父节点下所有子节点都选中时);`child` 表示只显示子节点 | |

View File

@ -28,7 +28,7 @@ node-props.vue
| Name | Type | default | Description | Version |
| --- | --- | --- | --- | --- |
| 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-row-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. | NEXT_VERSION |
| 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-row-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. | |
| block-node | `boolean` | `false` | The node name is spread out in the whole row. | |
@ -47,7 +47,7 @@ node-props.vue
| expand-on-dragenter | `boolean` | `true` | Whether to expand nodes after dragenter. | |
| expanded-keys | `Array<string \| number>` | `undefined` | If set, expanded status will work in controlled manner. | |
| filter | `(pattern: string, node: TreeOption) => boolean` | A simple string based filter. | The function that filter tree nodes based on pattern. | |
| show-irrelevant-nodes | `boolean` | `true` | Whether to filter unmached nodes when tree is in filter mode. | NEXT_VERSION |
| show-irrelevant-nodes | `boolean` | `true` | Whether to filter unmached nodes when tree is in filter mode. | 2.28.1 |
| indeterminate-keys | `Array<string \| number>` | `undefined` | Indeterminate keys of the tree. | |
| key-field | `string` | `'key'` | The key field in `TreeOption`. | |
| label-field | `string` | `'label'` | The label field in `TreeOption`. | |

View File

@ -31,7 +31,7 @@ scrollbar-debug.vue
| 名称 | 类型 | 默认值 | 说明 | 版本 |
| --- | --- | --- | --- | --- |
| allow-checking-not-loaded | `boolean` | `false` | 是否允许级联勾选还没有完全加载的节点。如果你要用这个属性,请记住 `checked-row-keys` 可能是不完整的,并且请注意勾选行为和后端计算逻辑的一致性,尤其是有禁用节点的情况下 | NEXT_VERSION |
| allow-checking-not-loaded | `boolean` | `false` | 是否允许级联勾选还没有完全加载的节点。如果你要用这个属性,请记住 `checked-row-keys` 可能是不完整的,并且请注意勾选行为和后端计算逻辑的一致性,尤其是有禁用节点的情况下 | 2.28.1 |
| allow-drop | `(info: { dropPosition: DropPosition, node: TreeOption, phase: 'drag' \| 'drop' }) => boolean` | 一个不允许 drop 在叶节点内部的函数 | 是否允许 drop | |
| block-line | `boolean` | `false` | 节点整行撑开 | |
| block-node | `boolean` | `false` | 节点名称整行撑开 | |
@ -64,7 +64,7 @@ scrollbar-debug.vue
| render-switcher-icon | `() => VNodeChild` | `undefined` | 节点展开开关的渲染函数 | 2.24.0 |
| selectable | `boolean` | `true` | 节点是否可以被选中 | |
| selected-keys | `Array<string \| number>` | `undefined` | 如果设定则 `selected` 状态受控 | |
| show-irrelevant-nodes | `boolean` | `true` | 是否在搜索状态显示和搜索无关的节点 | NEXT_VERSION |
| show-irrelevant-nodes | `boolean` | `true` | 是否在搜索状态显示和搜索无关的节点 | 2.28.1 |
| virtual-scroll | `boolean` | `false` | 是否启用虚拟滚动,启用前你需要设定好树的高度样式 | |
| watch-props | `Array<'defaultCheckedKeys' \| 'defaultSelectedKeys' \|'defaultExpandedKeys'>` | `undefined` | 需要检测变更的默认属性,检测后组件状态会更新。注意:`watch-props` 本身不是响应式的 | |
| on-dragend | `(data: { node: TreeOption, event: DragEvent }) => void` | `undefined` | 节点完成拖拽动作后的回调函数 | |

View File

@ -6,7 +6,8 @@ import {
NUploadTrigger
} from '../index'
import { sleep } from 'seemly'
import { NButtonGroup, NButton } from '../../button'
import { NButton } from '../../button'
import { NButtonGroup } from '../../button-group'
import { h } from 'vue'
import { NCard } from '../../card'
import { NImageGroup } from '../../image'

View File

@ -1 +1 @@
export default '2.28.0'
export default '2.28.1'