import { useState, useEffect } from 'react';

export type menutype = {
  name: string;
  id?: string;
};
export default function () {
  const [menuList, setMenuList] = useState<menutype[]>();
  //进入时赋值
  useEffect(() => {
    //debugger;
    setMenuList([
      { name: '环境信息', id: 'environment' },
      { name: '设备管理', id: 'equipment' },
      { name: '运行时间', id: 'runtime' },
    ]);
  }, []);

  return { menuList };
}
