自动生成同时会有sql脚本,你执行下sql脚本,这样菜单的数据就有了,一一绑定关系对应好再刷新前端就能正确显示了
INSERT INTO `blade_menu`(`parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) VALUES (0, 'blog', '', 'menu', '/demo/blog', NULL, 1, 1, 0, 1, NULL, 0); set @parentid = (SELECT LAST_INSERT_ID()); INSERT INTO `blade_menu`(`parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) VALUES (@parentid, 'blog_add', '', 'add', '/demo/blog/add', 'plus', 1, 2, 1, 1, NULL, 0); INSERT INTO `blade_menu`(`parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) VALUES (@parentid, 'blog_edit', '', 'edit', '/demo/blog/edit', 'form', 2, 2, 1, 2, NULL, 0); INSERT INTO `blade_menu`(`parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) VALUES (@parentid, 'blog_delete', '', 'delete', '/api/blade-demo/blog/remove', 'delete', 3, 2, 1, 3, NULL, 0); INSERT INTO `blade_menu`(`parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) VALUES (@parentid, 'blog_view', '', 'view', '/demo/blog/view', 'file-text', 4, 2, 1, 2, NULL, 0);
扫一扫访问 Blade技术社区 移动端