refactor: 验证码样式优化
This commit is contained in:
parent
5310bddc1c
commit
cca456aa82
@ -1,22 +1,18 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Input as VbenInput } from '../../ui/input';
|
import { Input as VbenInput } from '../../ui/input';
|
||||||
/**
|
|
||||||
* 非通用组件 直接按业务来写
|
withDefaults(
|
||||||
*/
|
defineProps<{
|
||||||
defineProps({
|
captcha?: string;
|
||||||
captcha: {
|
label?: string;
|
||||||
default: '',
|
placeholder?: string;
|
||||||
type: String,
|
}>(),
|
||||||
|
{
|
||||||
|
captcha: '',
|
||||||
|
label: '验证码',
|
||||||
|
placeholder: '请输入验证码',
|
||||||
},
|
},
|
||||||
label: {
|
);
|
||||||
default: '验证码',
|
|
||||||
type: String,
|
|
||||||
},
|
|
||||||
placeholder: {
|
|
||||||
default: '验证码',
|
|
||||||
type: String,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
defineEmits<{ captchaClick: [] }>();
|
defineEmits<{ captchaClick: [] }>();
|
||||||
|
|
||||||
@ -31,7 +27,7 @@ const modelValue = defineModel({ default: '', type: String });
|
|||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
id="code"
|
id="code"
|
||||||
v-model="modelValue"
|
v-model="modelValue"
|
||||||
:class="$attrs.class ?? {}"
|
:class="$attrs?.class ?? {}"
|
||||||
:label="label"
|
:label="label"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
name="code"
|
name="code"
|
||||||
@ -41,7 +37,7 @@ const modelValue = defineModel({ default: '', type: String });
|
|||||||
</div>
|
</div>
|
||||||
<img
|
<img
|
||||||
:src="captcha"
|
:src="captcha"
|
||||||
class="h-[40px] w-[115px] rounded-r-md"
|
class="h-[40px] w-[115px] cursor-pointer rounded-r-md"
|
||||||
@click="$emit('captchaClick')"
|
@click="$emit('captchaClick')"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user