Commit eee76430 authored by 陈帅's avatar 陈帅

bugfix:fix #3904 change to formatMessage

parent 7679507b
import React from 'react'; import React from 'react';
import pathToRegexp from 'path-to-regexp'; import pathToRegexp from 'path-to-regexp';
import Link from 'umi/link'; import Link from 'umi/link';
import { FormattedMessage } from 'umi-plugin-react/locale'; import { formatMessage } from 'umi-plugin-react/locale';
import { urlToList } from '../_utils/pathTools'; import { urlToList } from '../_utils/pathTools';
// 渲染Breadcrumb 子节点 // 渲染Breadcrumb 子节点
...@@ -17,7 +17,7 @@ const itemRender = (route, params, routes, paths) => { ...@@ -17,7 +17,7 @@ const itemRender = (route, params, routes, paths) => {
const renderItemLocal = item => { const renderItemLocal = item => {
if (item.locale) { if (item.locale) {
return <FormattedMessage id={item.locale} defaultMessage={item.name} />; return formatMessage({ id: item.locale, defaultMessage: item.name });
} }
return item.name; return item.name;
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment