From 3e8ae72bb18fc2cc7b5c8ea5c6f815cf1b6afd26 Mon Sep 17 00:00:00 2001 From: Chen Fengyuan Date: Sat, 14 Nov 2020 11:09:14 +0800 Subject: [PATCH] fix: inherit missing static attributes Fix #5 --- src/feather.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/feather.vue b/src/feather.vue index 85b33a8..adcb247 100644 --- a/src/feather.vue +++ b/src/feather.vue @@ -63,7 +63,7 @@ export default { }, }, - render(createElement, { listeners, props }) { + render(createElement, { data, props }) { const { animation, animationSpeed, @@ -77,20 +77,22 @@ export default { props.tag, { + ...data, + attrs: { + ...data.attrs, 'data-name': type, 'data-tags': icon ? icon.tags : '', 'data-type': type, }, class: { + ...data.class, feather: true, [`feather--${type}`]: type, [`feather--${animation}`]: animation, [`feather--${animationSpeed}`]: animationSpeed, }, - - on: listeners, }, [