@@ -5,12 +5,12 @@ import StyleContext from 'isomorphic-style-loader/StyleContext'
5
5
import { Provider } from 'react-redux'
6
6
import getStore from '@/store/reducers'
7
7
import App from './router'
8
- import routeList from './route-config'
8
+ import routeList , { IRoute } from './route-config'
9
9
import matchRoute from '../../common/match-route'
10
10
import proConfig from '../../../config/pro-config'
11
11
import { Store } from 'redux'
12
12
13
- function renderDom ( routeList : any [ ] , initStoreState ?: Store ) {
13
+ function renderDom ( routeList : IRoute [ ] , initStoreState ?: Store ) {
14
14
const insertCss = ( ...styles : any [ ] ) => {
15
15
const removeCss = styles . map ( style => style . _insertCss ( ) ) // 客户端执行,插入style
16
16
return ( ) => removeCss . forEach ( dispose => dispose ( ) ) // 组件卸载时 移除当前的 style 标签
@@ -32,9 +32,9 @@ function renderDom(routeList: any[], initStoreState?: Store) {
32
32
)
33
33
}
34
34
35
- function clientRender ( routeList : any ) {
35
+ function clientRender ( routeList : IRoute [ ] ) {
36
36
let initialData : any = null
37
- let initStoreState : any = null
37
+ let initStoreState :Store | undefined
38
38
const textDom = document . getElementById ( 'ssrTextInitData' ) as HTMLTextAreaElement | null
39
39
const storeDom = document . getElementById (
40
40
'ssrTextInitStoreData'
0 commit comments