|
|
|
@ -1,7 +1,7 @@ |
|
|
|
import React from 'react'; |
|
|
|
import pathToRegexp from 'path-to-regexp'; |
|
|
|
import Link from 'umi/link'; |
|
|
|
import { FormattedMessage } from 'umi-plugin-react/locale'; |
|
|
|
import { formatMessage } from 'umi-plugin-react/locale'; |
|
|
|
import { urlToList } from '../_utils/pathTools'; |
|
|
|
|
|
|
|
// 渲染Breadcrumb 子节点
|
|
|
|
@ -17,7 +17,7 @@ const itemRender = (route, params, routes, paths) => { |
|
|
|
|
|
|
|
const renderItemLocal = item => { |
|
|
|
if (item.locale) { |
|
|
|
return <FormattedMessage id={item.locale} defaultMessage={item.name} />; |
|
|
|
return formatMessage({ id: item.locale, defaultMessage: item.name }); |
|
|
|
} |
|
|
|
return item.name; |
|
|
|
}; |
|
|
|
|