File tree Expand file tree Collapse file tree
src/components/BootstrapBlazor.UniverSheet Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,14 +21,7 @@ public class UniverSheetData
2121 public string ? CommandName { get ; set ; }
2222
2323 /// <summary>
24- /// 获得/设置 表格数据 默认 null 未设置
24+ /// 获得/设置 数据 默认 null 未设置
2525 /// </summary>
26- /// <remarks>给 UniverSheet Workbook 使用</remarks>
27- public object ? WorkbookData { get ; set ; }
28-
29- /// <summary>
30- /// 获得/设置 附加业务数据 默认 null 未设置
31- /// </summary>
32- /// <remarks>给自定义业务使用</remarks>
3326 public object ? Data { get ; set ; }
3427}
Original file line number Diff line number Diff line change @@ -70,9 +70,15 @@ export async function createUniverSheetAsync(sheet) {
7070 ...options
7171 } ) ;
7272
73- const { workboolData } = sheet . options . data || { } ;
74- univerAPI . createWorkbook ( workboolData ) ;
75-
73+ const { data } = sheet . options . data || { } ;
74+ if ( data ) {
75+ const option = typeof data === 'string' ? JSON . parse ( data ) : data ;
76+ univerAPI . createWorkbook ( option ) ;
77+ }
78+ else {
79+ univerAPI . createWorkbook ( ) ;
80+ }
81+
7682 sheet . univer = univer ;
7783 sheet . univerAPI = univerAPI ;
7884 sheet . dispose = ( ) => {
You can’t perform that action at this time.
0 commit comments