21 lines
564 B
TypeScript
21 lines
564 B
TypeScript
import { defineStore } from 'pinia'
|
|
import { ref } from 'vue'
|
|
|
|
export interface ChartState {
|
|
symbol: string
|
|
start_time: number | null
|
|
end_time: number | null
|
|
period: string
|
|
selected_shapes: string[]
|
|
}
|
|
|
|
export const useChartStore = defineStore('chartState', () => {
|
|
const symbol = ref<string>('BINANCE:BTC/USDT')
|
|
const start_time = ref<number | null>(null)
|
|
const end_time = ref<number | null>(null)
|
|
const period = ref<string>('15')
|
|
const selected_shapes = ref<string[]>([])
|
|
|
|
return { symbol, start_time, end_time, period, selected_shapes }
|
|
})
|