|
@@ -10,6 +10,7 @@ import { BackButton } from '../components/Toolbar';
|
|
|
import app from '../../app.json';
|
|
import app from '../../app.json';
|
|
|
import { PageList, setPageList } from './Router';
|
|
import { PageList, setPageList } from './Router';
|
|
|
import ToolbarUgly from '../components/ToolbarUgly';
|
|
import ToolbarUgly from '../components/ToolbarUgly';
|
|
|
|
|
+import utils from '../utils/utils';
|
|
|
const Stack = createStackNavigator();
|
|
const Stack = createStackNavigator();
|
|
|
enableScreens();
|
|
enableScreens();
|
|
|
|
|
|
|
@@ -94,7 +95,9 @@ const RouterV2 = () => {
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
//注入全局方法
|
|
//注入全局方法
|
|
|
global.startPage = (name, params = {}) => {
|
|
global.startPage = (name, params = {}) => {
|
|
|
- navigation.current?.navigate(name, params);
|
|
|
|
|
|
|
+ if (utils.isNotEmpty(name)) {
|
|
|
|
|
+ navigation.current?.navigate(name, params);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
global.dispatchPage = (params) => {
|
|
global.dispatchPage = (params) => {
|
|
|
navigation.current?.dispatch(params);
|
|
navigation.current?.dispatch(params);
|