first commit
This commit is contained in:
17
app/stores/productTree.ts
Normal file
17
app/stores/productTree.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import type { ProductTree } from '~~/types/banner';
|
||||
|
||||
interface ProductTreeState {
|
||||
productTree: ProductTree[];
|
||||
}
|
||||
|
||||
export const useProductTreeStore = defineStore('productTree', {
|
||||
state: (): ProductTreeState => ({
|
||||
productTree: [],
|
||||
}),
|
||||
actions: {
|
||||
setProductTree(newProductTree: ProductTree[]): void {
|
||||
this.productTree = newProductTree;
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user