feat(Popover): add icon-prefix prop (#8703)

* fix: popover 增加 icon-prefix 属性

* fix: popover icon-prefix属性跑单测

Co-authored-by: 冷开俊 <lengkj@travelsky.com.cn>
This commit is contained in:
lengkaixin
2021-05-17 09:53:02 +08:00
committed by GitHub
co-authored by 冷开俊
parent bb7dccfeec
commit 908210a225
5 changed files with 27 additions and 1 deletions
+8 -1
View File
@@ -101,6 +101,7 @@ export default defineComponent({
type: [String, Object] as PropType<TeleportProps['to']>,
default: 'body',
},
iconPrefix: String,
},
emits: ['select', 'touchstart', 'update:show'],
@@ -190,7 +191,13 @@ export default defineComponent({
style={{ color }}
onClick={() => onClickAction(action, index)}
>
{icon && <Icon name={icon} class={bem('action-icon')} />}
{icon && (
<Icon
name={icon}
classPrefix={props.iconPrefix}
class={bem('action-icon')}
/>
)}
<div class={[bem('action-text'), BORDER_BOTTOM]}>{text}</div>
</div>
);