未验证 提交 a4520867 编写于 作者: L Lovell Liu 提交者: GitHub

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
上级 39188780
......@@ -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 };
},
......
<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>
......@@ -148,7 +148,7 @@ export const groupItems: GroupItem[] = [
{
title: 'Js',
icon: 'ion:logo-javascript',
color: '#4daf1bc9',
color: '#EBD94E',
desc: '路是走出来的,而不是空想出来的。',
group: '架构组',
date: '2021-04-01',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册