Commit cf536ee1 by CaryaLiu

feat: 修改AlertManager的模块名

parent 510e8b2e
...@@ -36,7 +36,6 @@ import { ...@@ -36,7 +36,6 @@ import {
} from 'react-native/Libraries/NewAppScreen'; } from 'react-native/Libraries/NewAppScreen';
var ToastManager = NativeModules.ToastManager; var ToastManager = NativeModules.ToastManager;
var AlertManager = NativeModules.AlertManager;
async function showConfirmVsCancelPromiseDialog(msg, leftTip, rightTip) { async function showConfirmVsCancelPromiseDialog(msg, leftTip, rightTip) {
try { try {
...@@ -136,9 +135,9 @@ const App = () => { ...@@ -136,9 +135,9 @@ const App = () => {
} else { } else {
// Alert.alert("ios undefine"); // Alert.alert("ios undefine");
// NativeModules.ToastManager // NativeModules.ToastManager
var alerts = "alert..." + NativeModules.AlertManager.alertStyleLight; var alerts = "alert..." + NativeModules.HIKAlertManager.alertStyleLight;
console.log(alerts) console.log(alerts)
AlertManager.showAlert("tesss") NativeModules.HIKAlertManager.showAlert("tesss")
} }
}} }}
title="吐司" title="吐司"
......
...@@ -98,7 +98,7 @@ export default class CustomerView extends React.Component { ...@@ -98,7 +98,7 @@ export default class CustomerView extends React.Component {
}); });
}); });
} else { } else {
const alertEmitter = new NativeEventEmitter(NativeModules.AlertManager) const alertEmitter = new NativeEventEmitter(NativeModules.HIKAlertManager)
this.subscription = alertEmitter.addListener('AlertEvent', (a) => { this.subscription = alertEmitter.addListener('AlertEvent', (a) => {
console.log("你收到事件:" + a.btnTitle); console.log("你收到事件:" + a.btnTitle);
}); });
......
ios @ 555c094e
Subproject commit 6cab4d4445022494b380f0f3bb6e29356b508d94 Subproject commit 555c094efd7b2c904b5b5cc84c5d9fb7e32ce086
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