bowen
2023-10-10 30b3ee5c89c31cb5794faab40e800c36507d258a
src/components/Tree/src/TreeIcon.ts
@@ -1,9 +1,9 @@
import type { VNode, FunctionalComponent } from 'vue';
import type { VNode } from 'vue';
import { h } from 'vue';
import { isString } from 'lodash-es';
import Icon from '@/components/Icon/Icon.vue';
export const TreeIcon: FunctionalComponent = ({ icon }: { icon: VNode | string }) => {
export const TreeIcon = ({ icon }: { icon: VNode | string }) => {
  if (!icon) return null;
  if (isString(icon)) {
    return h(Icon, { icon, class: 'mr-1' });