vue-sequential-entrance
vue-sequential-entrance copied to clipboard
Class support on render
I lack the ability to get a set of classes on the container. Here it is.
I tried the #2 option, but it didn't seem work.
One sugestion for implement. I changed the code in localhost for test, and it's ok:
SequentialEntrance.js export default { functional: true, render(createElement, { props, data, children }) { let delay = props.delay || 250; let tag = props.tag || "span"; let contentClass = props.contentClass || ""; let animation = props.animation || "entranceFromRight";
if(props.fromTop != undefined) animation = 'entranceFromTop'
if(props.fromRight != undefined) animation = 'entranceFromRight'
if(props.fromBottom != undefined) animation = 'entranceFromBottom'
if(props.fromLeft != undefined) animation = 'entranceFromLeft'
if (children) {
children.forEach((child, index) => {
child.data.staticStyle = {
opacity: 0,
animationFillMode: "forwards",
animationDelay: index * delay + "ms"
};
child.data.staticClass += " " + animation;
});
}
return createElement(tag, {
attrs: {
class: contentClass
}
}, children);
} };
@deivthings any chances of this getting merged?