|
|
|
@ -1,7 +1,7 @@ |
|
|
|
import { VantComponent } from '../common/component'; |
|
|
|
import { button } from '../mixins/button'; |
|
|
|
import { openType } from '../mixins/open-type'; |
|
|
|
import { GRAY, BLUE } from '../common/color'; |
|
|
|
import { openType} from '../mixins/open-type'; |
|
|
|
import {GRAY,BLUE } from '../common/color'; |
|
|
|
VantComponent({ |
|
|
|
mixins: [button, openType], |
|
|
|
props: { |
|
|
|
@ -62,10 +62,7 @@ VantComponent({ |
|
|
|
} |
|
|
|
}, |
|
|
|
data: { |
|
|
|
loading: { |
|
|
|
confirm: false, |
|
|
|
cancel: false |
|
|
|
} |
|
|
|
loading: { confirm: false, cancel: false } |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
onConfirm() { |
|
|
|
@ -79,26 +76,17 @@ VantComponent({ |
|
|
|
}, |
|
|
|
handleAction(action) { |
|
|
|
if (this.data.asyncClose) { |
|
|
|
this.setData({ |
|
|
|
[`loading.${action}`]: true |
|
|
|
}); |
|
|
|
this.setData({ [`loading.${action}`]: true }); |
|
|
|
} |
|
|
|
if(!this.data.logined){ |
|
|
|
if (!this.data.logined) { |
|
|
|
this.onClose(action) |
|
|
|
} |
|
|
|
}, |
|
|
|
close() { |
|
|
|
this.setData({ |
|
|
|
show: false |
|
|
|
}); |
|
|
|
this.setData({ show: false }); |
|
|
|
}, |
|
|
|
stopLoading() { |
|
|
|
this.setData({ |
|
|
|
loading: { |
|
|
|
confirm: false, |
|
|
|
cancel: false |
|
|
|
} |
|
|
|
}); |
|
|
|
this.setData({ loading: { confirm: false, cancel: false } }); |
|
|
|
}, |
|
|
|
onClose(action) { |
|
|
|
if (!this.data.asyncClose) { |
|
|
|
@ -113,4 +101,4 @@ VantComponent({ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |