Skip to content

Is there a problem with the ‘onAlign’ method in the vc-trigger/Popup.jsx component? #4064

@cmtter

Description

@cmtter

onAlign(popupDomNode, align) {
const props = this.$props;
const currentAlignClassName = props.getClassNameFromAlign(align);
// FIX: react-component/trigger#56
// FIX: react-component/tooltip#79
if (this.currentAlignClassName !== currentAlignClassName) {
this.currentAlignClassName = currentAlignClassName;
popupDomNode.className = this.getClassName(currentAlignClassName, popupDomNode.className);
}
const { onaAlign } = this.$attrs; // 这里的onaAlign 是不是应该写成 onAlign ?
onaAlign && onaAlign(popupDomNode, align);
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions