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,7 +21,14 @@ 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>
2633 public object ? Data { get ; set ; }
2734}
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export async function createUniverSheetAsync(sheet) {
3232 const { UniverSheetsDataValidationPlugin } = UniverSheetsDataValidation
3333 const { UniverSheetsDataValidationUIPlugin } = UniverSheetsDataValidationUi
3434 const { defaultTheme } = UniverDesign ;
35-
35+
3636 const options = {
3737 theme : sheet . options . theme ?? defaultTheme ,
3838 locale : sheet . options . lang ?? LocaleType . ZH_CN ,
@@ -70,16 +70,8 @@ export async function createUniverSheetAsync(sheet) {
7070 ...options
7171 } ) ;
7272
73- const { data } = sheet . options ;
74- if ( data ) {
75- const { messageName, commandName, data } = data ;
76- if ( messageName === null && commandName === null && data ) {
77- univerAPI . createWorkbook ( data ) ;
78- }
79- }
80- else {
81- univerAPI . createUniverSheet ( ) ;
82- }
73+ const { workboolData } = sheet . options . data || { } ;
74+ univerAPI . createWorkbook ( workboolData ) ;
8375
8476 sheet . univer = univer ;
8577 sheet . univerAPI = univerAPI ;
You can’t perform that action at this time.
0 commit comments