Commit fccba63179e529c9e4b00a412a2fe409c8702f6c
1 parent
e92d2dd4
优化日期中文不完全问题;
Showing
1 changed file
with
7 additions
and
1 deletions
src/routes/indexPage.js
| ... | ... | @@ -11,6 +11,9 @@ import ProblemFeedback from './problemFeedback/problemFeedback'; |
| 11 | 11 | import TabCon from './tab/tab'; |
| 12 | 12 | import styles from './indexPage.less'; |
| 13 | 13 | |
| 14 | +import moment from 'moment'; | |
| 15 | +import 'moment/locale/zh-cn'; | |
| 16 | + | |
| 14 | 17 | const { Header, Content } = Layout; |
| 15 | 18 | |
| 16 | 19 | function IndexPage({ app }) { |
| ... | ... | @@ -31,7 +34,10 @@ function IndexPage({ app }) { |
| 31 | 34 | case 'sBig5': |
| 32 | 35 | return zhTW; |
| 33 | 36 | default: |
| 34 | - return zhCN; | |
| 37 | + { | |
| 38 | + moment.locale('zh-cn'); | |
| 39 | + return zhCN; | |
| 40 | + } | |
| 35 | 41 | } |
| 36 | 42 | }; |
| 37 | 43 | ... | ... |