mirror of https://github.com/ElemeFE/element
Docs: warn input as a controlled component. (#14463)
Explicitly states that input events should be handled, and v-model modifiers are not supported.pull/14481/head
parent
57f3960927
commit
79e14780ce
|
@ -148,6 +148,15 @@
|
||||||
|
|
||||||
Input data using mouse or keyboard.
|
Input data using mouse or keyboard.
|
||||||
|
|
||||||
|
:::warning
|
||||||
|
Input is a controlled component, it **always shows Vue binding value**.
|
||||||
|
|
||||||
|
Under normal circumstances, `input` event should be handled. Its handler should update component's binding value (or use `v-model`). Otherwise, input box's value will not change.
|
||||||
|
|
||||||
|
Do not support `v-model` modifiers.
|
||||||
|
:::
|
||||||
|
|
||||||
|
|
||||||
### Basic usage
|
### Basic usage
|
||||||
|
|
||||||
:::demo
|
:::demo
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
querySearchAsync(queryString, cb) {
|
querySearchAsync(queryString, cb) {
|
||||||
var links = this.links;
|
var links = this.links;
|
||||||
var results = queryString ? links.filter(this.createStateFilter(queryString)) : links;
|
var results = queryString ? links.filter(this.createStateFilter(queryString)) : links;
|
||||||
|
|
||||||
clearTimeout(this.timeout);
|
clearTimeout(this.timeout);
|
||||||
this.timeout = setTimeout(() => {
|
this.timeout = setTimeout(() => {
|
||||||
cb(results);
|
cb(results);
|
||||||
|
@ -114,11 +114,11 @@
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #8492a6;
|
color: #8492a6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-col:not(:last-child) {
|
.el-col:not(:last-child) {
|
||||||
border-right: 1px solid rgba(224,230,237,0.50);
|
border-right: 1px solid rgba(224,230,237,0.50);
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-autocomplete {
|
.el-autocomplete {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
@ -148,6 +148,14 @@
|
||||||
|
|
||||||
Ingresa datos usando el ratón o teclado.
|
Ingresa datos usando el ratón o teclado.
|
||||||
|
|
||||||
|
:::warning
|
||||||
|
Input is a controlled component, it **always shows Vue binding value**.
|
||||||
|
|
||||||
|
Under normal circumstances, `input` event should be handled. Its handler should update component's binding value (or use `v-model`). Otherwise, input box's value will not change.
|
||||||
|
|
||||||
|
Do not support `v-model` modifiers.
|
||||||
|
:::
|
||||||
|
|
||||||
### Uso básico
|
### Uso básico
|
||||||
|
|
||||||
:::demo
|
:::demo
|
||||||
|
|
|
@ -148,6 +148,14 @@
|
||||||
|
|
||||||
Le champs d'input de base.
|
Le champs d'input de base.
|
||||||
|
|
||||||
|
:::warning
|
||||||
|
Input is a controlled component, it **always shows Vue binding value**.
|
||||||
|
|
||||||
|
Under normal circumstances, `input` event should be handled. Its handler should update component's binding value (or use `v-model`). Otherwise, input box's value will not change.
|
||||||
|
|
||||||
|
Do not support `v-model` modifiers.
|
||||||
|
:::
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
:::demo
|
:::demo
|
||||||
|
|
|
@ -185,6 +185,14 @@
|
||||||
|
|
||||||
通过鼠标或键盘输入字符
|
通过鼠标或键盘输入字符
|
||||||
|
|
||||||
|
:::warning
|
||||||
|
Input 为受控组件,它**总会显示 Vue 绑定值**。
|
||||||
|
|
||||||
|
通常情况下,应当处理 `input` 事件,并更新组件的绑定值(或使用`v-model`)。否则,输入框内显示的值将不会改变。
|
||||||
|
|
||||||
|
不支持 `v-model` 修饰符。
|
||||||
|
:::
|
||||||
|
|
||||||
### 基础用法
|
### 基础用法
|
||||||
|
|
||||||
:::demo
|
:::demo
|
||||||
|
|
Loading…
Reference in New Issue