UNPKG
taro-s4s
Version:
latest (1.0.0-beta.1)
1.0.0
1.0.0-beta.1
Nerv-multi多端开发解决方案
github.com/NervJS/taro
NervJS/taro
taro-s4s
/
packages
/
taro-rn
/
src
/
component.js
16 lines
(13 loc)
•
312 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import
React
from
'react'
/** *
@description
组件的基类,注入 $router 等 */
class
Component
extends
React.Component
{
constructor
(
props, context
) {
super
(props, context)
if
(props.
navigation
) {
this
.
$router
= props.
navigation
.
state
.
params
|| {} } } }
export
default
Component