feat(region): add props

This commit is contained in:
woody 2025-07-28 17:50:58 +08:00
parent d79feb1634
commit a35ba61785
2 changed files with 13 additions and 0 deletions

View File

@ -32,6 +32,13 @@
</picker-view> </picker-view>
</div> </div>
<div class="popup-footer"> <div class="popup-footer">
<button
v-if="showCancelButton"
class="popup-btn popup-cancel"
@click="handleClose"
>
取消
</button>
<button class="popup-btn popup-confirm" @click="handleConfirm"> <button class="popup-btn popup-confirm" @click="handleConfirm">
确认 确认
</button> </button>
@ -50,6 +57,10 @@ export default {
type: Boolean, type: Boolean,
default: true, default: true,
}, },
showCancelButton: {
type: Boolean,
default: false,
},
}, },
data() { data() {
return { return {
@ -208,6 +219,7 @@ export default {
}, },
handleClose() { handleClose() {
this.popupVisible = false this.popupVisible = false
this.$emit('cancel')
}, },
async handleConfirm() { async handleConfirm() {
const [pIndex, cIndex, dIndex] = this.pickerValue const [pIndex, cIndex, dIndex] = this.pickerValue

View File

@ -101,6 +101,7 @@
@success="successHandle" @success="successHandle"
:autoTrigger="false" :autoTrigger="false"
ref="regionSelect" ref="regionSelect"
showCancelButton
/> />
</view> </view>
</template> </template>