Skip to content

Commit 5e60d7c

Browse files
committed
doc: add surely form
1 parent 7252149 commit 5e60d7c

File tree

6 files changed

+108
-53
lines changed

6 files changed

+108
-53
lines changed

site/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
data-sf-delay-visible="false"
8181
data-sf-width="350px"
8282
data-sf-height="450px"
83+
data-sf-preload="true"
8384
></div>
8485
<script async src="//aliyuncdn.antdv.com/form/static/embed/v1.js"></script>
8586
</body>

site/src/layouts/Menu.vue

+23
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,29 @@
1010
{{ isZhCN ? '组件总览' : 'Components Overview' }}
1111
</router-link>
1212
</a-menu-item>
13+
<a-menu-item-group v-if="isZhCN" title="高级组件">
14+
<a-menu-item key="surely-table">
15+
<a
16+
href="https://www.surely.cool"
17+
target="_blank"
18+
rel="noopener noreferrer"
19+
style="position: relative"
20+
>
21+
Surely Table
22+
</a>
23+
</a-menu-item>
24+
<a-menu-item key="surely-form">
25+
<a
26+
href="https://form.antdv.com"
27+
target="_blank"
28+
rel="noopener noreferrer"
29+
style="position: relative"
30+
>
31+
Surely Form
32+
<a-badge color="red" style="position: absolute; top: -18px; right: -15px" />
33+
</a>
34+
</a-menu-item>
35+
</a-menu-item-group>
1336
<template v-for="m in menus">
1437
<template v-if="m.children">
1538
<a-menu-item-group :key="m.order" :title="isZhCN ? m.title : m.enTitle">

site/src/layouts/header/Navigation.vue

+29-11
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,35 @@
1616
{{ $t('app.header.menu.components') }}
1717
</router-link>
1818
</a-menu-item>
19-
<a-menu-item v-if="isZhCN" key="surely-vue">
20-
<a
21-
href="https://www.surely.cool"
22-
target="_blank"
23-
rel="noopener noreferrer"
24-
style="position: relative"
25-
>
26-
高级组件
27-
<a-badge color="red" style="position: absolute; top: -35px; right: -15px" />
28-
</a>
29-
</a-menu-item>
19+
<a-sub-menu v-if="isZhCN" key="advanced">
20+
<template #title>
21+
<span style="position: relative">
22+
高级组件
23+
<a-badge color="red" style="position: absolute; top: -35px; right: -15px" />
24+
</span>
25+
</template>
26+
<a-menu-item key="surely-table">
27+
<a
28+
href="https://www.surely.cool"
29+
target="_blank"
30+
rel="noopener noreferrer"
31+
style="position: relative"
32+
>
33+
Surely Table
34+
</a>
35+
</a-menu-item>
36+
<a-menu-item key="surely-form">
37+
<a
38+
href="https://form.antdv.com"
39+
target="_blank"
40+
rel="noopener noreferrer"
41+
style="position: relative"
42+
>
43+
Surely Form
44+
<a-badge color="red" style="position: absolute; top: -18px; right: -15px" />
45+
</a>
46+
</a-menu-item>
47+
</a-sub-menu>
3048
<a-menu-item key="store">
3149
<a
3250
href="https://store.antdv.com/pro/"

site/src/layouts/header/index.vue

+5-11
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,9 @@
1616

1717
<CloseOutlined class="close-icon" @click="visibleAdblockBanner = false" />
1818
</div>
19-
<div v-if="visibleAlertBanner" class="alert-banner">
20-
<template v-if="isZhCN">
21-
Ant Design Vue 3 已正式发布,并成为默认文档。
22-
<a href="https://www.antdv.com/docs/vue/migration-v3-cn">升级文档</a>
23-
</template>
24-
<template v-else>
25-
Ant Design Vue 3 is now the new default version!
26-
<a href="https://www.antdv.com/docs/vue/migration-v3">Update Doc</a>
27-
</template>
19+
<div v-if="visibleAlertBanner && isZhCN" class="alert-banner">
20+
Surely Form 1.0 发布,快速搭建在线问卷,无缝嵌入各种系统,限时限量加群,记得扫码哦
21+
<a href="https://form.antdv.com">立即体验</a>
2822

2923
<CloseOutlined class="close-icon" @click="visibleAlertBanner = false" />
3024
</div>
@@ -134,10 +128,10 @@ export default defineComponent({
134128
watch(globalConfig?.blocked, val => {
135129
visibleAdblockBanner.value = val;
136130
});
137-
const visibleAlertBanner = ref(!localStorage.getItem('v3'));
131+
const visibleAlertBanner = ref(!localStorage.getItem('surelyform'));
138132
watch(visibleAlertBanner, () => {
139133
if (!visibleAlertBanner.value) {
140-
localStorage.setItem('v3', version);
134+
localStorage.setItem('surelyform', version);
141135
}
142136
});
143137
return {

site/src/views/ComponentOverview.less

+6
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@
4343
color: #bbb;
4444
}
4545
}
46+
47+
.components-overview-img img {
48+
object-fit: cover;
49+
max-height: 100%;
50+
max-width: 100%;
51+
}

site/src/views/ComponentOverview.vue

+44-31
Original file line numberDiff line numberDiff line change
@@ -80,37 +80,50 @@ export default defineComponent({
8080
const inputRef = ref();
8181
const { dataSource } = useMenus();
8282
const menuItems = computed(() => {
83-
return dataSource.value
84-
.filter(i => i.order > -1)
85-
.map(group => {
86-
const components = group.children.filter(
87-
(component: any) =>
88-
!search.value.trim() ||
89-
component.title.toLowerCase().includes(search.value.trim().toLowerCase()) ||
90-
(component.subtitle || '').toLowerCase().includes(search.value.trim().toLowerCase()),
91-
);
92-
return { ...group, children: components };
93-
})
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-
]);
83+
return [
84+
{
85+
children: [
86+
{
87+
category: 'Components',
88+
cols: 1,
89+
cover: 'https://gw.alipayobjects.com/zos/alicdn/f-SbcX2Lx/Table.svg',
90+
path: 'https://surely.cool/',
91+
subtitle: '更强大的表格',
92+
title: 'Surely Table',
93+
type: 'Advanced And Powerful',
94+
target: '_blank',
95+
},
96+
{
97+
category: 'Components',
98+
cols: 1,
99+
cover: 'https://aliyuncdn.antdv.com/form/static/assets/landing-config.4f9d5425.png',
100+
path: 'https://form.antdv.com/',
101+
subtitle: '在线表单',
102+
title: 'Surely Form',
103+
type: 'Advanced And Powerful',
104+
target: '_blank',
105+
},
106+
],
107+
enTitle: 'Advanced And Powerful',
108+
title: '更强大',
109+
order: 0,
110+
},
111+
].concat(
112+
dataSource.value
113+
.filter(i => i.order > -1)
114+
.map(group => {
115+
const components = group.children.filter(
116+
(component: any) =>
117+
!search.value.trim() ||
118+
component.title.toLowerCase().includes(search.value.trim().toLowerCase()) ||
119+
(component.subtitle || '')
120+
.toLowerCase()
121+
.includes(search.value.trim().toLowerCase()),
122+
);
123+
return { ...group, children: components };
124+
})
125+
.filter(i => i.children.length),
126+
);
114127
});
115128
onMounted(() => {
116129
inputRef.value.focus();

0 commit comments

Comments
 (0)