style: fix lint

This commit is contained in:
pengzhanbo 2023-07-18 21:35:22 +08:00
parent bf29308a90
commit c6081913d2
3 changed files with 31 additions and 8 deletions

View File

@ -30,9 +30,15 @@ const linkTo = (e: Event) => {
</script>
<template>
<Component :is="tag" class="auto-link" :class="{ link: href }" :href="href ? normalizeLink(href) : undefined"
:target="target || (isExternal ? '_blank' : undefined)" :rel="rel || (isExternal ? 'noreferrer' : undefined)"
@click="linkTo($event)">
<Component
:is="tag"
class="auto-link"
:class="{ link: href }"
:href="href ? normalizeLink(href) : undefined"
:target="target || (isExternal ? '_blank' : undefined)"
:rel="rel || (isExternal ? 'noreferrer' : undefined)"
@click="linkTo($event)"
>
<slot />
<IconExternalLink v-if="isExternal && !noIcon" class="icon" />
</Component>

View File

@ -31,9 +31,20 @@ export default {
</script>
<template>
<div ref="el" class="flyout-wrapper" @mouseenter="open = true" @mouseleave="open = false">
<button type="button" class="button" aria-haspopup="true" :aria-expanded="open" :aria-label="label"
@click="open = !open">
<div
ref="el"
class="flyout-wrapper"
@mouseenter="open = true"
@mouseleave="open = false"
>
<button
type="button"
class="button"
aria-haspopup="true"
:aria-expanded="open"
:aria-label="label"
@click="open = !open"
>
<span v-if="button || icon" class="text">
<Icon v-if="prefixIcon" :name="prefixIcon" />
<Component :is="icon" v-if="icon" class="option-icon" />
@ -79,7 +90,7 @@ export default {
}
.flyout-wrapper:hover .menu,
.button[aria-expanded='true']+.menu {
.button[aria-expanded='true'] + .menu {
opacity: 1;
visibility: visible;
transform: translateY(0);

View File

@ -52,7 +52,13 @@ const actions = computed(() => {
<p v-if="text" class="hero-text">{{ text }}</p>
<div v-if="actions" class="actions">
<div v-for="action in actions" :key="action.link" class="action">
<VButton tag="a" size="medium" :theme="action.theme" :text="action.text" :href="action.link" />
<VButton
tag="a"
size="medium"
:theme="action.theme"
:text="action.text"
:href="action.link"
/>
</div>
</div>
</div>