Skip to content

Commit

Permalink
docs: Fill the cover & cat of overview (#192)
Browse files Browse the repository at this point in the history
* docs: reorder site

* docs: all cover

* test: update snapshot
  • Loading branch information
zombieJ authored Nov 20, 2024
1 parent 5bf21c7 commit 7f19776
Show file tree
Hide file tree
Showing 31 changed files with 774 additions and 3,602 deletions.
22 changes: 11 additions & 11 deletions .dumi/theme/builtins/ComponentOverview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import scrollIntoView from 'scroll-into-view-if-needed';
import Link from '../../common/Link';
import SiteContext from '../../slots/SiteContext';
import type { Component } from './ProComponentsList';
import proComponentsList from './ProComponentsList';
// import proComponentsList from './ProComponentsList';

const useStyle = createStyles(({ token, css }) => ({
componentsOverviewGroupTitle: css`
Expand Down Expand Up @@ -131,16 +131,16 @@ const Overview: React.FC = () => {
coverDark: child.frontmatter?.coverDark,
link: child.link,
})),
}))
.concat([
{
title: locale === 'zh-CN' ? '重型组件' : 'Others',
children:
locale === 'zh-CN'
? proComponentsList
: proComponentsList.map((component) => ({ ...component, subtitle: '' })),
},
]),
})),
// .concat([
// {
// title: locale === 'zh-CN' ? '重型组件' : 'Others',
// children:
// locale === 'zh-CN'
// ? proComponentsList
// : proComponentsList.map((component) => ({ ...component, subtitle: '' })),
// },
// ])
[data, locale],
);
return (
Expand Down
32 changes: 22 additions & 10 deletions .dumi/theme/themeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,35 @@ export default {
typeOrder: {
// Component
Overview: -1,
UI: 0,
Runtime: 1,
Tool: 2,
Other: 3,
// UI: 0,
// Runtime: 1,
// Tool: 2,
// Other: 3,
Common: 0,
Wake: 1,
Express: 2,
Confirm: 3,
Feedback: 4,
Tools: 5,

总览: -1,
用户界面: 0,
运行时: 1,
工具: 2,
其他: 3,
// 用户界面: 0,
// 运行时: 1,
// 工具: 2,
// 其他: 3,
通用: 0,
唤醒: 1,
表达: 2,
确认: 3,
反馈: 4,
工具: 5,

// Design
原则: 1,
Principles: 1,
全局规则: 2,
重型组件: 8,
ProComponents: 8,
// 重型组件: 8,
// ProComponents: 8,
'Global Rules': 2,
模板文档: 3,
'Template Document': 3,
Expand Down
2 changes: 1 addition & 1 deletion components/attachments/FileList/FileListCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ function FileListCard(props: FileListCardProps, ref: React.Ref<HTMLDivElement>)
// ============================= Render =============================
let content: React.ReactNode = null;
const previewUrl = item.thumbUrl || item.url || previewImg;
const isImgPreview = isImg && item.originFileObj;
const isImgPreview = isImg && (item.originFileObj || previewUrl);

if (isImgPreview) {
// Preview Image style
Expand Down
Loading

0 comments on commit 7f19776

Please sign in to comment.