Skip to content

Commit

Permalink
fix(Draggable): 修复 tag 变量识别为原生标签的问题 (#790)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocean-gao authored May 7, 2024
1 parent d3f4b30 commit 4fa2841
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/draggable/draggable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default defineComponent({
list: [...props.modelValue],
beforeDragend: props.beforeDragend,
}));
const Tag = computed(() => props.tag as keyof HTMLElementTagNameMap);
const {
onAnimationEnd,
onDragstart,
Expand Down Expand Up @@ -87,7 +88,7 @@ export default defineComponent({
});
};
return () => (
<tag
<Tag.value
ref={rootRef}
class={[
`${prefixCls}`,
Expand All @@ -102,7 +103,7 @@ export default defineComponent({
onTransitionend={onAnimationEnd}
>
{props.modelValue.map(renderItem)}
</tag>
</Tag.value>
);
},
});

0 comments on commit 4fa2841

Please sign in to comment.