fix: input-excel 自动去掉邮箱地址里的 mailto: Closes #6889

This commit is contained in:
wuduoyi 2023-05-24 13:06:58 +08:00
parent 347bd37d3b
commit 4d443a67dc

View File

@ -299,6 +299,9 @@ export default class ExcelControl extends React.PureComponent<
const ExcelValueType = this.ExcelJS.ValueType; const ExcelValueType = this.ExcelJS.ValueType;
if (cell.type === ExcelValueType.Hyperlink) { if (cell.type === ExcelValueType.Hyperlink) {
value = cell.value.hyperlink; value = cell.value.hyperlink;
if (value.startsWith('mailto:')) {
value = value.substring(7);
}
} else if (cell.type === ExcelValueType.Formula) { } else if (cell.type === ExcelValueType.Formula) {
value = cell.value.result; value = cell.value.result;
} else if (cell.type === ExcelValueType.RichText) { } else if (cell.type === ExcelValueType.RichText) {