|
|
@@ -302,10 +302,10 @@ export const handleCopy = (spread) => {
|
|
|
* 从 sheet 数据源提取所有字段值(兼容 table 绑定字段)
|
|
|
*/
|
|
|
export const collectSheetDataSource = (sheet): Record<string, any> => {
|
|
|
- const rT = sheet.getDataSource().rT
|
|
|
+ if(!sheet.getDataSource()) return {}
|
|
|
+ const rT = sheet.getDataSource().rT || {}
|
|
|
const result: Record<string, any> = { ...rT }
|
|
|
|
|
|
- const tables = sheet.tables?.all() || []
|
|
|
for (const table of tables) {
|
|
|
const tableBindingPath = table.bindingPath()
|
|
|
if (tableBindingPath) {
|