Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<Version>9.0.0-beta09</Version>
<Version>9.0.0</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
11 changes: 7 additions & 4 deletions src/components/BootstrapBlazor.UniverSheet/wwwroot/univer.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ export async function createUniverSheetAsync(sheet) {
const { UniverSheetsDataValidationPlugin } = UniverSheetsDataValidation
const { UniverSheetsDataValidationUIPlugin } = UniverSheetsDataValidationUi
const { defaultTheme } = UniverDesign;

const options = {
theme: defaultTheme,
locale: LocaleType.ZH_CN,
theme: sheet.options.theme ?? defaultTheme,
locale: sheet.options.lang ?? LocaleType.ZH_CN,
locales: {
[LocaleType.ZH_CN]: merge(
{},
Expand Down Expand Up @@ -69,9 +70,11 @@ export async function createUniverSheetAsync(sheet) {
...options
});

const { data } = sheet.options;
const { data: { data } = {} } = sheet.options;
if (data) {
univerAPI.createWorkbook(typeof data.data === 'object' ? data.data : JSON.parse(data.data));
const template = typeof data.template === 'string' ? JSON.parse(data.template) : data.template;
template && delete data.template;
univerAPI.createWorkbook(merge({}, template, { customData: data }));
delete sheet.options.data;
}
else {
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.