-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: double comment and bangumi addon docs (#357)
* feat: double comment and bangumi addon docs * feat: change Switch to Select and upgrade bangumi dependency
- Loading branch information
Showing
7 changed files
with
104 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<script setup lang='ts'> | ||
import { useEventListener } from '@vueuse/core' | ||
import { ref } from 'vue' | ||
defineProps<{ | ||
options: string[] | ||
}>() | ||
const activeValue = defineModel() | ||
const optionVisible = ref(false) | ||
useEventListener('click', () => { | ||
optionVisible.value = false | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div class="relative h-8 w-30 text-[var(--va-c-text-2)] z-100"> | ||
<button | ||
class="flex h-full w-full px-2 items-center justify-between border rounded-2 transition" | ||
:class="optionVisible ? 'border-[var(--va-c-primary)] shadow-lg' : ''" | ||
@click.stop="optionVisible = true" | ||
> | ||
<span>{{ activeValue }}</span> | ||
<div inline-flex i-ri-arrow-down-s-line /> | ||
</button> | ||
<Transition> | ||
<ul | ||
v-show="optionVisible" | ||
class="select-options absolute translate-y-1 left-0 top-full w-full bg-[var(--va-c-bg-light)] overflow-hidden rounded-1 border" | ||
> | ||
<li | ||
v-for="option in options" | ||
:key="option" | ||
class="cursor-pointer list-none px-2 hover:bg-[var(--va-c-primary-lighter)] hover:text-white" | ||
@click="activeValue = option" | ||
> | ||
{{ option }} | ||
</li> | ||
</ul> | ||
</Transition> | ||
</div> | ||
</template> | ||
|
||
<style lang="scss" scoped> | ||
.select-options { | ||
margin: 0; | ||
} | ||
.v-enter-active, | ||
.v-leave-active { | ||
transition: opacity .3s ease; | ||
} | ||
.v-enter-from, | ||
.v-leave-to { | ||
opacity: 0; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
7e28d9d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://yun.valaxy.site as production
🚀 Deployed on https://65d9ba55985bf3e1f676ca82--valaxy.netlify.app