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

cnjp1d6j  于 4个月前  发布在  其他
关注(0)|答案(2)|浏览(87)

Element UI version

2.14.1

OS/Browsers version

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

Vue version

2.6.11

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 不显示

ryhaxcpt

ryhaxcpt1#

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

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

hxzsmxv2

hxzsmxv22#

Change to
attrs: { placeholder: 'your_placeholder' }

相关问题