Commit c5b280c8 authored by AU-PRO's avatar AU-PRO

add new code

parent d8e6cfc3
...@@ -31,7 +31,8 @@ class PopInput extends Component { ...@@ -31,7 +31,8 @@ class PopInput extends Component {
Toast('请输入正确的手机号') Toast('请输入正确的手机号')
return return
} }
this.props.ctx.parentConsoleFunction(this.state.phone) console.log(this.props.data.aa)
this.props.data.parentConsoleFunction(this.state.phone)
this.props.onClose() this.props.onClose()
} }
......
...@@ -18,26 +18,18 @@ class PageHome extends Component { ...@@ -18,26 +18,18 @@ class PageHome extends Component {
} }
openDefault = () => { openDefault = () => {
// AUPOP 1.0
// this.props.showPop({
// type: 'PopDefault',
// data:
// fn: () => {
// console.log('simple callback, param "fn" ')
// },
// ctx: this
// })
// AUPOP 2.0 // AUPOP 2.0
Aup.show('PopDefault') Aup.show('PopDefault')
} }
openRule = () => { openRule = () => {
// AUPOP 2.0
Aup.show('PopRule', {ruler: 'something'})
} }
openInput = () => { openInput = () => {
// AUPOP 2.0
Aup.show('PopInput', { aa: '123', parentConsoleFunction: () => {this.parentConsoleFunction()} })
} }
parentConsoleFunction = (data) => { parentConsoleFunction = (data) => {
......
...@@ -22,7 +22,7 @@ class AUPopMobx extends Component { ...@@ -22,7 +22,7 @@ class AUPopMobx extends Component {
console.log(`%c AUPopMobx nextProprs is: \n`, ConsoleStyleComponents, nextProprs) console.log(`%c AUPopMobx nextProprs is: \n`, ConsoleStyleComponents, nextProprs)
if (nextProprs.popArr.length === 0) { if (nextProprs.popArr.length === 0) {
allowScroll() allowScroll()
} else if (nextProprs.popArr.length && preState.length == 0) { } else if (nextProprs.popArr.length && preState.popArr.length == 0) {
disableScroll() disableScroll()
} }
return { return {
......
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