18 lines
383 B
JavaScript
18 lines
383 B
JavaScript
import { defineStore } from "pinia";
|
|
import { reactive } from "vue";
|
|
|
|
export const useRangePriceStore = defineStore("range-price", () => {
|
|
const rangeValue = reactive({
|
|
min: 0,
|
|
max: 200,
|
|
});
|
|
|
|
function handlePriceRange({ min, max }) {
|
|
console.log({ min, max });
|
|
rangeValue.min = min;
|
|
rangeValue.max = max;
|
|
}
|
|
|
|
return { rangeValue, handlePriceRange };
|
|
});
|