feat: 添加登录组件,更新认证流程,优化输入标签组件
This commit is contained in:
35
src/components/ui/input-label/index.vue
Normal file
35
src/components/ui/input-label/index.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<script lang='ts' setup>
|
||||
import type { ComponentInstance } from "vue";
|
||||
import UiInput from "@/components/ui/input/index.vue";
|
||||
|
||||
defineProps<{
|
||||
label?: string;
|
||||
}>();
|
||||
|
||||
const vm = getCurrentInstance()!;
|
||||
|
||||
function changeRef(exposed: any) {
|
||||
vm.exposed = exposed;
|
||||
}
|
||||
|
||||
defineExpose({} as ComponentInstance<typeof UiInput>);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="label" class="label">
|
||||
{{ label }}
|
||||
</div>
|
||||
<component :is="h(UiInput, { ...$attrs, ref: changeRef })" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.label {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
margin-bottom: 14px;
|
||||
margin-left: 8px;
|
||||
color: var(--ion-text-color-secondary);
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user