Skip to content

Commit 59eb779

Browse files
committed
feat: update doc
1 parent 9ddd8b8 commit 59eb779

30 files changed

+988
-71
lines changed

.DS_Store

2 KB
Binary file not shown.

.dumi/pages/index-en/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import CustomHomePage from '../index';
2+
3+
export default CustomHomePage;

.dumi/pages/index/index.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* .dumi/pages/index.tsx */
2+
import HomeBaseLayout from 'dumi-theme-antd/dist/layouts/HomePageLayout';
3+
import React from 'react';
4+
5+
const CustomHomePage = () => {
6+
return (
7+
<div>
8+
<HomeBaseLayout />
9+
</div>
10+
);
11+
};
12+
13+
export default CustomHomePage;

.dumi/tsconfig.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"include": [
4+
"**/*"
5+
]
6+
}

.dumirc.ts

Lines changed: 111 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,79 @@
11
import { defineConfig } from 'dumi';
2+
import pkgJSON from './package.json';
23
import { defineThemeConfig } from 'dumi-theme-antd/dist/defineThemeConfig';
34

45
export default defineConfig({
6+
mfsu: false,
57
outputPath: 'docs-dist',
8+
ssr: process.env.NODE_ENV === 'development' ? false : {},
69
base: process.env.NODE_ENV === 'production' ? "/react-draggable-plus" : "/",
710
publicPath: process.env.NODE_ENV === 'production' ? "/react-draggable-plus/" : "/",
11+
favicons: ['https://vue-draggable-plus.pages.dev/logo.svg'],
12+
logo: 'https://vue-draggable-plus.pages.dev/logo.svg',
813
locales: [
9-
{ id: 'zh-CN', name: '中文' },
10-
{ id: 'en-US', name: 'EN' },
14+
{ id: 'zh-CN', name: '中文', suffix: '' },
15+
{ id: 'en-US', name: 'English', suffix: '-en' }
1116
],
1217
themeConfig: defineThemeConfig({
18+
lastUpdated: true,
1319
github: 'https://github.com/forestxieCode/react-draggable-plus',
1420
name: 'react-draggable-plus',
1521
title: 'React Draggable Plus',
1622
description: {
1723
'zh-CN': '基于Sortablejs封装的 React 拖拽组件',
1824
'en-US': 'React drag-and-drop component based on Sortablejs wrapping'
1925
},
20-
bannerConfigDefault: {
21-
showBanner: true
26+
bannerConfig: {
27+
showBanner: false
2228
},
29+
loading: {
30+
skeleton: ['/guide', '/api', '/components']
31+
},
32+
sidebarGroupModePath: ['/guide'],
33+
nav: {
34+
'zh-CN': [
35+
{ title: '指南', link: '/guide/dev' },
36+
{ title: '配置', link: '/api' },
37+
{ title: '演示', link: '/components/basic' }
38+
],
39+
'en-US': [
40+
{ title: 'Guide', link: '/guide/dev-en' },
41+
{ title: 'Api', link: '/api-en' },
42+
{ title: 'Demo', link: '/components/basic-en' }
43+
]
44+
},
45+
footer:
46+
'Made with by <span> forestxieCode | Copyright © 2024-present</span>',
47+
docVersions: {
48+
[pkgJSON.version]: ''
49+
},
50+
localesEnhance: [
51+
{ id: 'zh-CN', switchPrefix: '中' },
52+
{ id: 'en-US', switchPrefix: 'en' }
53+
],
2354
actions: {
24-
'zh-CN': [{ text: '开始', link: '/guide' }, { type: 'primary', text: '演示', link: '/components/basic' }],
25-
'en-US': [{ text: 'Start', link: '/guide' }, { type: 'primary', text: 'Demo', link: '/components/basic' }],
55+
'zh-CN': [
56+
{
57+
text: '开始',
58+
link: '/guide/dev'
59+
},
60+
{
61+
type: 'primary',
62+
text: '演示',
63+
link: '/components/basic'
64+
}
65+
],
66+
'en-US': [
67+
{
68+
text: 'Start',
69+
link: '/guide/dev'
70+
},
71+
{
72+
type: 'primary',
73+
text: 'Demo',
74+
link: '/components/basic'
75+
}
76+
],
2677
},
2778
features: {
2879
'zh-CN': [
@@ -36,6 +87,60 @@ export default defineConfig({
3687
{ title: 'Custom containers', details: 'Drag and drop the specified container'}
3788
],
3889
},
90+
footerLinks: [
91+
{
92+
title: '相关资源',
93+
items: [
94+
{
95+
title: 'SortableJS',
96+
description: '组件/文档研发工具',
97+
url: 'https://github.com/SortableJS/Sortable',
98+
openExternal: true
99+
}
100+
]
101+
},
102+
{
103+
title: '帮助',
104+
items: [
105+
{
106+
icon: 'https://github-production-user-asset-6210df.s3.amazonaws.com/20694238/256181695-b05fa72a-4ab5-479d-bb74-3d723755de47.png',
107+
title: 'GitHub',
108+
url: 'https://github.com/forestxieCode/react-draggable-plus',
109+
openExternal: true
110+
},
111+
{
112+
icon: 'https://github-production-user-asset-6210df.s3.amazonaws.com/20694238/256181710-8e63ee99-ed71-4ee6-8507-d5ffac02ca51.png',
113+
title: '更新日志',
114+
url: '/react-draggable-plus/guide/changelog'
115+
},
116+
{
117+
icon: 'https://github-production-user-asset-6210df.s3.amazonaws.com/20694238/256181680-3b031d0f-1c51-48d2-a676-b2f82aa23e09.png',
118+
title: '报告 Bug',
119+
url: 'https://github.com/forestxieCode/react-draggable-plus/issues/new',
120+
openExternal: true
121+
},
122+
{
123+
icon: 'https://github-production-user-asset-6210df.s3.amazonaws.com/20694238/256181701-b51d6a6f-3190-4525-80d0-43ac194437c9.png',
124+
title: '议题',
125+
url: 'https://github.com/forestxieCode/react-draggable-plus/issues',
126+
openExternal: true
127+
}
128+
]
129+
},
130+
{
131+
title: '更多产品',
132+
icon: 'https://gw.alipayobjects.com/zos/rmsportal/nBVXkrFdWHxbZlmMbsaH.svg',
133+
items: [
134+
{
135+
icon: 'https://camo.githubusercontent.com/fc21de86d7ca0befa6f1fff76890a03c117e7b083c4a75e3dd3c117197c1e09b/68747470733a2f2f692e706f7374696d672e63632f476835704c5a33472f6c6f676f2d30332e706e67',
136+
title: '企业组件库',
137+
url: 'https://forestxiecode.github.io/fst-ui/#/',
138+
description: '构建公司组件库',
139+
openExternal: true
140+
}
141+
]
142+
}
143+
],
39144
}),
40145
plugins: [
41146
require.resolve('@umijs/plugins/dist/unocss')

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ npm install react-draggable-plus
3333

3434
```ts
3535
import React, { useRef, useState } from "react"
36-
import { ReactDraggablePlush } from "react-draggable-plus"
36+
import { ReactDraggablePlus } from "react-draggable-plus"
3737
const Demo = () => {
3838
const el = useRef<any>(null)
3939
const [list, setList] = useState([{
@@ -53,7 +53,7 @@ const Demo = () => {
5353
id: 4
5454
}])
5555
return <>
56-
<ReactDraggablePlush
56+
<ReactDraggablePlus
5757
ref={el}
5858
list={list}
5959
setList={setList}
@@ -66,7 +66,7 @@ const Demo = () => {
6666
return <div className="cursor-move h-30 bg-gray-500/5 rounded p-3" key={item.id}>{item.name}</div>
6767
})
6868
}
69-
</ReactDraggablePlush>
69+
</ReactDraggablePlus>
7070
</>
7171
}
7272
export default Demo
File renamed without changes.
File renamed without changes.

docs/guide/changelog.en-US.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
order: 1
3+
title: Change Log
4+
timeline: true
5+
tag:
6+
title: '0.0.2'
7+
color: success
8+
---
9+
10+
`react-draggable-plus` 严格遵循 [Semantic Versioning 2.0.0](http://semver.org/lang/zh-CN/) 语义化版本规范。.
11+
12+
## 0.0.2
13+
14+
`2024-07-27`
15+
16+
- 🛠 优化 SSR 样式提取逻辑。
17+
- 💄 调整 `RTL` icon。

docs/guide/changelog.zh-CN.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
order: 1
3+
title: 更新日志
4+
timeline: true
5+
tag:
6+
title: '0.0.2'
7+
color: success
8+
---
9+
10+
`react-draggable-plus` 严格遵循 [Semantic Versioning 2.0.0](http://semver.org/lang/zh-CN/) 语义化版本规范。
11+
12+
## 0.0.2
13+
14+
`2024-07-27`
15+
16+
- 🛠 优化 SSR 样式提取逻辑。
17+
- 💄 调整 `RTL` icon。

0 commit comments

Comments
 (0)