props
import ElementUI from 'element-ui'
Element.Input.props.clearable.default = true;
原生属性
- 通常情况下,以maxlength属性为例
import ElementUI from 'element-ui'
const render = ElementUI.Input.render;
ElementUI.Input.render = function () {
// 设置组件默认原生属性(attr)
this.$attrs.maxlength || (this.$attrs.maxlength = 2);
return render.apply(this, arguments)
}
标签:原生,render,ElementUI,maxlength,组件,Input,属性
From: https://www.cnblogs.com/landuo629/p/17039592.html