const _menus = [
    { index: "updatelog", label: "更新日志", icon: "el-icon-edit" },
    { index: "installation", label: "安装", icon: "el-icon-setting" },
    { index: "input", label: "输入框", icon: "icon-copy" },
    { index: "basic", label: "基础表单", icon: "icon-apply" },
    { index: "selector", label: "选择器", icon: "icon-department" },
    { index: "datetime", label: "日期时间", icon: "icon-time-circle" },
    { index: "dic", label: "字典", icon: "el-icon-notebook-1" },
    { index: "attachment", label: "附件", icon: "el-icon-paperclip" },
    { index: "cascade", label: "级联", icon: "icon-rule-engine" },
    { index: "dialog", label: "对话框", icon: "icon-instagram" },
    { index: "table", label: "表格", icon: "icon-instagram" },
    { index: "subtable", label: "子表", icon: "icon-calendar-check" },
    { index: "subdialog", label: "子表对话框", icon: "icon-apply" },
    { index: "tree", label: "Tree树形控件", icon: "el-icon-s-grid" },
    { index: "queryStrategy", label: "查询策略控件", icon: "el-icon-s-grid" },
    { index: "sidebarDialog", label: "侧边弹窗", icon: "el-icon-s-grid" },
    { index: "i18n", label: "国际化", icon: "el-icon-s-grid" },
    { index: "tabs", label: "tabs标签页", icon: "el-icon-s-grid" },
    { index: "validation", label: "校验规则", icon: "icon-f-right" },
    { index: "math", label: "数学计算", icon: "icon-f-plus" },
    { index: "linkage", label: "联动规则", icon: "icon-f-minus" },
    { index: "tools", label: "工具类方法", icon: "icon-set" }
];

const _componentMenus = [
];

export default {
    name: "menuData",
    getMenus(cb) {
        cb(_menus);
    },
    getMenuByIndex(index, cb) {
        cb(_menus.find(m => m.index == index));
    },
    getComponentMenus(cb) {
        cb([..._componentMenus, ..._menus]);
    }
}