mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
style: fix lint
This commit is contained in:
parent
bf29308a90
commit
c6081913d2
@ -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>
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user