mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 13:41:23 +00:00
Upgrade Pinia from v2 to v3 (#596)
Migrate all 37 store definitions from the deprecated object-with-id
signature to the string-id-first signature required by Pinia 3:
defineStore({ id: 'name', ... }) → defineStore('name', { ... })
This commit is contained in:
committed by
GitHub
parent
ad5a7e51b9
commit
3ceb08bc31
3
resources/scripts/stores/dialog.js
vendored
3
resources/scripts/stores/dialog.js
vendored
@@ -4,8 +4,7 @@ export const useDialogStore = (useWindow = false) => {
|
||||
const defineStoreFunc = useWindow ? window.pinia.defineStore : defineStore
|
||||
const { global } = window.i18n
|
||||
|
||||
return defineStoreFunc({
|
||||
id: 'dialog',
|
||||
return defineStoreFunc('dialog', {
|
||||
state: () => ({
|
||||
active: false,
|
||||
title: '',
|
||||
|
||||
4
resources/scripts/stores/modal.js
vendored
4
resources/scripts/stores/modal.js
vendored
@@ -4,9 +4,7 @@ export const useModalStore = (useWindow = false) => {
|
||||
const defineStoreFunc = useWindow ? window.pinia.defineStore : defineStore
|
||||
const { global } = window.i18n
|
||||
|
||||
return defineStoreFunc({
|
||||
id: 'modal',
|
||||
|
||||
return defineStoreFunc('modal', {
|
||||
state: () => ({
|
||||
active: false,
|
||||
content: '',
|
||||
|
||||
4
resources/scripts/stores/notification.js
vendored
4
resources/scripts/stores/notification.js
vendored
@@ -3,9 +3,7 @@ import { defineStore } from 'pinia'
|
||||
export const useNotificationStore = (useWindow = false) => {
|
||||
const defineStoreFunc = useWindow ? window.pinia.defineStore : defineStore
|
||||
|
||||
return defineStoreFunc({
|
||||
id: 'notification',
|
||||
|
||||
return defineStoreFunc('notification', {
|
||||
state: () => ({
|
||||
active: false,
|
||||
autoHide: true,
|
||||
|
||||
Reference in New Issue
Block a user