|
|
@ -12,17 +12,25 @@
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
<a-divider></a-divider>
|
|
|
|
<a-divider></a-divider>
|
|
|
|
|
|
|
|
<a-affix :offset-top="32" @change="handleAffixChange">
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
|
|
|
class="components-overview-affix"
|
|
|
|
|
|
|
|
:class="{ 'components-overview-affixed': searchBarAffixed }"
|
|
|
|
|
|
|
|
>
|
|
|
|
<a-input
|
|
|
|
<a-input
|
|
|
|
ref="inputRef"
|
|
|
|
ref="inputRef"
|
|
|
|
v-model:value="search"
|
|
|
|
v-model:value="search"
|
|
|
|
:placeholder="$t('app.components.overview.search')"
|
|
|
|
:placeholder="$t('app.components.overview.search')"
|
|
|
|
class="components-overview-search"
|
|
|
|
class="components-overview-search"
|
|
|
|
auto-focus
|
|
|
|
auto-focus
|
|
|
|
|
|
|
|
:style="{ fontSize: searchBarAffixed ? '18px' : '' }"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template #suffix>
|
|
|
|
<template #suffix>
|
|
|
|
<SearchOutlined />
|
|
|
|
<SearchOutlined />
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</a-input>
|
|
|
|
</a-input>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</a-affix>
|
|
|
|
<a-divider></a-divider>
|
|
|
|
<a-divider></a-divider>
|
|
|
|
<template v-for="group in menuItems" :key="group.title">
|
|
|
|
<template v-for="group in menuItems" :key="group.title">
|
|
|
|
<div class="components-overview">
|
|
|
|
<div class="components-overview">
|
|
|
@ -84,6 +92,12 @@ export default defineComponent({
|
|
|
|
const search = ref('');
|
|
|
|
const search = ref('');
|
|
|
|
const inputRef = ref();
|
|
|
|
const inputRef = ref();
|
|
|
|
const { dataSource } = useMenus();
|
|
|
|
const { dataSource } = useMenus();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const searchBarAffixed = ref(false);
|
|
|
|
|
|
|
|
function handleAffixChange(affixed?: boolean) {
|
|
|
|
|
|
|
|
searchBarAffixed.value = affixed;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const menuItems = computed(() => {
|
|
|
|
const menuItems = computed(() => {
|
|
|
|
return [
|
|
|
|
return [
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -144,6 +158,8 @@ export default defineComponent({
|
|
|
|
inputRef,
|
|
|
|
inputRef,
|
|
|
|
isZhCN: globalConfig?.isZhCN,
|
|
|
|
isZhCN: globalConfig?.isZhCN,
|
|
|
|
isDark,
|
|
|
|
isDark,
|
|
|
|
|
|
|
|
searchBarAffixed,
|
|
|
|
|
|
|
|
handleAffixChange,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
});
|
|
|
|