Fix/workbech page (#2264)

* fix: fix display issues when reloading page

* feat: change a fit color for js-logo icon

* fix: prevent layout chaos because of text wrap
This commit is contained in:
Lovell Liu 2022-10-12 16:17:42 +08:00 committed by GitHub
parent 39188780ea
commit a45208673a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 10 deletions

View File

@ -4,7 +4,7 @@
<a-button type="link" size="small">更多</a-button>
</template>
<CardGrid v-for="item in items" :key="item" class="!md:w-1/3 !w-full">
<CardGrid v-for="item in items" :key="item.title" class="!md:w-1/3 !w-full">
<span class="flex">
<Icon :icon="item.icon" :color="item.color" size="30" />
<span class="text-lg ml-4">{{ item.title }}</span>
@ -19,12 +19,12 @@
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { Card } from 'ant-design-vue';
import { Card, CardGrid } from 'ant-design-vue';
import { Icon } from '/@/components/Icon';
import { groupItems } from './data';
export default defineComponent({
components: { Card, CardGrid: Card.Grid, Icon },
components: { Card, CardGrid, Icon },
setup() {
return { items: groupItems };
},

View File

@ -1,17 +1,15 @@
<template>
<Card title="快捷导航" v-bind="$attrs">
<CardGrid v-for="item in navItems" :key="item">
<Card title="快捷导航">
<CardGrid v-for="item in navItems" :key="item.title">
<span class="flex flex-col items-center">
<Icon :icon="item.icon" :color="item.color" size="20" />
<span class="text-md mt-2">{{ item.title }}</span>
<span class="text-md mt-2 truncate">{{ item.title }}</span>
</span>
</CardGrid>
</Card>
</template>
<script lang="ts" setup>
import { Card } from 'ant-design-vue';
import { Card, CardGrid } from 'ant-design-vue';
import { navItems } from './data';
import { Icon } from '/@/components/Icon';
const CardGrid = Card.Grid;
</script>

View File

@ -148,7 +148,7 @@ export const groupItems: GroupItem[] = [
{
title: 'Js',
icon: 'ion:logo-javascript',
color: '#4daf1bc9',
color: '#EBD94E',
desc: '路是走出来的,而不是空想出来的。',
group: '架构组',
date: '2021-04-01',