WIP #300 Tried to extract out an independent vue component to prevent shared primevue option

This commit is contained in:
Cindy Chang
2024-06-13 09:48:19 +08:00
parent c016e2aa41
commit 310c416fd7
3 changed files with 64 additions and 6 deletions

View File

@@ -4,6 +4,8 @@ import apiError from '@/module/apiError.js';
export default defineStore('performanceStore', {
state: () => ({
allPerformanceData: null,
freqChartData: null,
freqChartOptions: null,
}),
getters: {
performanceData: state => {
@@ -33,6 +35,20 @@ export default defineStore('performanceStore', {
} catch(error) {
apiError(error, 'Failed to load the Performance.');
}
}
},
/**
* In PrimeVue format
* @param {object} freqChartData
*/
setFreqChartData(freqChartData){
this.freqChartData = freqChartData;
},
/**
* In PrimeVue format
* @param {object} freqChartOptions
*/
setFreqChartOptions(freqChartOptions){
this.freqChartOptions = freqChartOptions;
},
},
})