diff --git a/components/select/index.tsx b/components/select/index.tsx index 69981659e..3d4393a8a 100644 --- a/components/select/index.tsx +++ b/components/select/index.tsx @@ -225,8 +225,8 @@ const Select = defineComponent({ /* istanbul ignore next */ Select.install = function(app: App) { app.component(Select.name, Select); - app.component('ASelectOption', Select.Option); - app.component('ASelectOptGroup', Select.OptGroup); + app.component(Select.Option.displayName, Select.Option); + app.component(Select.OptGroup.displayName, Select.OptGroup); return app; }; export default Select as typeof Select & diff --git a/components/tree-select/index.tsx b/components/tree-select/index.tsx index f1cafc9fa..43dafd315 100644 --- a/components/tree-select/index.tsx +++ b/components/tree-select/index.tsx @@ -200,7 +200,7 @@ const TreeSelect = defineComponent({ /* istanbul ignore next */ TreeSelect.install = function(app: App) { app.component(TreeSelect.name, TreeSelect); - app.component('ATreeSelectNode', TreeSelect.TreeNode); + app.component(TreeSelect.TreeNode.displayName, TreeSelect.TreeNode); return app; }; diff --git a/components/vc-select/OptGroup.tsx b/components/vc-select/OptGroup.tsx index 2b5deccce..747f6a03f 100644 --- a/components/vc-select/OptGroup.tsx +++ b/components/vc-select/OptGroup.tsx @@ -11,4 +11,5 @@ export interface OptionGroupFC extends FunctionalComponent { const OptGroup: OptionGroupFC = () => null; OptGroup.isSelectOptGroup = true; +OptGroup.displayName = 'ASelectOptGroup'; export default OptGroup; diff --git a/components/vc-select/Option.tsx b/components/vc-select/Option.tsx index 9b8cdcad8..cd1c17976 100644 --- a/components/vc-select/Option.tsx +++ b/components/vc-select/Option.tsx @@ -14,4 +14,5 @@ export interface OptionFC extends FunctionalComponent { const Option: OptionFC = () => null; Option.isSelectOption = true; +Option.displayName = 'ASelectOption'; export default Option; diff --git a/components/vc-tree-select/src/SelectNode.jsx b/components/vc-tree-select/src/SelectNode.jsx index 92812fb5d..925aff366 100644 --- a/components/vc-tree-select/src/SelectNode.jsx +++ b/components/vc-tree-select/src/SelectNode.jsx @@ -11,4 +11,5 @@ function SelectNode(_, { attrs, slots }) { SelectNode.isTreeNode = true; SelectNode.inheritAttrs = false; +SelectNode.displayName = 'ATreeSelectNode'; export default SelectNode;