vue-antd-ui
Version:
An enterprise-class UI design language and Vue-based implementation
23 lines (21 loc) • 595 B
JavaScript
function enhancer(Component) {
return {
mixins: [Component],
updated: function updated() {
var _this = this;
this.$nextTick(function () {
if (!_this.$refs.svgPathRef) {
return;
}
var pathStyle = _this.$refs.svgPathRef.style;
pathStyle.transitionDuration = '.3s, .3s, .3s, .06s';
var now = Date.now();
if (_this.prevTimeStamp && now - _this.prevTimeStamp < 100) {
pathStyle.transitionDuration = '0s, 0s';
}
_this.prevTimeStamp = Date.now();
});
}
};
}
export default enhancer;