import { defineComponent } from 'vue' import useHotspotStore, { PlatformList } from './useHotspotStore' import clsx from 'clsx' import { BiCaretRightFill } from 'oh-vue-icons/icons' import jump from '@/utils/jump' import { addIcons, OhVueIcon } from 'oh-vue-icons' addIcons(BiCaretRightFill) export default defineComponent(() => { const store = useHotspotStore() return () => (
{[...PlatformList.entries()] .filter((_, idx) => idx === 0) .map(([key, value]) => (
{ store.type = key e.stopPropagation() }} class={clsx( ' py-2 cursor-pointer bg rounded-xl flex gap-x-1 relative', store.type === key ? 'text-[#4162ce] font-bold' : '' )} > {value} {store.type === key && ( bg )}
))}
{store.hotMap .get(store.type) ?.filter((_, idx) => idx < 5) .map((item, index) => (
{ jump(item.url) }} >
{index + 1}. {item.title}
{item.hotScore}
))}
) })