feat(region): add props
This commit is contained in:
parent
d79feb1634
commit
a35ba61785
|
@ -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
|
||||||
|
|
|
@ -101,6 +101,7 @@
|
||||||
@success="successHandle"
|
@success="successHandle"
|
||||||
:autoTrigger="false"
|
:autoTrigger="false"
|
||||||
ref="regionSelect"
|
ref="regionSelect"
|
||||||
|
showCancelButton
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue