Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 35715113
authored
Jul 06, 2024
by
vben
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
perf: reduce the number of icon component instances
1 parent
f7a93a9b
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
19 additions
and
24 deletions
packages/@core/shared/iconify/src/create-icon.ts
packages/@core/shared/iconify/src/factory.ts
packages/@core/shared/iconify/src/index.ts
packages/@core/shared/iconify/src/material.ts
packages/@core/shared/iconify/src/mdi.ts
packages/business/widgets/src/preferences/blocks/input-item.vue
packages/business/widgets/src/preferences/blocks/number-field-item.vue
packages/business/widgets/src/preferences/blocks/select-item.vue
packages/locales/src/langs/en-US.yaml
packages/locales/src/langs/zh-CN.yaml
packages/@core/shared/iconify/src/create-icon.ts
0 → 100644
View file @
3571511
import
{
h
}
from
'vue'
;
import
{
Icon
}
from
'@iconify/vue'
;
function
createIcon
(
icon
:
string
)
{
return
h
(
Icon
,
{
icon
});
}
export
{
createIcon
};
packages/@core/shared/iconify/src/factory.ts
deleted
100644 → 0
View file @
f7a93a9
import
{
defineComponent
,
h
}
from
'vue'
;
import
{
Icon
}
from
'@iconify/vue'
;
function
createIcon
(
name
:
string
)
{
return
defineComponent
({
name
:
`SvgIcon-
${
name
}
`
,
setup
(
props
,
{
attrs
})
{
return
()
=>
h
(
Icon
,
{
icon
:
name
,
...
props
,
...
attrs
});
},
});
}
export
{
createIcon
};
packages/@core/shared/iconify/src/index.ts
View file @
3571511
export
*
from
'./
factory
'
;
export
*
from
'./
create-icon
'
;
export
*
from
'./material'
;
export
*
from
'./mdi'
;
...
...
packages/@core/shared/iconify/src/material.ts
View file @
3571511
import
{
createIcon
}
from
'./
factory
'
;
import
{
createIcon
}
from
'./
create-icon
'
;
export
const
IconDefault
=
createIcon
(
'ic:round-auto-awesome'
);
...
...
packages/@core/shared/iconify/src/mdi.ts
View file @
3571511
import
{
createIcon
}
from
'./
factory
'
;
import
{
createIcon
}
from
'./
create-icon
'
;
export
const
MdiKeyboardEsc
=
createIcon
(
'mdi:keyboard-esc'
);
...
...
packages/business/widgets/src/preferences/blocks/input-item.vue
View file @
3571511
...
...
@@ -46,6 +46,6 @@ const slots = useSlots();
<slot
name=
"tip"
></slot>
</VbenTooltip>
</span>
<Input
v-model=
"inputValue"
class=
"h-8 w-[16
0
px]"
/>
<Input
v-model=
"inputValue"
class=
"h-8 w-[16
5
px]"
/>
</div>
</template>
packages/business/widgets/src/preferences/blocks/number-field-item.vue
View file @
3571511
...
...
@@ -54,7 +54,7 @@ const slots = useSlots();
</VbenTooltip>
</span>
<NumberField
v-model=
"inputValue"
v-bind=
"$attrs"
class=
"w-[16
0
px]"
>
<NumberField
v-model=
"inputValue"
v-bind=
"$attrs"
class=
"w-[16
5
px]"
>
<NumberFieldContent>
<NumberFieldDecrement
/>
<NumberFieldInput
/>
...
...
packages/business/widgets/src/preferences/blocks/select-item.vue
View file @
3571511
...
...
@@ -54,7 +54,7 @@ const slots = useSlots();
</VbenTooltip>
</span>
<Select
v-model=
"selectValue"
>
<SelectTrigger
class=
"h-8 w-[16
0
px]"
>
<SelectTrigger
class=
"h-8 w-[16
5
px]"
>
<SelectValue
:placeholder=
"placeholder"
/>
</SelectTrigger>
<SelectContent>
...
...
packages/locales/src/langs/en-US.yaml
View file @
3571511
...
...
@@ -26,7 +26,7 @@ page:
embedded
:
embedded Page
external-link
:
External Link
fallback
:
title
:
Exception
Page
title
:
Fallback
Page
essentials
:
login
:
Login
register
:
Register
...
...
@@ -152,7 +152,7 @@ preferences:
two-column-tip
:
Vertical Two Column Menu Mode
mixed-menu
:
Mixed Menu
split-menu
:
Split Menu
mixed-menu-tip
:
Vertical Menu Co-exists
mixed-menu-tip
:
Vertical
& Horizontal
Menu Co-exists
full-content
:
Full Content
full-content-tip
:
Display only the main content, no menus
weak-mode
:
Color Weak Mode
...
...
packages/locales/src/langs/zh-CN.yaml
View file @
3571511
...
...
@@ -26,7 +26,7 @@ page:
embedded
:
内嵌
external-link
:
外链
fallback
:
title
:
异常页面
title
:
缺省页
essentials
:
login
:
登陆
register
:
注册
...
...
@@ -152,7 +152,7 @@ preferences:
two-column
:
双列菜单
two-column-tip
:
垂直双列菜单模式
mixed-menu
:
混合菜单
mixed-menu-tip
:
垂直菜单共存
mixed-menu-tip
:
垂直
水平
菜单共存
split-menu
:
切割菜单
full-content
:
内容全屏
full-content-tip
:
不显示任何菜单,只显示内容主体
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment