element [Bug Report] use a data or computed property based on the prop's value. placement 是prop vue不让直接在子组件里面直接修改placement

oprakyz7  于 2022-11-02  发布在  其他
关注(0)|答案(1)|浏览(219)

Element UI version

2.15.9

OS/Browsers version

chrome

Vue version

2.6.10

https://github.com/

Steps to reproduce

const NewPopper = {
props: {
appendToBody: Popper.props.appendToBody,
offset: Popper.props.offset,
boundariesPadding: Popper.props.boundariesPadding,
arrowOffset: Popper.props.arrowOffset,
placement: Popper.props.placement,
transformOrigin: Popper.props.transformOrigin
},
methods: Popper.methods,
data() {
return merge({ visibleArrow: true }, Popper.data);
},
beforeDestroy: Popper.beforeDestroy
};

created() {
// vue-popper
this.popperOptions = {
boundariesPadding: 0,
gpuAcceleration: false
};
this.placement = PLACEMENT_MAP[this.align] || PLACEMENT_MAP.left;

this.$on('fieldReset', this.handleFieldReset);

},

this.placement 是prop,vue报错警告

What is Expected?

修复报错

What is actually happening?

???

iszxjhcz

iszxjhcz1#

也遇到了,只能回退版本,或无视

相关问题