Skip to content

Commit 2b8bdf3

Browse files
committed
doc: update
1 parent 2efe1af commit 2b8bdf3

File tree

4 files changed

+78
-13
lines changed

4 files changed

+78
-13
lines changed

components/table/demo/index.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
<Summary />
2929
<Responsive />
3030
<TemplateCom />
31-
<bigData />
3231
</demo-sort>
3332
</template>
3433

@@ -61,7 +60,6 @@ import MultipleSorter from './multiple-sorter.vue';
6160
import Summary from './summary.vue';
6261
import Sticky from './sticky.vue';
6362
import ResizableColumn from './resizable-column.vue';
64-
import bigData from './big-data.vue';
6563
import Responsive from './responsive.vue';
6664
import CN from '../index.zh-CN.md';
6765
import US from '../index.en-US.md';
@@ -98,7 +96,6 @@ export default defineComponent({
9896
Summary,
9997
Sticky,
10098
ResizableColumn,
101-
bigData,
10299
Responsive,
103100
},
104101
});

site/src/components/surelyVue.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<img height="80" src="https://www.surely.cool/surely-vue-logo.png" alt="" />
66
</div>
77
<div class="desc">
8-
<div class="title">高性能 Surely Vue</div>
8+
<div class="title">Surely Vue</div>
99
<div class="sub-title">
1010
构建更快的网站
1111
<br />

site/src/layouts/index.vue

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,13 @@
4848
v-for="h in headers"
4949
:key="h.title"
5050
:href="h.href || `#${slugifyTitle(h.title)}`"
51-
:title="h.title"
52-
></a-anchor-link>
51+
:target="h.target"
52+
>
53+
<template #title>
54+
<LinkOutlined v-if="h.target" />
55+
{{ isZhCN ? h.title : h.enTitle || h.title }}
56+
</template>
57+
</a-anchor-link>
5358
</a-anchor>
5459
</a-affix>
5560
</section>
@@ -90,7 +95,7 @@ import useMenus from '../hooks/useMenus';
9095
import TopAd from '../components/rice/top_rice.vue';
9196
import Sponsors from '../components/rice/sponsors.vue';
9297
import RightBottomAd from '../components/rice/right_bottom_rice.vue';
93-
import { CloseOutlined, MenuOutlined } from '@ant-design/icons-vue';
98+
import { CloseOutlined, MenuOutlined, LinkOutlined } from '@ant-design/icons-vue';
9499
import ThemeIcon from './ThemeIcon.vue';
95100
import surelyVueVue from '../components/surelyVue.vue';
96101
import WWAdsVue from '../components/rice/WWAds.vue';
@@ -114,6 +119,7 @@ export default defineComponent({
114119
ThemeIcon,
115120
surelyVueVue,
116121
WWAdsVue,
122+
LinkOutlined,
117123
},
118124
setup() {
119125
const visible = ref(false);
@@ -147,6 +153,9 @@ export default defineComponent({
147153
route.path.indexOf('/components') === 0 && route.path.indexOf('/components/overview') !== 0
148154
);
149155
});
156+
const isTablePage = computed(() => {
157+
return route.path.indexOf('/components/table') === 0;
158+
});
150159
const matchCom = computed(() => {
151160
return route.matched[route.matched.length - 1]?.components?.default;
152161
});
@@ -157,11 +166,43 @@ export default defineComponent({
157166
: (matchCom.value as any)?.pageData,
158167
);
159168
const headers = computed(() => {
169+
let tempHeaders = (pageData.value?.headers || []).filter((h: Header) => h.level === 2);
160170
if (isDemo.value) {
161-
return [...demos.value, { title: 'API', href: '#API' }];
162-
} else {
163-
return (pageData.value?.headers || []).filter((h: Header) => h.level === 2);
171+
tempHeaders = [...demos.value];
172+
if (isTablePage.value) {
173+
tempHeaders.push(
174+
...[
175+
{
176+
title: '大数据渲染',
177+
enTitle: 'Virtualized Table',
178+
href: 'https://surely.cool/doc/performance',
179+
target: '_blank',
180+
},
181+
{
182+
title: '行拖拽排序',
183+
enTitle: 'Row Drag Sort',
184+
href: 'https://surely.cool/doc/dragable#drag-row',
185+
target: '_blank',
186+
},
187+
{
188+
title: '列拖拽排序',
189+
enTitle: 'Column Drag Sort',
190+
href: 'https://surely.cool/doc/dragable#drag-column',
191+
target: '_blank',
192+
},
193+
{
194+
title: '更多高性能示例',
195+
enTitle: 'More high-performance examples ',
196+
href: 'https://surely.cool',
197+
target: '_blank',
198+
},
199+
],
200+
);
201+
}
202+
tempHeaders.push({ title: 'API', href: '#API' });
164203
}
204+
205+
return tempHeaders;
165206
});
166207
167208
const mainContainerClass = computed(() => {

site/src/views/ComponentOverview.vue

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,14 @@
3535
<a-row :gutter="[24, 24]">
3636
<template v-for="component in group.children" :key="component.title">
3737
<a-col :xs="24" :sm="12" :lg="8" :xl="6">
38-
<router-link :to="getLocalizedPathname(component.path, isZhCN)">
38+
<component
39+
:is="component.target ? 'a' : 'router-link'"
40+
v-bind="
41+
component.target
42+
? { href: component.path, target: component.target }
43+
: { to: getLocalizedPathname(component.path, isZhCN) }
44+
"
45+
>
3946
<a-card size="small" class="components-overview-card">
4047
<template #title>
4148
<div class="components-overview-title">
@@ -47,7 +54,7 @@
4754
<img :src="component.cover" :alt="component.title" />
4855
</div>
4956
</a-card>
50-
</router-link>
57+
</component>
5158
</a-col>
5259
</template>
5360
</a-row>
@@ -84,8 +91,28 @@ export default defineComponent({
8491
);
8592
return { ...group, children: components };
8693
})
87-
.filter(i => i.children.length);
94+
.filter(i => i.children.length)
95+
.concat([
96+
{
97+
children: [
98+
{
99+
category: 'Components',
100+
cols: 1,
101+
cover: 'https://gw.alipayobjects.com/zos/alicdn/f-SbcX2Lx/Table.svg',
102+
path: 'https://surely.cool/',
103+
subtitle: '更强大的表格',
104+
title: 'Powerful Table',
105+
type: 'Advanced And Powerful',
106+
target: '_blank',
107+
},
108+
],
109+
enTitle: 'Advanced And Powerful',
110+
title: '更强大',
111+
order: 0,
112+
},
113+
]);
88114
});
115+
console.log(menuItems.value);
89116
onMounted(() => {
90117
inputRef.value.focus();
91118
});

0 commit comments

Comments
 (0)