fix: page-header组件设置backIcon为false,隐藏backIcon失败问题

This commit is contained in:
mingtianyihou33 2020-03-30 17:43:56 +08:00
parent caa0a6489a
commit f8dbe516d9

View File

@ -56,7 +56,7 @@ const renderTitle = (h, prefixCls, instance) => {
const subTitle = getComponentFromProp(instance, 'subTitle');
const tags = getComponentFromProp(instance, 'tags');
const extra = getComponentFromProp(instance, 'extra');
const backIcon = getComponentFromProp(instance, 'backIcon') || <Icon type="arrow-left" />;
const backIcon = getComponentFromProp(instance, 'backIcon') !== undefined ? getComponentFromProp(instance, 'backIcon') : <Icon type="arrow-left" />;
const onBack = instance.$listeners.back;
const headingPrefixCls = `${prefixCls}-heading`;
if (title || subTitle || tags || extra) {