mirror of
https://github.com/certd/certd.git
synced 2026-05-16 13:17:29 +08:00
🔱: [client] sync upgrade with 6 commits [trident-sync]
chore: chore: help menu chore: help menu fix: 修复 antdv 弹出菜单边框过大的问题 fix: 修复 antdv懒加载后dropdown按钮无法点击的bug
This commit is contained in:
@@ -382,6 +382,9 @@ function removeMenuItem(item: MenuItemRegistered) {
|
||||
.is-menu-align {
|
||||
justify-content: var(--menu-align, start);
|
||||
}
|
||||
.vben-menu__popup-container {
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
.vben-menu__popup-container,
|
||||
.vben-menu {
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
import type { VbenButtonProps } from './button';
|
||||
import type { VbenButtonProps } from "./button";
|
||||
|
||||
import { computed } from 'vue';
|
||||
import { computed } from "vue";
|
||||
|
||||
import { LoaderCircle } from '/@/vben/icons';
|
||||
import { cn } from '/@/vben/shared/utils';
|
||||
import { LoaderCircle } from "/@/vben/icons";
|
||||
import { cn } from "/@/vben/shared/utils";
|
||||
|
||||
import { Primitive } from 'radix-vue';
|
||||
import { Primitive } from "radix-vue";
|
||||
|
||||
import { buttonVariants } from '../../ui';
|
||||
import { buttonVariants } from "../../ui";
|
||||
|
||||
interface Props extends VbenButtonProps {}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
as: 'button',
|
||||
class: '',
|
||||
as: "button",
|
||||
class: "",
|
||||
disabled: false,
|
||||
loading: false,
|
||||
size: 'default',
|
||||
variant: 'default',
|
||||
size: "default",
|
||||
variant: "default"
|
||||
});
|
||||
|
||||
const isDisabled = computed(() => {
|
||||
@@ -27,16 +27,8 @@ const isDisabled = computed(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Primitive
|
||||
:as="as"
|
||||
:as-child="asChild"
|
||||
:class="cn(buttonVariants({ variant, size }), props.class)"
|
||||
:disabled="isDisabled"
|
||||
>
|
||||
<LoaderCircle
|
||||
v-if="loading"
|
||||
class="text-md mr-2 size-4 flex-shrink-0 animate-spin"
|
||||
/>
|
||||
<Primitive :as="as" :as-child="asChild" :class="cn(buttonVariants({ variant, size }), props.class)" :disabled="isDisabled">
|
||||
<LoaderCircle v-if="loading" class="text-md mr-2 size-4 flex-shrink-0 animate-spin" />
|
||||
<slot></slot>
|
||||
</Primitive>
|
||||
</template>
|
||||
|
||||
@@ -1,23 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
import type { PopoverContentEmits, PopoverContentProps } from 'radix-vue';
|
||||
import type { PopoverContentEmits, PopoverContentProps } from "radix-vue";
|
||||
|
||||
import { computed } from 'vue';
|
||||
import { computed } from "vue";
|
||||
|
||||
import { cn } from '/@/vben/shared/utils';
|
||||
import { cn } from "/@/vben/shared/utils";
|
||||
|
||||
import { PopoverContent, PopoverPortal, useForwardPropsEmits } from 'radix-vue';
|
||||
import { PopoverContent, PopoverPortal, useForwardPropsEmits } from "radix-vue";
|
||||
|
||||
defineOptions({
|
||||
inheritAttrs: false,
|
||||
inheritAttrs: false
|
||||
});
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<PopoverContentProps & { class?: any }>(),
|
||||
{
|
||||
align: 'center',
|
||||
sideOffset: 4,
|
||||
},
|
||||
);
|
||||
const props = withDefaults(defineProps<PopoverContentProps & { class?: any }>(), {
|
||||
align: "center",
|
||||
sideOffset: 4
|
||||
});
|
||||
const emits = defineEmits<PopoverContentEmits>();
|
||||
|
||||
const delegatedProps = computed(() => {
|
||||
@@ -36,7 +33,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
||||
:class="
|
||||
cn(
|
||||
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 border-border w-72 rounded-md border p-4 shadow-md outline-none',
|
||||
props.class,
|
||||
props.class
|
||||
)
|
||||
"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user