mirror of
https://github.com/elk-zone/elk
synced 2024-11-27 14:28:10 +09:00
fix: issue 1366 (#1382)
This commit is contained in:
parent
c35f8fdd33
commit
29e5d6ddf7
@ -1,11 +1,14 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const props = defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
|
is?: string
|
||||||
text?: string
|
text?: string
|
||||||
description?: string
|
description?: string
|
||||||
icon?: string
|
icon?: string
|
||||||
checked?: boolean
|
checked?: boolean
|
||||||
command?: boolean
|
command?: boolean
|
||||||
}>()
|
}>(), {
|
||||||
|
is: 'div',
|
||||||
|
})
|
||||||
const emit = defineEmits(['click'])
|
const emit = defineEmits(['click'])
|
||||||
|
|
||||||
const { hide } = useDropdownContext() || {}
|
const { hide } = useDropdownContext() || {}
|
||||||
@ -39,8 +42,10 @@ useCommand({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div
|
<component
|
||||||
v-bind="$attrs" ref="el"
|
v-bind="$attrs"
|
||||||
|
:is="is"
|
||||||
|
ref="el"
|
||||||
flex gap-3 items-center cursor-pointer px4 py3
|
flex gap-3 items-center cursor-pointer px4 py3
|
||||||
select-none
|
select-none
|
||||||
hover-bg-active
|
hover-bg-active
|
||||||
@ -67,5 +72,5 @@ useCommand({
|
|||||||
|
|
||||||
<div v-if="checked" i-ri:check-line />
|
<div v-if="checked" i-ri:check-line />
|
||||||
<slot name="actions" />
|
<slot name="actions" />
|
||||||
</div>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
@ -39,11 +39,13 @@ const clickUser = (user: UserLogin) => {
|
|||||||
</template>
|
</template>
|
||||||
<div border="t base" pt2>
|
<div border="t base" pt2>
|
||||||
<CommonDropdownItem
|
<CommonDropdownItem
|
||||||
|
is="button"
|
||||||
:text="$t('user.add_existing')"
|
:text="$t('user.add_existing')"
|
||||||
icon="i-ri:user-add-line"
|
icon="i-ri:user-add-line"
|
||||||
@click="openSigninDialog"
|
@click="openSigninDialog"
|
||||||
/>
|
/>
|
||||||
<CommonDropdownItem
|
<CommonDropdownItem
|
||||||
|
is="button"
|
||||||
v-if="isHydrated && currentUser"
|
v-if="isHydrated && currentUser"
|
||||||
:text="$t('user.sign_out_account', [getFullHandle(currentUser.account)])"
|
:text="$t('user.sign_out_account', [getFullHandle(currentUser.account)])"
|
||||||
icon="i-ri:logout-box-line rtl-flip"
|
icon="i-ri:logout-box-line rtl-flip"
|
||||||
|
Loading…
Reference in New Issue
Block a user