feat: add v-access directive

This commit is contained in:
vince
2024-07-18 21:31:34 +08:00
parent 910a3553ac
commit 01e95e029f
14 changed files with 89 additions and 36 deletions

View File

@@ -5,19 +5,24 @@ import {
DialogContent,
DialogDescription,
DialogTitle,
VbenAvatar,
VisuallyHidden,
} from '@vben-core/shadcn-ui';
import AuthenticationLogin from './login.vue';
import { AuthenticationProps, LoginAndRegisterParams } from './typings';
interface Props extends AuthenticationProps {}
interface Props extends AuthenticationProps {
avatar?: string;
}
defineOptions({
name: 'LoginExpiredModal',
});
const props = withDefaults(defineProps<Props>(), {});
const props = withDefaults(defineProps<Props>(), {
avatar: '',
});
const emit = defineEmits<{
submit: [LoginAndRegisterParams];
@@ -37,8 +42,10 @@ const forwarded = useForwardPropsEmits(props, emit);
@escape-key-down="(e) => e.preventDefault()"
@interact-outside="(e) => e.preventDefault()"
>
<DialogTitle>
<VbenAvatar :src="avatar" class="mx-auto size-20" />
</DialogTitle>
<VisuallyHidden>
<DialogTitle />
<DialogDescription />
</VisuallyHidden>
<AuthenticationLogin