import { computed } from 'vue'
import { futuresStore } from '@/stores'
import subscribe from '@/services/subscribe'

// 期货行情列表
export function useFuturesList() {
    const dataList = computed(() => futuresStore.getters.quoteList.filter((e) => e.marketid === 99201))
    const quoteSubscribe = subscribe.addQuoteSubscribe(dataList.value.map((e) => e.goodscode))

    return {
        dataList,
        quoteSubscribe,
    }
}