mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-07 20:37:44 +00:00
chore: ad release label
This commit is contained in:
@@ -1,27 +1,29 @@
|
||||
<script setup lang="ts" generic="U extends ZodAny">
|
||||
import type { ZodAny } from 'zod'
|
||||
import { computed } from 'vue'
|
||||
import type { Config, ConfigItem, Shape } from './interface'
|
||||
import { DEFAULT_ZOD_HANDLERS, INPUT_COMPONENTS } from './constant'
|
||||
import useDependencies from './dependencies'
|
||||
import type { ZodAny } from "zod";
|
||||
import { computed } from "vue";
|
||||
import type { Config, ConfigItem, Shape } from "./interface";
|
||||
import { DEFAULT_ZOD_HANDLERS, INPUT_COMPONENTS } from "./constant";
|
||||
import useDependencies from "./dependencies";
|
||||
|
||||
const props = defineProps<{
|
||||
fieldName: string
|
||||
shape: Shape
|
||||
config?: ConfigItem | Config<U>
|
||||
}>()
|
||||
fieldName: string;
|
||||
shape: Shape;
|
||||
config?: ConfigItem | Config<U>;
|
||||
}>();
|
||||
|
||||
function isValidConfig(config: any): config is ConfigItem {
|
||||
return !!config?.component
|
||||
return !!config?.component;
|
||||
}
|
||||
|
||||
const delegatedProps = computed(() => {
|
||||
if (['ZodObject', 'ZodArray'].includes(props.shape?.type))
|
||||
return { schema: props.shape?.schema }
|
||||
return undefined
|
||||
})
|
||||
if (["ZodObject", "ZodArray"].includes(props.shape?.type))
|
||||
return { schema: props.shape?.schema };
|
||||
return undefined;
|
||||
});
|
||||
|
||||
const { isDisabled, isHidden, isRequired, overrideOptions } = useDependencies(props.fieldName)
|
||||
const { isDisabled, isHidden, isRequired, overrideOptions } = useDependencies(
|
||||
props.fieldName,
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user