Add new store files and update table components

This commit is contained in:
probdg
2024-02-02 10:41:31 +07:00
parent a278bb353c
commit ecc64c7b61
26 changed files with 691 additions and 283 deletions

16
src/stores/media.ts Normal file
View File

@ -0,0 +1,16 @@
import { ref } from 'vue'
import { defineStore } from 'pinia'
export const useMediaStore = defineStore('media', () => {
const media = ref('')
const setData = (value: string) => {
media.value = value
}
const getData = () => {
return media.value
}
return {
setData,
getData,
}
})

View File

@ -0,0 +1,25 @@
import { ref } from 'vue'
import { defineStore } from 'pinia'
export const useTotalDuration = defineStore('totalDuration', () => {
const totalMin = ref()
const totalMax = ref()
const setDataMin = (value: Number) => {
totalMax.value = value
}
const getDataMin = () => {
return totalMax.value
}
const setDataMax = (value: Number) => {
totalMin.value = value
}
const getDataMax = () => {
return totalMin.value
}
return {
setDataMin,
getDataMin,
setDataMax,
getDataMax,
}
})

25
src/stores/totalReport.ts Normal file
View File

@ -0,0 +1,25 @@
import { ref } from 'vue'
import { defineStore } from 'pinia'
export const useTotalReport = defineStore('totalReport', () => {
const totalMin = ref()
const totalMax = ref()
const setDataMin = (value: Number) => {
totalMax.value = value
}
const getDataMin = () => {
return totalMax.value
}
const setDataMax = (value: Number) => {
totalMin.value = value
}
const getDataMax = () => {
return totalMin.value
}
return {
setDataMin,
getDataMin,
setDataMax,
getDataMax,
}
})