feat: 测试代码生成

This commit is contained in:
xlsea
2024-09-09 15:40:38 +08:00
parent 74529144aa
commit 07e30bd591
26 changed files with 673 additions and 143 deletions

View File

@ -0,0 +1,28 @@
<script setup lang="ts">
import { useDict } from '@/hooks/business/dict';
defineOptions({ name: 'DictRadio' });
interface Props {
dictCode: string;
immediate?: boolean;
}
const props = withDefaults(defineProps<Props>(), {
immediate: true
});
const value = defineModel<string | null>('value', { required: false });
const { options } = useDict(props.dictCode, props.immediate);
</script>
<template>
<NRadioGroup v-model:value="value">
<NSpace>
<NRadio v-for="option in options" :key="option.value" :value="option.value" :label="option.label" />
</NSpace>
</NRadioGroup>
</template>
<style scoped></style>