mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-03-01 13:36:55 +08:00
Merge branch 'develop' of ***REMOVED*** into develop
This commit is contained in:
commit
37f2d40cc8
@ -1,5 +1,9 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 1.4.1 (2020-06-23)
|
||||
### Features
|
||||
- Add `autofocus` for `n-select`.
|
||||
|
||||
## 1.4.0 (2020-06-19)
|
||||
### Breaking Changes
|
||||
- `n-menu` not support slot API anymore.
|
||||
|
@ -1,5 +1,9 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 1.4.1 (2020-06-23)
|
||||
### Features
|
||||
- 为 `n-select` 增加了 `autofocus` 属性.
|
||||
|
||||
## 1.4.0 (2020-06-19)
|
||||
### Breaking Changes
|
||||
- `n-menu` 不再支持 slot API
|
||||
|
@ -42,6 +42,7 @@ fallback-option
|
||||
|tag|`boolean`|`false`|Whether it can create new option, should be used with `filterable`.|
|
||||
|theme|`'light' \| 'dark' \| null`|`null`||
|
||||
|value|`Array<string \| number> \| string \| number`|`false`||
|
||||
|autofocus|`boolean`|`false`||
|
||||
|
||||
### SelectOption Properties
|
||||
|Name|Type|Description|
|
||||
|
@ -43,6 +43,7 @@ change-debug
|
||||
|tag|`boolean`|`false`|是否可以创建新的选项,需要和 `filterable` 一起使用|
|
||||
|theme|`'light' \| 'dark' \| null`|`null`||
|
||||
|value|`Array<string \| number> \| string \| number`|`false`||
|
||||
|autofocus|`boolean`|`false`||
|
||||
|
||||
### SelectOption Properties
|
||||
|名称|类型|说明|
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "naive-ui",
|
||||
"version": "1.4.0",
|
||||
"version": "1.4.1",
|
||||
"description": "A Vue UI Framework. Caring About Styles, Themed, Batteries Included, Not Rather Slow.",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -32,6 +32,7 @@
|
||||
:size="syntheticSize"
|
||||
:theme="syntheticTheme"
|
||||
:loading="loading"
|
||||
:autofocus="autofocus"
|
||||
@click="handleActivatorClick"
|
||||
@delete-last-option="handleDeleteLastOption"
|
||||
@delete-option="handleToggleOption"
|
||||
@ -232,6 +233,10 @@ export default {
|
||||
items: {
|
||||
type: Array,
|
||||
default: undefined
|
||||
},
|
||||
autofocus: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
@ -81,6 +81,7 @@
|
||||
tabindex="-1"
|
||||
:disabled="disabled"
|
||||
:value="pattern"
|
||||
:autofocus="autofocus"
|
||||
class="n-base-selection-input-tag__input"
|
||||
@blur="handlePatternInputBlur"
|
||||
@focus="handlePatternInputFocus"
|
||||
@ -123,9 +124,10 @@
|
||||
class="n-base-selection-label__input"
|
||||
:value="(patternInputFocused && active) ? pattern : label"
|
||||
:placeholder="selectedOption ? label : placeholder"
|
||||
:readonly="!disabled && filterable && active ? false : 'readonly'"
|
||||
:readonly="!disabled && filterable && (active || autofocus) ? false : 'readonly'"
|
||||
:disabled="disabled"
|
||||
tabindex="-1"
|
||||
:autofocus="autofocus"
|
||||
@focus="handlePatternInputFocus"
|
||||
@blur="handlePatternInputBlur"
|
||||
@input="handlePatternInputInput"
|
||||
@ -252,6 +254,10 @@ export default {
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
autofocus: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
Loading…
Reference in New Issue
Block a user