add default props for button.vue
Some checks failed
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/push/test Pipeline failed
ci/woodpecker/pr/lint-client Pipeline failed
Some checks failed
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/push/test Pipeline failed
ci/woodpecker/pr/lint-client Pipeline failed
Disabled require-default-prop for the to prop since it's only used when link is true.
This commit is contained in:
parent
d10ab86474
commit
af3b39df5f
1 changed files with 16 additions and 3 deletions
|
@ -28,19 +28,32 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted, nextTick } from 'vue';
|
||||
|
||||
const props = defineProps<{
|
||||
type?: 'button' | 'submit' | 'reset';
|
||||
const props = withDefaults(defineProps<{
|
||||
type?: 'button' | 'submit' | 'reset' | undefined;
|
||||
primary?: boolean;
|
||||
gradate?: boolean;
|
||||
rounded?: boolean;
|
||||
inline?: boolean;
|
||||
link?: boolean;
|
||||
// to should only be defined when link is true
|
||||
// eslint-disable-next-line vue/require-default-prop
|
||||
to?: string;
|
||||
autofocus?: boolean;
|
||||
wait?: boolean;
|
||||
danger?: boolean;
|
||||
full?: boolean;
|
||||
}>();
|
||||
}>(), {
|
||||
type: 'button',
|
||||
primary: false,
|
||||
gradate: false,
|
||||
rounded: false,
|
||||
inline: false,
|
||||
link: false,
|
||||
autofocus: false,
|
||||
wait: false,
|
||||
danger: false,
|
||||
full: false,
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'click', mouseEvent: MouseEvent): void;
|
||||
|
|
Loading…
Reference in a new issue