Skip to content

Commit

Permalink
chore: provider load
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Sep 25, 2021
1 parent 939f11e commit dac1f58
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/components/editor/aside/EditorAside.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
dark:text-gray-500 dark:hover:text-gray-200
bg-gray-200
dark:bg-gray-800
rounded-br
"
:class="
open ? 'left-32 md:left-40 lg:left-50 xl:left-60' : ''
rounded-br
"
:class="open ? 'left-32 md:left-40 lg:left-50 xl:left-60' : ''"
@click="open = !open"
>
<svg
Expand Down
1 change: 1 addition & 0 deletions src/components/provider/ProviderApp.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<EditorCommands v-if="store.state.absolute.commands" />
<ProviderLoad v-if="store.state.absolute.load" />
</template>

<script setup lang="ts">
Expand Down
3 changes: 3 additions & 0 deletions src/components/provider/ProviderLoad.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<div></div>
</template>
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ app.use(Toast, {
maxToasts: 3,
})

router.isReady().then(() => app.mount('#app'))
router.isReady().then(() => app.mount('#app'))
1 change: 1 addition & 0 deletions src/store/module/absolute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default {
state: () =>
({
commands: false,
load: false,
} as AbsoluteState),
mutations: {
commands(state: any) {
Expand Down
1 change: 1 addition & 0 deletions src/types/absolute.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export interface AbsoluteState {
commands: boolean
load: boolean
}
5 changes: 4 additions & 1 deletion src/use/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ export const usePage: Callback<any> = () => {
store.commit('project/deletePage', store.state.context)
await nextTick

store.commit('context/load', store.state.project.pages[store.state.project.pages.length - 1])
store.commit(
'context/load',
store.state.project.pages[store.state.project.pages.length - 1]
)
}

return { onCreatePage, onDeletePage }
Expand Down

0 comments on commit dac1f58

Please sign in to comment.