diff --git a/src/cell/index.js b/src/cell/index.js
index 8a7afee58..dba2ff074 100644
--- a/src/cell/index.js
+++ b/src/cell/index.js
@@ -19,7 +19,8 @@ export default createComponent({
setup(props, { slots, emit }) {
return function () {
const { icon, size, title, label, value, isLink } = props;
- const showTitle = slots.title || isDef(title);
+ const titleSlot = slots.title?.();
+ const showTitle = titleSlot || isDef(title);
function Label() {
const showLabel = slots.label || isDef(label);
@@ -40,7 +41,7 @@ export default createComponent({
class={[bem('title'), props.titleClass]}
style={props.titleStyle}
>
- {slots.title ? slots.title() : {title}}
+ {slots.title ? titleSlot : {title}}
{Label()}
);
diff --git a/src/field/index.js b/src/field/index.js
index b1144669e..8d02b8fd0 100644
--- a/src/field/index.js
+++ b/src/field/index.js
@@ -557,12 +557,14 @@ export default createComponent({
render() {
const slots = this.$slots;
const labelAlign = this.getProp('labelAlign');
+ const Label = this.genLabel();
+ const LeftIcon = this.genLeftIcon();
return (
| LeftIcon : null,
+ title: Label ? () => Label : null,
extra: slots.extra,
}}
icon={this.leftIcon}
|