Vanessa 2025-07-03 11:14:40 +08:00
parent 46b4406806
commit adfab56413

View file

@ -187,11 +187,11 @@ const transformCellValue = (colType: TAVCol, value: IAVCellValue): IAVCellValue
}
} else if (["text", "block", "url", "phone", "email", "template"].includes(colType)) {
newValue[colType as "text"] = {
content: getCellValueContent(value)
content: getCellValueContent(value).toString()
};
} else if (colType === "mSelect" || colType === "select") {
newValue.mSelect = [{
content: getCellValueContent(value),
content: getCellValueContent(value).toString(),
color: "1"
}];
} else if (colType === "rollup") {
@ -210,7 +210,7 @@ const transformCellValue = (colType: TAVCol, value: IAVCellValue): IAVCellValue
newValue.relation = {blockIDs: [], contents: []};
}
} else if (colType === "mAsset") {
const content = getCellValueContent(value);
const content = getCellValueContent(value).toString();
newValue.mAsset = [{
type: Constants.SIYUAN_ASSETS_IMAGE.includes(pathPosix().extname(content).toLowerCase()) ? "image" : "file",
content,
@ -799,7 +799,7 @@ export const updateCellsValue = (protyle: IProtyle, nodeElement: HTMLElement, va
});
}
}
} else if (type === "mSelect") {
} else if (type === "mSelect" || type === "select") {
// 不传入为删除
if (typeof value === "string") {
const newMSelectValue: IAVCellSelectValue[] = [];