formatPopupBodyText(serverPayload){ 让结果 = this.formatBusinessHoursText(serverPayload);
if (serverPayload.PhoneNumbers__c != null && getCurrentCountryCode() === 'IN' && (this.brandName == 'HYN' || this.brandName == 'SUZ')) {
result += `. ${LABEL_NATIONALNETWORK} `;
}
this.popupBodyText = result;
}
我们的营业时间为周一至周五上午 9 点至下午 6 点。联系我们80004001。(打全国网)
我试过下面的代码但没有用:
formatPopupBodyText(serverPayload){ 让结果 = this.formatBusinessHoursText(serverPayload);
if (serverPayload.PhoneNumbers__c != null && getCurrentCountryCode() === 'IN' && (this.brandName == 'HYN' || this.brandName == 'SUZ')) {
result += `\n ${LABEL_NATIONALNETWORK} `; **//put "\n" and tried with "<br/>" as well**
}
this.popupBodyText = result;
}
我们的营业时间为周一至周五上午 9 点至下午 6 点。
联系我们80004001。
(拨打全国网络)
可以使用换行符 或 HTML 标签 < br > 和一些修改
formatPopupBodyText(serverPayload) {
let result = this.formatBusinessHoursText(serverPayload);
if (serverPayload.PhoneNumbers__c != null && getCurrentCountryCode() === 'IN'
&& (this.brandName == 'HYN' || this.brandName == 'SUZ')) {
result += `<br>${LABEL_NATIONALNETWORK}`; // add <br> tag before the label
}
this.popupBodyText = result;
}