mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
fix: 修复菜单本地图标显示问题
This commit is contained in:
@ -38,9 +38,9 @@ async function getMenuList() {
|
||||
getMenuList();
|
||||
|
||||
function renderPrefix({ option }: { option: TreeOption }) {
|
||||
const renderLocalIcon = String(option.icon).startsWith('icon-');
|
||||
const renderLocalIcon = String(option.icon).startsWith('local-icon-');
|
||||
const icon = renderLocalIcon ? undefined : String(option.icon);
|
||||
const localIcon = renderLocalIcon ? String(option.icon).replace('icon-', 'menu-') : undefined;
|
||||
const localIcon = renderLocalIcon ? String(option.icon).replace('local-icon-', 'menu-') : undefined;
|
||||
return <SvgIcon icon={icon} localIcon={localIcon} />;
|
||||
}
|
||||
</script>
|
||||
|
@ -61,9 +61,9 @@ watch([expandAll, options], ([newVal]) => {
|
||||
});
|
||||
|
||||
function renderPrefix({ option }: { option: TreeOption }) {
|
||||
const renderLocalIcon = String(option.icon).startsWith('icon-');
|
||||
const renderLocalIcon = String(option.icon).startsWith('local-icon-');
|
||||
let icon = renderLocalIcon ? undefined : String(option.icon ?? 'material-symbols:buttons-alt-outline-rounded');
|
||||
const localIcon = renderLocalIcon ? String(option.icon).replace('icon-', 'menu-') : undefined;
|
||||
const localIcon = renderLocalIcon ? String(option.icon).replace('local-icon-', 'menu-') : undefined;
|
||||
if (icon === '#') {
|
||||
icon = 'material-symbols:buttons-alt-outline-rounded';
|
||||
}
|
||||
|
Reference in New Issue
Block a user