<!--
 * @Author: micky 1254597151@qq.com
 * @Date: 2023-09-10 18:46:16
 * @LastEditors: micky 1254597151@qq.com
 * @LastEditTime: 2023-10-12 11:00:56
 * @FilePath: \housekeeping-admin\src\views\decorate\component\widgets\sticky-category\content.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
    <div class="stick-category">
        <ul class="flex h-[50px] items-center">
            <li
                class="text-center"
                v-for="(item, index) in props.content.data"
                :key="index"
                :style="{ width: itemWidth }"
            >
                {{ item.categoryName }}
            </li>
        </ul>
    </div>
</template>
<script lang="ts" setup>
import type { PropType } from 'vue'
import type options from '../banner/options'
import { computed } from 'vue'
type OptionsType = ReturnType<typeof options>
const props = defineProps({
    content: {
        type: Object as PropType<OptionsType['content']>,
        default: () => ({})
    },
    styles: {
        type: Object as PropType<OptionsType['styles']>,
        default: () => ({})
    }
})

const itemWidth = computed(() => {
    return 360 / props.content.data.length + 'px'
})
</script>
