mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-06 12:17:13 +08:00
commit
eb727b1cbb
@ -1,6 +1,6 @@
|
||||
# CHANGELOG
|
||||
|
||||
## Pending
|
||||
## 2.12.1
|
||||
|
||||
### Feats
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
- `n-input` add `show-password-toggle` prop.
|
||||
- `n-popselect` support class attr.
|
||||
- `n-select` add `render-label` prop.
|
||||
- `n-popselect` add `render-label` prop.
|
||||
|
||||
### Fixes
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# CHANGELOG
|
||||
|
||||
## Pending
|
||||
## 2.12.1
|
||||
|
||||
### Feats
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
- `n-input` 新增 `show-password-toggle` 属性
|
||||
- `n-popselect` 支持 class 属性
|
||||
- `n-select` 新增 `render-label` 属性
|
||||
- `n-popselect` 新增 `render-label` 属性
|
||||
|
||||
### Fixes
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "naive-ui",
|
||||
"version": "2.12.0",
|
||||
"version": "2.12.1",
|
||||
"description": "A Vue 3 Component Library. Fairly Complete, Customizable Themes, Uses TypeScript, Not Too Slow",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -17,6 +17,7 @@ multiple
|
||||
| --- | --- | --- | --- |
|
||||
| multiple | `boolean` | `false` | |
|
||||
| options | `Array<SelectOption \| SelectGroupOption>` | `[]` | |
|
||||
| render-label | `(option: SelectOption \| SelectGroupOption) => VNodeChild` | `undefined` | Render function of all the options. |
|
||||
| scrollable | `boolean` | `false` | |
|
||||
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | |
|
||||
| value | `string \| number \| Array<string \| number> \| null` | `null` | |
|
||||
|
@ -18,6 +18,7 @@ multiple
|
||||
| multiple | `boolean` | `false` | |
|
||||
| options | `Array<SelectOption \| SelectGroupOption>` | `[]` | |
|
||||
| scrollable | `boolean` | `false` | |
|
||||
| render-label | `(option: SelectOption \| SelectGroupOption) => VNodeChild` | `undefined` | 控制全部选项的渲染 |
|
||||
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | |
|
||||
| value | `string \| number \| Array<string \| number> \| null` | `null` | |
|
||||
| on-update:value | `(string \| number \| Array<string \| number> \| null) => void` | `undefined` | |
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { h, ref, provide, defineComponent, PropType, mergeProps } from 'vue'
|
||||
import { NPopover } from '../../popover'
|
||||
import { popoverBaseProps } from '../../popover/src/Popover'
|
||||
import type { PopoverInternalProps } from '../../popover/src/Popover'
|
||||
import { NPopover } from '../../popover'
|
||||
import type { PopoverInst, PopoverTrigger } from '../../popover'
|
||||
import NPopselectPanel, { panelPropKeys, panelProps } from './PopselectPanel'
|
||||
import { omit, keep } from '../../_utils'
|
||||
|
@ -9,11 +9,8 @@ import {
|
||||
nextTick
|
||||
} from 'vue'
|
||||
import { createTreeMate } from 'treemate'
|
||||
import { NInternalSelectMenu } from '../../_internal'
|
||||
import { call, keysOf, warn } from '../../_utils'
|
||||
import type { MaybeArray } from '../../_utils'
|
||||
import type { PopselectSize } from './interface'
|
||||
import { popselectInjectionKey } from './interface'
|
||||
import { RenderLabel } from '../../_internal/select-menu/src/interface'
|
||||
import { tmOptions } from '../../select/src/utils'
|
||||
import {
|
||||
OnUpdateValue,
|
||||
OnUpdateValueImpl,
|
||||
@ -24,8 +21,12 @@ import {
|
||||
SelectIgnoredOption,
|
||||
ValueAtom
|
||||
} from '../../select/src/interface'
|
||||
import { tmOptions } from '../../select/src/utils'
|
||||
import { useConfig } from '../../_mixins'
|
||||
import { NInternalSelectMenu } from '../../_internal'
|
||||
import { call, keysOf, warn } from '../../_utils'
|
||||
import type { MaybeArray } from '../../_utils'
|
||||
import type { PopselectSize } from './interface'
|
||||
import { popselectInjectionKey } from './interface'
|
||||
|
||||
export const panelProps = {
|
||||
multiple: Boolean,
|
||||
@ -48,6 +49,7 @@ export const panelProps = {
|
||||
onUpdateValue: [Function, Array] as PropType<MaybeArray<OnUpdateValue>>,
|
||||
onMouseenter: Function as PropType<(e: MouseEvent) => void>,
|
||||
onMouseleave: Function as PropType<(e: MouseEvent) => void>,
|
||||
renderLabel: Function as PropType<RenderLabel>,
|
||||
// deprecated
|
||||
onChange: {
|
||||
type: [Function, Array] as PropType<MaybeArray<OnUpdateValue> | undefined>,
|
||||
@ -146,6 +148,7 @@ export default defineComponent({
|
||||
width={this.width}
|
||||
virtualScroll={false}
|
||||
scrollable={this.scrollable}
|
||||
renderLabel={this.renderLabel}
|
||||
onMenuToggleOption={this.handleMenuToggleOption}
|
||||
onMouseenter={this.onMouseenter}
|
||||
onMouseleave={this.onMouseenter}
|
||||
|
@ -41,6 +41,7 @@ max-tag-count
|
||||
| options | `Array<SelectOption \| SelectGroupOption>` | `[]` | |
|
||||
| placeholder | `string` | `'Please Select'` | |
|
||||
| remote | `boolean` | `false` | If you want to async get options. Note that if remote is set, `filter` & `tag` won't work on `options`. At that time, you are taking all control of `options`. |
|
||||
| render-label | `(option: SelectOption \| SelectGroupOption) => VNodeChild` | `undefined` | Render function of all the options. |
|
||||
| show | `boolean` | `undefined` | Whether to show menu. |
|
||||
| show-arrow | `boolean` | `true` | Whether to show arrow. |
|
||||
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | |
|
||||
|
@ -1 +1 @@
|
||||
export default '2.12.0'
|
||||
export default '2.12.1'
|
||||
|
Loading…
Reference in New Issue
Block a user