Files
cz-app/src/pages/Login/user-forgot-password/components/ForgotInput.vue
2026-09-09 14:08:40 +08:00

63 lines
1.1 KiB
Vue

<script setup lang="ts">
defineOptions({
options: {
virtualHost: true,
},
})
defineProps<{
placeholder: string
inputType?: 'text' | 'number'
modelValue: string
}>()
const emit = defineEmits<{
'update:modelValue': [value: string]
}>()
function onInput(e: { detail: { value: string } }) {
emit('update:modelValue', e.detail.value)
}
</script>
<template>
<view class="forgot-input">
<input
class="forgot-input__field"
:type="inputType || 'text'"
:placeholder="placeholder"
placeholder-class="forgot-input__placeholder"
:value="modelValue"
@input="onInput"
>
</view>
</template>
<style scoped lang="scss">
@import '@/styles/variables.scss';
.forgot-input {
display: flex;
align-items: center;
width: 100%;
height: 96rpx;
padding: 0 32rpx;
box-sizing: border-box;
background: $color-bg-input;
border-radius: 48rpx;
}
.forgot-input__field {
flex: 1;
height: 96rpx;
font-size: 30rpx;
color: $color-text-primary;
background: transparent;
}
.forgot-input__placeholder {
font-size: 30rpx;
color: $color-text-placeholder;
}
</style>