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

Commit f9a46cd

Browse files
authored
Update make-icon.js
1 parent 952fb7e commit f9a46cd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/icons/helpers/make-icon.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import identity from '../../utils/identity'
44
import { kebabCase, pascalCase, trim } from '../../utils/string'
55
import { toFloat } from '../../utils/number'
66

7-
// Common icon props
7+
// Common icon props (should be cloned/spread before using)
88
export const commonIconProps = {
99
variant: {
1010
type: String,
@@ -40,6 +40,7 @@ export const commonIconProps = {
4040
}
4141
}
4242

43+
// Base attributes needed on all icons
4344
const baseAttrs = {
4445
width: '1em',
4546
height: '1em',
@@ -49,7 +50,7 @@ const baseAttrs = {
4950
alt: 'icon'
5051
}
5152

52-
// Shared base component to reduce bundle size
53+
// Shared private base component to reduce bundle/runtime size
5354
// @vue/component
5455
const BVIconBase = {
5556
name: 'BVIconBase',
@@ -132,7 +133,7 @@ export const makeIcon = (name, content) => {
132133
render(h, { data, props }) {
133134
return h(
134135
BVIconBase,
135-
mergeData({ staticClass: iconNameClass, props: { ...props, content: svgContent } }, data)
136+
mergeData(data, { staticClass: iconNameClass, props: { ...props, content: svgContent } })
136137
)
137138
}
138139
})

0 commit comments

Comments
 (0)