提现功能需要添加
This commit is contained in:
@@ -53,6 +53,9 @@
|
||||
:placeholder-style="placeholderStyle"
|
||||
:placeholder="props.placeholder"
|
||||
/>
|
||||
<view v-else class="right-box">
|
||||
<slot name="right"></slot>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="hasDefaultSlot" class="bottom-slot">
|
||||
<slot></slot>
|
||||
@@ -74,6 +77,10 @@
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.right-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.bottom-slot {
|
||||
margin-top: 26rpx;
|
||||
|
||||
81
pages/my-index/components/popup-box.vue
Normal file
81
pages/my-index/components/popup-box.vue
Normal file
@@ -0,0 +1,81 @@
|
||||
<script setup>
|
||||
import { ref, watch } from 'vue'
|
||||
|
||||
const show = defineModel({
|
||||
type: Boolean,
|
||||
default: false
|
||||
})
|
||||
|
||||
const name = defineModel('name', {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
})
|
||||
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
/** 是否为性别选项 */
|
||||
isSex: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
const emits = defineEmits(['confirm'])
|
||||
|
||||
const inputDialog = ref(null)
|
||||
|
||||
watch(
|
||||
() => show.value,
|
||||
v => {
|
||||
if (v) {
|
||||
// 'bottom'
|
||||
inputDialog.value.open()
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
const close = () => {
|
||||
show.value = false
|
||||
}
|
||||
const dialogInputConfirm = () => {
|
||||
close()
|
||||
emits('confirm')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<uni-popup ref="inputDialog" type="dialog">
|
||||
<uni-popup-dialog
|
||||
v-model="name"
|
||||
mode="input"
|
||||
:title="props.title"
|
||||
:placeholder="`请输入${props.title}`"
|
||||
@close="close"
|
||||
@confirm="dialogInputConfirm"
|
||||
>
|
||||
<uni-data-checkbox
|
||||
v-if="props.isSex"
|
||||
v-model="name"
|
||||
:localdata="[
|
||||
{
|
||||
text: '男',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
text: '女',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
text: '未知',
|
||||
value: '2'
|
||||
}
|
||||
]"
|
||||
></uni-data-checkbox>
|
||||
</uni-popup-dialog>
|
||||
</uni-popup>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
Reference in New Issue
Block a user