新增退单支付密码、会员充值支付密码
This commit is contained in:
@@ -1,74 +1,78 @@
|
||||
<!-- 取餐号组件 -->
|
||||
<template>
|
||||
<el-dialog :title="props.title" width="600" v-model="dialogVisible" @open="opne">
|
||||
<el-input v-model="number" :placeholder="props.placeholder" readonly></el-input>
|
||||
<el-input :type="props.type" v-model="number" :placeholder="props.placeholder" readonly></el-input>
|
||||
<div class="keybord_wrap">
|
||||
<div v-for="item in 9" :key="item">
|
||||
<el-button plain type="info" style="width: 100%;" @click="inputHandle(item)">{{ item }}</el-button>
|
||||
<el-button plain type="info" style="width: 100%" @click="inputHandle(item)">{{ item }}</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-button plain type="info" disabled style="width: 100%;">.</el-button>
|
||||
<el-button plain type="info" disabled style="width: 100%">.</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-button plain type="info" style="width: 100%;" @click="inputHandle(0)">0</el-button>
|
||||
<el-button plain type="info" style="width: 100%" @click="inputHandle(0)">0</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-button plain type="info" icon="CloseBold" style="width: 100%;" @click="delHandle"></el-button>
|
||||
<el-button plain type="info" icon="CloseBold" style="width: 100%" @click="delHandle"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<el-button type="primary" style="width: 100%;" @click="confirmHandle">确认</el-button>
|
||||
<el-button type="primary" style="width: 100%" @click="confirmHandle">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { ref } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
type: {
|
||||
type: String,
|
||||
default: "text",
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '标题'
|
||||
default: "标题",
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '提示'
|
||||
}
|
||||
})
|
||||
default: "提示",
|
||||
},
|
||||
});
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const number = ref('')
|
||||
const dialogVisible = ref(false);
|
||||
const number = ref("");
|
||||
|
||||
const emit = defineEmits(['success'])
|
||||
const emit = defineEmits(["success"]);
|
||||
|
||||
function show() {
|
||||
dialogVisible.value = true
|
||||
dialogVisible.value = true;
|
||||
}
|
||||
|
||||
function opne() {
|
||||
number.value = ''
|
||||
number.value = "";
|
||||
}
|
||||
|
||||
// 输入
|
||||
function inputHandle(n) {
|
||||
number.value += n
|
||||
number.value += n;
|
||||
}
|
||||
|
||||
// 删除
|
||||
function delHandle() {
|
||||
if (!number.value) return
|
||||
number.value = number.value.substring(0, number.value.length - 1)
|
||||
if (!number.value) return;
|
||||
number.value = number.value.substring(0, number.value.length - 1);
|
||||
}
|
||||
|
||||
// 确认
|
||||
function confirmHandle() {
|
||||
emit('success', number.value)
|
||||
dialogVisible.value = false
|
||||
emit("success", number.value);
|
||||
dialogVisible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
show
|
||||
})
|
||||
show,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@@ -88,4 +92,4 @@ defineExpose({
|
||||
height: 60px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user