diff --git a/src/common/mixins/basic-picker.js b/src/common/mixins/basic-picker.js index acbd2e9a16d632f7f6bd5a725eb037449f9d0143..a750c08f194735b3459b3281355db9491cce2658 100644 --- a/src/common/mixins/basic-picker.js +++ b/src/common/mixins/basic-picker.js @@ -22,6 +22,10 @@ export default { default() { return {} } + }, + maskClosable: { + type: Boolean, + default: true } }, computed: { diff --git a/src/components/action-sheet/action-sheet.vue b/src/components/action-sheet/action-sheet.vue index cb622da20f0987ec1e126021c1a1694c569fc53b..b8c44782f852c02b8957796598892fc667aedb93 100644 --- a/src/components/action-sheet/action-sheet.vue +++ b/src/components/action-sheet/action-sheet.vue @@ -7,10 +7,10 @@ :mask="true" :z-index="zIndex" v-show="isVisible" - @touchmove.prevent="noop" - @mask-click="cancel"> + @touchmove.prevent + @mask-click="maskClick"> -
+

{{title}}

    @@ -64,10 +64,15 @@ pickerStyle: { type: Boolean, default: false + }, + maskClosable: { + type: Boolean, + default: true } }, methods: { - noop() { + maskClick() { + this.maskClosable && this.cancel() }, cancel() { this.hide() diff --git a/src/components/dialog/dialog.vue b/src/components/dialog/dialog.vue index 8c243cab0b2c8f6ed24093ed634b967c7c7668b6..54b15c322069242d7a64666bdd7417b882e724db 100644 --- a/src/components/dialog/dialog.vue +++ b/src/components/dialog/dialog.vue @@ -1,6 +1,13 @@