干燥机配套车间生产管理系统/云平台服务端
baoshiwei
2023-12-11 1b20ab505d771e8d2168ddb8154da5d6aa85919a
1
2
3
4
5
6
7
8
9
10
11
12
13
import type { VNode, FunctionalComponent } from 'vue';
 
import { h } from 'vue';
import { isString } from '@vue/shared';
import { Icon } from '/@/components/Icon';
 
export const TreeIcon: FunctionalComponent = ({ icon }: { icon: VNode | string }) => {
  if (!icon) return null;
  if (isString(icon)) {
    return h(Icon, { icon, class: 'mr-1' });
  }
  return Icon;
};