mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-15 09:21:25 +08:00
21 lines
629 B
JavaScript
21 lines
629 B
JavaScript
import CalendarOutlined from '@ant-design/icons-vue/CalendarOutlined';
|
|
import { isValidElement } from '../_util/props-util';
|
|
import { cloneElement } from '../_util/vnode';
|
|
|
|
export default {
|
|
functional: true,
|
|
render(h, context) {
|
|
const { props } = context;
|
|
const { suffixIcon, prefixCls } = props;
|
|
return (
|
|
(suffixIcon && isValidElement(suffixIcon) ? (
|
|
cloneElement(suffixIcon, {
|
|
class: `${prefixCls}-picker-icon`,
|
|
})
|
|
) : (
|
|
<span class={`${prefixCls}-picker-icon`}>{suffixIcon}</span>
|
|
)) || <CalendarOutlined class={`${prefixCls}-picker-icon`} />
|
|
);
|
|
},
|
|
};
|