-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16006 from element-plus/dev
D2M
- Loading branch information
Showing
321 changed files
with
12,421 additions
and
1,692 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
pnpm exec commitlint --config commitlint.config.js --edit "${1}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
pnpm exec lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"empty-description": "Oops! There's nothing~" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
176 changes: 176 additions & 0 deletions
176
docs/.vitepress/vitepress/components/globals/overview.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
<template> | ||
<div class="overview-container"> | ||
<div class="search-content"> | ||
<el-input | ||
v-model="query" | ||
:prefix-icon="Search" | ||
size="large" | ||
placeholder="Search Components" | ||
/> | ||
</div> | ||
|
||
<div class="main-content"> | ||
<div | ||
v-for="(group, groupIndex) in filteredSidebars" | ||
:key="groupIndex" | ||
class="component-group" | ||
> | ||
<p class="component-title"> | ||
{{ group.text }} | ||
<el-tag effect="dark" round size="small"> | ||
{{ group.children.length }} | ||
</el-tag> | ||
</p> | ||
<div class="card-content"> | ||
<el-card | ||
v-for="(item, index) in group.children" | ||
:key="index" | ||
shadow="hover" | ||
@click="toPage(item.link)" | ||
> | ||
<template #header> | ||
<el-text truncated>{{ item.text }}</el-text> | ||
<span v-if="item.promotion" class="vp-tag"> | ||
{{ item.promotion }} | ||
</span> | ||
</template> | ||
|
||
<template #default> | ||
<component :is="getIcon(item.link)" v-if="getIcon(item.link)" /> | ||
<span v-else>Todo</span> | ||
</template> | ||
</el-card> | ||
</div> | ||
</div> | ||
|
||
<el-empty | ||
v-if="!filteredSidebars.length" | ||
:description="locale['empty-description']" | ||
/> | ||
|
||
<p class="designed-by"> | ||
Icons designed by | ||
<el-link | ||
type="primary" | ||
:underline="false" | ||
href="https://github.com/daodaozz08" | ||
target="_blank" | ||
> | ||
@叨叨 | ||
</el-link> | ||
</p> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { computed, ref } from 'vue' | ||
import { useRouter } from 'vitepress' | ||
import { Search } from '@element-plus/icons-vue' | ||
import overviewLocale from '../../../i18n/component/overview.json' | ||
import { useSidebar } from '~/composables/sidebar' | ||
import { useLang } from '~/composables/lang' | ||
import overviewIcons from '~/components/overview-icons' | ||
const lang = useLang() | ||
const router = useRouter() | ||
const { sidebars } = useSidebar() | ||
const query = ref('') | ||
const locale = computed(() => overviewLocale[lang.value]) | ||
const filteredSidebars = computed(() => | ||
sidebars.value | ||
.slice(1) | ||
.map((group) => ({ | ||
...group, | ||
children: group.children.filter((item) => | ||
item.text.toLowerCase().includes(query.value.trim().toLowerCase()) | ||
), | ||
})) | ||
.filter((group) => group.children.length) | ||
) | ||
const toPage = (link: string) => { | ||
router.go(link) | ||
} | ||
const getIcon = (link: string) => { | ||
const name = link.split('/').pop() | ||
return name ? overviewIcons[name] : null | ||
} | ||
</script> | ||
|
||
<style scoped lang="scss"> | ||
.overview-container { | ||
position: relative; | ||
.search-content { | ||
position: sticky; | ||
top: 60px; | ||
z-index: 10; | ||
.el-input { | ||
background: var(--bg-color); | ||
} | ||
} | ||
.main-content { | ||
.component-group { | ||
margin-top: 32px; | ||
.component-title { | ||
display: flex; | ||
align-items: center; | ||
font-size: 20px; | ||
font-weight: 600; | ||
color: var(--el-text-color-primary); | ||
gap: 8px; | ||
} | ||
.card-content { | ||
display: grid; | ||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); | ||
gap: 16px; | ||
::v-deep(.el-card) { | ||
cursor: pointer; | ||
.el-card__header { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
gap: 8px; | ||
padding: 8px 12px; | ||
.el-text { | ||
font-size: 14px; | ||
font-weight: 500; | ||
color: var(--el-text-color-regular); | ||
line-height: 24px; | ||
} | ||
} | ||
.el-card__body { | ||
padding: 0; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
aspect-ratio: 280 / 180; | ||
svg { | ||
width: 100%; | ||
height: auto; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
.designed-by { | ||
text-align: right; | ||
font-size: 14px; | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.