🐛 fix: fixed bug
This commit is contained in:
parent
47212b1688
commit
b20b694012
|
@ -2,7 +2,7 @@
|
||||||
import Button from 'primevue/button';
|
import Button from 'primevue/button';
|
||||||
import type IVLink from '@/components/button/IVLink.type';
|
import type IVLink from '@/components/button/IVLink.type';
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import styles from '@/assets/typography.module.css'
|
import styles from '@visua/typography.module.css';
|
||||||
|
|
||||||
const props = defineProps<IVLink>();
|
const props = defineProps<IVLink>();
|
||||||
|
|
||||||
|
@ -16,25 +16,25 @@ const htmlTag = computed(() => { return props.to ? 'RouterLink' : props.href ? '
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Button
|
<Button
|
||||||
variant="link"
|
variant="link"
|
||||||
role="link"
|
role="link"
|
||||||
:label="props.label"
|
:label="props.label"
|
||||||
:aria-label="props.label"
|
:aria-label="props.label"
|
||||||
:icon="props.icon"
|
:icon="props.icon"
|
||||||
:disabled="props.disabled"
|
:disabled="props.disabled"
|
||||||
:aria-disabled="props.disabled"
|
:aria-disabled="props.disabled"
|
||||||
:icon-pos="iconPos"
|
:icon-pos="iconPos"
|
||||||
:as="htmlTag"
|
:as="htmlTag"
|
||||||
:href="props.href"
|
:href="props.href"
|
||||||
:target="props.target"
|
:target="props.target"
|
||||||
:to="props.to"
|
:to="props.to"
|
||||||
:tabindex="props.disabled ? -1 : 0"
|
:tabindex="props.disabled ? -1 : 0"
|
||||||
@click="props.disabled && $event.preventDefault()"
|
@click="props.disabled && $event.preventDefault()"
|
||||||
class="p-button"
|
class="p-button"
|
||||||
:class="[styles['text-body-MD-standard-text-Regular']]"
|
:class="[styles['text-body-MD-standard-text-Regular'], {'disabled': props.disabled}]"
|
||||||
:style="props.disabled ? { pointerEvents: 'none' } : {}"
|
:style="props.disabled ? { pointerEvents: 'none' } : {}"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="css" scoped>
|
<style lang="css" scoped>
|
||||||
|
@ -44,7 +44,17 @@ const htmlTag = computed(() => { return props.to ? 'RouterLink' : props.href ? '
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-button.p-button-link:hover{
|
.p-button{
|
||||||
border: 2px solid var(--p-button-link-color);
|
padding: 0px;
|
||||||
|
gap: calc(var(--p-button-gap)/2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.p-button.disabled{
|
||||||
|
--p-button-link-color: var(--text-disabled-grey);
|
||||||
|
--p-button-link-hover-color: var(--text-disabled-grey);
|
||||||
|
--p-button-link-active-color: var(--text-disabled-grey);
|
||||||
|
-webkit-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user