| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <template>
- <!-- 标题+4网格按钮+带图标按钮 -->
- <HomeTitle :title="title">
- <template v-if="titleRightButtons" #right>
- <FlexRow align="center" gap="gap.md">
- <FrameButton
- v-for="item in titleRightButtons"
- :key="item.text"
- :text="item.text"
- :size="item.size || 'small'"
- :primary="item.primary || false"
- @click="() => emit('click', item.handler)"
- />
- <Width :size="15" />
- </FlexRow>
- </template>
- </HomeTitle>
- <Height height="gap.md" />
- <Grid :borderGrid="false" :mainAxisCount="4">
- <GridItem
- v-for="item in items"
- :key="item.title"
- :title="item.title"
- :icon="item.icon"
- touchable
- @click="() => emit('click', item.handler)"
- />
- </Grid>
- </template>
- <script setup lang="ts">
- import FrameButton from '@/common/components/FrameButton.vue';
- import HomeTitle from '@/common/components/parts/HomeTitle.vue';
- import FlexRow from '@/components/layout/FlexRow.vue';
- import Grid from '@/components/layout/grid/Grid.vue';
- import GridItem from '@/components/layout/grid/GridItem.vue';
- import Height from '@/components/layout/space/Height.vue';
- import Width from '@/components/layout/space/Width.vue';
- const props = defineProps<{
- title: string,
- titleRightButtons?: {
- handler: string,
- text?: string,
- icon?: string,
- primary?: boolean,
- size?: "large" | "medium" | "small",
- }[],
- items: {
- title: string,
- icon: string,
- handler: string,
- }[],
- }>()
- const emit = defineEmits<{
- (e: 'click', script: string): void
- }>()
- </script>
|