fix: add triggerClass binding to PopoverTrigger and update icon-picker styles (#6095)

* Popover支持设置trigger的样式
* 修正icon-picker的input值更新
This commit is contained in:
Netfan
2025-05-01 21:40:45 +08:00
parent f920895b8c
commit aef2134b60
2 changed files with 10 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ interface Props extends PopoverRootProps {
class?: ClassType;
contentClass?: ClassType;
contentProps?: PopoverContentProps;
triggerClass?: ClassType;
}
const props = withDefaults(defineProps<Props>(), {});
@@ -32,6 +33,7 @@ const delegatedProps = computed(() => {
class: _cls,
contentClass: _,
contentProps: _cProps,
triggerClass: _tClass,
...delegated
} = props;
@@ -43,7 +45,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
<template>
<PopoverRoot v-bind="forwarded">
<PopoverTrigger>
<PopoverTrigger :class="triggerClass">
<slot name="trigger"></slot>
<PopoverContent