Merge branch 'main' into vue-3
This commit is contained in:
4
resources/js/stores/workspaces.js
vendored
4
resources/js/stores/workspaces.js
vendored
@@ -57,6 +57,10 @@ export const useWorkspacesStore = defineStore('workspaces', {
|
||||
},
|
||||
remove (itemId) {
|
||||
this.content = this.content.filter((val) => val.id !== itemId)
|
||||
if (this.currentId === itemId) {
|
||||
this.currentId = this.content.length > 0 ? this.content[0].id : null
|
||||
localStorage.setItem(localStorageCurrentWorkspaceKey, this.currentId)
|
||||
}
|
||||
},
|
||||
startLoading () {
|
||||
this.loading = true
|
||||
|
||||
Reference in New Issue
Block a user