feat: use withDefaults in CreateEdit
This commit is contained in:
parent
a80ac571f2
commit
5e4b9e38a6
@ -50,41 +50,25 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type {PropType} from 'vue'
|
|
||||||
import type {IconProp} from '@fortawesome/fontawesome-svg-core'
|
import type {IconProp} from '@fortawesome/fontawesome-svg-core'
|
||||||
|
|
||||||
defineProps({
|
withDefaults(defineProps<{
|
||||||
title: {
|
title: string,
|
||||||
type: String,
|
primaryLabel?: string,
|
||||||
default: '',
|
primaryIcon?: IconProp,
|
||||||
},
|
primaryDisabled?: boolean,
|
||||||
primaryLabel: {
|
hasPrimaryAction?: boolean,
|
||||||
type: String,
|
tertiary?: string,
|
||||||
},
|
wide?: boolean,
|
||||||
primaryIcon: {
|
loading?: boolean
|
||||||
type: String as PropType<IconProp>,
|
}>(), {
|
||||||
default: 'plus',
|
primaryLabel: '',
|
||||||
},
|
primaryIcon: 'plus',
|
||||||
primaryDisabled: {
|
primaryDisabled: false,
|
||||||
type: Boolean,
|
hasPrimaryAction: true,
|
||||||
default: false,
|
tertiary: '',
|
||||||
},
|
wide: false,
|
||||||
hasPrimaryAction: {
|
loading: false,
|
||||||
type: Boolean,
|
|
||||||
default: true,
|
|
||||||
},
|
|
||||||
tertiary: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
wide: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
loading: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['create', 'primary', 'tertiary'])
|
const emit = defineEmits(['create', 'primary', 'tertiary'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user