Skip to content

Commit

Permalink
feat: update StylingSetting
Browse files Browse the repository at this point in the history
  • Loading branch information
pomelo-nwu committed Nov 1, 2023
1 parent 81aa4d3 commit 7c7f629
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/gi-assets-advance/src/services/StyleSetting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ export interface ServiceObject {
export const StyleSetting: ServiceObject = {
name: $i18n.get({ id: 'advance.src.services.StyleSetting.StyleSettings', dm: '样式设置' }),
service: async (elementConfig: GIConfig['nodes'] | GIConfig['edges'], elementType: string) => {
const { GI_SITE_PROJECT_ID: projectId } = utils.getProjectContext();
if (projectId) {
const { GI_SITE_PROJECT_ID } = utils.getProjectContext();
if (GI_SITE_PROJECT_ID) {
//@ts-ignore
const { localforage } = window;
const { GI_PROJECT_DB } = window;
// debugger
const project = await localforage?.getItem(projectId);
const project = await GI_PROJECT_DB?.getItem(GI_SITE_PROJECT_ID);
project.projectConfig[elementType] = elementConfig;

localforage.setItem(projectId, {
GI_PROJECT_DB.setItem(GI_SITE_PROJECT_ID, {
...project,
});
}
Expand Down

0 comments on commit 7c7f629

Please sign in to comment.