Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
banma_credit
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hik_rn
project
banma_credit
Commits
cf536ee1
Commit
cf536ee1
authored
Sep 11, 2020
by
CaryaLiu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改AlertManager的模块名
parent
510e8b2e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
App.js
+2
-3
CustomerView.js
+1
-1
ios
+1
-1
No files found.
App.js
View file @
cf536ee1
...
...
@@ -36,7 +36,6 @@ import {
}
from
'react-native/Libraries/NewAppScreen'
;
var
ToastManager
=
NativeModules
.
ToastManager
;
var
AlertManager
=
NativeModules
.
AlertManager
;
async
function
showConfirmVsCancelPromiseDialog
(
msg
,
leftTip
,
rightTip
)
{
try
{
...
...
@@ -136,9 +135,9 @@ const App = () => {
}
else
{
// Alert.alert("ios undefine");
// NativeModules.ToastManager
var
alerts
=
"alert..."
+
NativeModules
.
AlertManager
.
alertStyleLight
;
var
alerts
=
"alert..."
+
NativeModules
.
HIK
AlertManager
.
alertStyleLight
;
console
.
log
(
alerts
)
AlertManager
.
showAlert
(
"tesss"
)
NativeModules
.
HIK
AlertManager
.
showAlert
(
"tesss"
)
}
}}
title
=
"吐司"
...
...
CustomerView.js
View file @
cf536ee1
...
...
@@ -98,7 +98,7 @@ export default class CustomerView extends React.Component {
});
});
}
else
{
const
alertEmitter
=
new
NativeEventEmitter
(
NativeModules
.
AlertManager
)
const
alertEmitter
=
new
NativeEventEmitter
(
NativeModules
.
HIK
AlertManager
)
this
.
subscription
=
alertEmitter
.
addListener
(
'AlertEvent'
,
(
a
)
=>
{
console
.
log
(
"你收到事件:"
+
a
.
btnTitle
);
});
...
...
ios
@
555c094e
Subproject commit
6cab4d4445022494b380f0f3bb6e29356b508d94
Subproject commit
555c094efd7b2c904b5b5cc84c5d9fb7e32ce086
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment