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 baec89f8
authored
Apr 27, 2025
by
ming4762
Committed by
GitHub
Apr 27, 2025
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
perf: resolve duplicate component names (#6039)
1 parent
7c7051a1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
40 deletions
apps/web-antd/src/adapter/component/index.ts
apps/web-ele/src/adapter/component/index.ts
apps/web-naive/src/adapter/component/index.ts
apps/web-antd/src/adapter/component/index.ts
View file @
baec89f
...
...
@@ -136,20 +136,34 @@ async function initComponentAdapter() {
// 如果你的组件体积比较大,可以使用异步加载
// Button: () =>
// import('xxx').then((res) => res.Button),
ApiSelect
:
withDefaultPlaceholder
(
ApiComponent
,
'select'
,
{
component
:
Select
,
loadingSlot
:
'suffixIcon'
,
visibleEvent
:
'onDropdownVisibleChange'
,
modelPropName
:
'value'
,
}),
ApiTreeSelect
:
withDefaultPlaceholder
(
ApiComponent
,
'select'
,
{
component
:
TreeSelect
,
fieldNames
:
{
label
:
'label'
,
value
:
'value'
,
children
:
'children'
},
loadingSlot
:
'suffixIcon'
,
modelPropName
:
'value'
,
optionsPropName
:
'treeData'
,
visibleEvent
:
'onVisibleChange'
,
}),
ApiSelect
:
withDefaultPlaceholder
(
{
...
ApiComponent
,
name
:
'ApiSelect'
,
},
'select'
,
{
component
:
Select
,
loadingSlot
:
'suffixIcon'
,
visibleEvent
:
'onDropdownVisibleChange'
,
modelPropName
:
'value'
,
},
),
ApiTreeSelect
:
withDefaultPlaceholder
(
{
...
ApiComponent
,
name
:
'ApiTreeSelect'
,
},
'select'
,
{
component
:
TreeSelect
,
fieldNames
:
{
label
:
'label'
,
value
:
'value'
,
children
:
'children'
},
loadingSlot
:
'suffixIcon'
,
modelPropName
:
'value'
,
optionsPropName
:
'treeData'
,
visibleEvent
:
'onVisibleChange'
,
},
),
AutoComplete
,
Checkbox
,
CheckboxGroup
,
...
...
apps/web-ele/src/adapter/component/index.ts
View file @
baec89f
...
...
@@ -184,19 +184,33 @@ async function initComponentAdapter() {
// 如果你的组件体积比较大,可以使用异步加载
// Button: () =>
// import('xxx').then((res) => res.Button),
ApiSelect
:
withDefaultPlaceholder
(
ApiComponent
,
'select'
,
{
component
:
ElSelectV2
,
loadingSlot
:
'loading'
,
visibleEvent
:
'onVisibleChange'
,
}),
ApiTreeSelect
:
withDefaultPlaceholder
(
ApiComponent
,
'select'
,
{
component
:
ElTreeSelect
,
props
:
{
label
:
'label'
,
children
:
'children'
},
nodeKey
:
'value'
,
loadingSlot
:
'loading'
,
optionsPropName
:
'data'
,
visibleEvent
:
'onVisibleChange'
,
}),
ApiSelect
:
withDefaultPlaceholder
(
{
...
ApiComponent
,
name
:
'ApiSelect'
,
},
'select'
,
{
component
:
ElSelectV2
,
loadingSlot
:
'loading'
,
visibleEvent
:
'onVisibleChange'
,
},
),
ApiTreeSelect
:
withDefaultPlaceholder
(
{
...
ApiComponent
,
name
:
'ApiTreeSelect'
,
},
'select'
,
{
component
:
ElTreeSelect
,
props
:
{
label
:
'label'
,
children
:
'children'
},
nodeKey
:
'value'
,
loadingSlot
:
'loading'
,
optionsPropName
:
'data'
,
visibleEvent
:
'onVisibleChange'
,
},
),
Checkbox
:
ElCheckbox
,
CheckboxGroup
:
(
props
,
{
attrs
,
slots
})
=>
{
let
defaultSlot
;
...
...
apps/web-naive/src/adapter/component/index.ts
View file @
baec89f
...
...
@@ -131,19 +131,33 @@ async function initComponentAdapter() {
// Button: () =>
// import('xxx').then((res) => res.Button),
ApiSelect
:
withDefaultPlaceholder
(
ApiComponent
,
'select'
,
{
component
:
NSelect
,
modelPropName
:
'value'
,
}),
ApiTreeSelect
:
withDefaultPlaceholder
(
ApiComponent
,
'select'
,
{
component
:
NTreeSelect
,
nodeKey
:
'value'
,
loadingSlot
:
'arrow'
,
keyField
:
'value'
,
modelPropName
:
'value'
,
optionsPropName
:
'options'
,
visibleEvent
:
'onVisibleChange'
,
}),
ApiSelect
:
withDefaultPlaceholder
(
{
...
ApiComponent
,
name
:
'ApiSelect'
,
},
'select'
,
{
component
:
NSelect
,
modelPropName
:
'value'
,
},
),
ApiTreeSelect
:
withDefaultPlaceholder
(
{
...
ApiComponent
,
name
:
'ApiTreeSelect'
,
},
'select'
,
{
component
:
NTreeSelect
,
nodeKey
:
'value'
,
loadingSlot
:
'arrow'
,
keyField
:
'value'
,
modelPropName
:
'value'
,
optionsPropName
:
'options'
,
visibleEvent
:
'onVisibleChange'
,
},
),
Checkbox
:
NCheckbox
,
CheckboxGroup
:
(
props
,
{
attrs
,
slots
})
=>
{
let
defaultSlot
;
...
...
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