Add new store files and update table components
This commit is contained in:
16
src/stores/media.ts
Normal file
16
src/stores/media.ts
Normal 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,
|
||||
}
|
||||
})
|
25
src/stores/totalDuration.ts
Normal file
25
src/stores/totalDuration.ts
Normal 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
25
src/stores/totalReport.ts
Normal 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,
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user