🔨 修改 defineProps 规范.

This commit is contained in:
lijiahangmax
2024-04-06 23:11:30 +08:00
parent 812286a2e7
commit 3623e6bd4a
50 changed files with 300 additions and 394 deletions

View File

@@ -16,7 +16,6 @@
</script>
<script lang="ts" setup>
import type { PropType } from 'vue';
import type { SelectOptionData } from '@arco-design/web-vue';
import { computed, onBeforeMount, ref } from 'vue';
import { useCacheStore } from '@/store';
@@ -24,9 +23,11 @@
import { labelFilter } from '@/types/form';
import useLoading from '@/hooks/loading';
const props = defineProps({
modelValue: [Number, Array] as PropType<number | Array<number>>,
multiple: Boolean,
const props = withDefaults(defineProps<Partial<{
modelValue: number | Array<number>;
multiple: boolean;
}>>(), {
multiple: false,
});
const emits = defineEmits(['update:modelValue']);

View File

@@ -16,16 +16,17 @@
</script>
<script lang="ts" setup>
import type { PropType } from 'vue';
import type { SelectOptionData } from '@arco-design/web-vue';
import { computed, ref, onMounted } from 'vue';
import { useCacheStore } from '@/store';
import { labelFilter } from '@/types/form';
import useLoading from '@/hooks/loading';
const props = defineProps({
modelValue: [Number, Array] as PropType<number | Array<number>>,
multiple: Boolean,
const props = withDefaults(defineProps<Partial<{
modelValue: number | Array<number>;
multiple: boolean;
}>>(), {
multiple: false,
});
const emits = defineEmits(['update:modelValue']);