create-quasar 1.0.29 → 1.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/templates/app/quasar-v2/ts-vite/pinia/src/stores/index.ts +12 -0
- package/templates/app/quasar-v2/ts-vite/vuex/src/store/index.ts +8 -0
- package/templates/app/quasar-v2/ts-webpack/pinia/src/stores/index.ts +12 -0
- package/templates/app/quasar-v2/ts-webpack/vuex/src/store/index.ts +8 -0
package/package.json
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { store } from 'quasar/wrappers'
|
|
2
2
|
import { createPinia } from 'pinia'
|
|
3
|
+
import { Router } from 'vue-router';
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* When adding new properties to stores, you should also
|
|
7
|
+
* extend the `PiniaCustomProperties` interface.
|
|
8
|
+
* @see https://pinia.vuejs.org/core-concepts/plugins.html#typing-new-store-properties
|
|
9
|
+
*/
|
|
10
|
+
declare module 'pinia' {
|
|
11
|
+
export interface PiniaCustomProperties {
|
|
12
|
+
readonly router: Router;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
3
15
|
|
|
4
16
|
/*
|
|
5
17
|
* If not building with SSR mode, you can
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { store } from 'quasar/wrappers'
|
|
2
2
|
import { InjectionKey } from 'vue'
|
|
3
|
+
import { Router } from 'vue-router'
|
|
3
4
|
import {
|
|
4
5
|
createStore,
|
|
5
6
|
Store as VuexStore,
|
|
@@ -35,6 +36,13 @@ declare module '@vue/runtime-core' {
|
|
|
35
36
|
// provide typings for `useStore` helper
|
|
36
37
|
export const storeKey: InjectionKey<VuexStore<StateInterface>> = Symbol('vuex-key')
|
|
37
38
|
|
|
39
|
+
// Provide typings for `this.$router` inside Vuex stores
|
|
40
|
+
declare module "vuex" {
|
|
41
|
+
export interface Store<S> {
|
|
42
|
+
readonly $router: Router;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
38
46
|
export default store(function (/* { ssrContext } */) {
|
|
39
47
|
const Store = createStore<StateInterface>({
|
|
40
48
|
modules: {
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { store } from 'quasar/wrappers'
|
|
2
2
|
import { createPinia } from 'pinia'
|
|
3
|
+
import { Router } from 'vue-router';
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* When adding new properties to stores, you should also
|
|
7
|
+
* extend the `PiniaCustomProperties` interface.
|
|
8
|
+
* @see https://pinia.vuejs.org/core-concepts/plugins.html#typing-new-store-properties
|
|
9
|
+
*/
|
|
10
|
+
declare module 'pinia' {
|
|
11
|
+
export interface PiniaCustomProperties {
|
|
12
|
+
readonly router: Router;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
3
15
|
|
|
4
16
|
/*
|
|
5
17
|
* If not building with SSR mode, you can
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { store } from 'quasar/wrappers'
|
|
2
2
|
import { InjectionKey } from 'vue'
|
|
3
|
+
import { Router } from 'vue-router'
|
|
3
4
|
import {
|
|
4
5
|
createStore,
|
|
5
6
|
Store as VuexStore,
|
|
@@ -35,6 +36,13 @@ declare module '@vue/runtime-core' {
|
|
|
35
36
|
// provide typings for `useStore` helper
|
|
36
37
|
export const storeKey: InjectionKey<VuexStore<StateInterface>> = Symbol('vuex-key')
|
|
37
38
|
|
|
39
|
+
// Provide typings for `this.$router` inside Vuex store
|
|
40
|
+
declare module "vuex" {
|
|
41
|
+
export interface Store<S> {
|
|
42
|
+
readonly $router: Router;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
38
46
|
export default store(function (/* { ssrContext } */) {
|
|
39
47
|
const Store = createStore<StateInterface>({
|
|
40
48
|
modules: {
|