ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.12k stars 14.64k forks source link

Some properties of El input in [bug report] render function are invalid #20643

Open user-yun opened 3 years ago

user-yun commented 3 years ago

Element UI version

2.14.1

OS/Browsers version

谷歌版本 72.0.3626.119(正式版本) (64 位)

Vue version

2.6.11

Reproduction Link

https://elementui.github.io/issue-generator/#/zh-CN/暂无

Steps to reproduce

render (h) { return h('el-form-item', { props: { label: this.label, prop: this.prop }, style: {}, on: {} }, [h('el-input', { attr: {}, props: { type: this.type, value: this.value, clearable: this.clearable, size: this.size, placeholder: this.placeholder, }, domProps: {}, style: {}, 'class': { }, on: { input: (v) => { console.log(v) this.$emit('upvalue', v) } } }, [] )] ) }

What is Expected?

placeholder 有值

What is actually happening?

placeholder 不显示

element-bot commented 3 years ago

Translation of this issue:

Element UI version

2.14.1

OS/Browsers version

Google version 72.0.3626.119 (official version) (64 bit)

Vue version

2.6.11

Reproduction Link

https://elementui.github.io/issue-generator/#/zh -Cn / not yet available

Steps to reproduce

render (h) { return h('el-form-item', {

props: { label: this.label ,

prop: this.prop }

style: {}, on: {}

} [h('el-input', {

attr: {}, props: {

type: this.type , value: this.value ,

clearable: this.clearable , size: this.size ,

placeholder: this.placeholder , }

domProps: {}, style: {},

'class': { }

on: { input: (v) => {

console.log (V) this.$emit('upvalue', v)

} }

} []

] )

}

What is Expected?

Placeholder has value

What is actually happening?

Placeholder is not displayed

duy-nv commented 2 years ago

Change to attrs: { placeholder: 'your_placeholder' }