feat(publish): support visibility

This commit is contained in:
三咲智子 2022-11-24 17:15:58 +08:00
parent dbf4362d8b
commit ad3d5efb11
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
5 changed files with 86 additions and 4 deletions

View file

@ -2,7 +2,9 @@
import { dropdownContextKey } from './ctx'
defineProps<{
description?: string
icon?: string
checked?: boolean
}>()
const emit = defineEmits(['click'])
@ -15,8 +17,26 @@ const handleClick = (evt: MouseEvent) => {
</script>
<template>
<div flex gap-2 items-center cursor-pointer px4 py3 font-700 hover="bg-active" @click="handleClick">
<div
flex gap-3 items-center cursor-pointer px4 py3 hover-bg-active
@click="handleClick"
>
<div v-if="icon" :class="icon" />
<span text-15px><slot /></span>
<div flex="~ col">
<div text-15px font-700>
<slot />
</div>
<div text-3 text="gray/90">
<slot name="description">
<p v-if="description">
{{ description }}
</p>
</slot>
</div>
</div>
<div flex-auto />
<div v-if="checked" i-ri:check-line />
</div>
</template>