🌐 AI搜索 & 代理 主页
Skip to content

Commit cb58e44

Browse files
authored
Update index.js
1 parent 506ac68 commit cb58e44

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/content/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ const directivesContext = require.context('~/../src/directives/', true, /package
99
export const directives = importAll(directivesContext)
1010

1111
const iconsContext = require.context('~/../src/icons', false, /package.json/)
12-
export const icons = importAll(iconsContext) || {}
12+
const icons = importAll(iconsContext) || {}
13+
// Massage the icons components to only show BIcon and one ex ample `BIcon{IconName}`
14+
icons.components = icons.components
15+
.sort((a, b) => (a < b ? -1 : a > b ? 1 : 0))
16+
.slice(0, 2)
17+
.map(c => ({ ...c }))
18+
icons.components[1].component = 'BIcon{IconName}'
19+
export { icons }
1320

1421
const referenceContext = require.context('~/markdown/reference', true, /meta.json/)
1522
export const reference = importAll(referenceContext)

0 commit comments

Comments
 (0)