Comments (3)
Dropdown的overlay嘛
from ant-design-vue.
Dropdown的覆盖嘛
select的,select和Dropdown用的应该是通用的overlay吧
from ant-design-vue.
selec没有暴露overlay属性,这是dropdown的
const renderOverlay = () => {
// rc-dropdown already can process the function of overlay, but we have check logic here.
// So we need render the element to check and pass back to rc-dropdown.
const overlay = props.overlay || slots.overlay?.();
const overlayNode = Array.isArray(overlay) ? overlay[0] : overlay;
if (!overlayNode) return null;
const overlayProps = overlayNode.props || {};
// Warning if use other mode
devWarning(
!overlayProps.mode || overlayProps.mode === 'vertical',
'Dropdown',
`mode="${overlayProps.mode}" is not supported for Dropdown's Menu.`,
);
// menu cannot be selectable in dropdown defaultly
const { selectable = false, expandIcon = (overlayNode.children as any)?.expandIcon?.() } =
overlayProps;
const overlayNodeExpandIcon =
typeof expandIcon !== 'undefined' && isValidElement(expandIcon) ? (
expandIcon
) : (
<span class={`${prefixCls.value}-menu-submenu-arrow`}>
<RightOutlined class={`${prefixCls.value}-menu-submenu-arrow-icon`} />
</span>
);
const fixedModeOverlay = isValidElement(overlayNode)
? cloneElement(overlayNode, {
mode: 'vertical',
selectable,
expandIcon: () => overlayNodeExpandIcon,
})
: overlayNode;
return fixedModeOverlay;
};
from ant-design-vue.
Related Issues (20)
- dropdown下menu中有popconfirm,menu-item上的key失效
- Uncaught RangeError: Maximum call stack size exceeded 在table 组件中滑动滚动条,控制台报了上千个警告 HOT 12
- datepicker使用valueFormat指定格式时,对带有中括号[]的格式字符出现匹配错误的bug HOT 1
- 当页面同时存在一个抽屉和一个表格,并且表格中存在customRender的单元格时,打开抽屉会自动调用customRender的函数 HOT 2
- Bug: week-range in range-picker gets highlighted wrongly HOT 1
- DatePicker单日期选择和双日期联动选择,是否可以增加一个当前时间的入参
- Input box component show count attribute, select input box cursor position incorrect HOT 1
- 在特定情况下,table列的宽度设置无效 HOT 1
- i am working on a project using Laravel / vuejs vite and i have a problem in IconBase.js in ant-design-vue package and exactly on : HOT 5
- Cascader 级联选择组件,它没有像tree组件一样有那个虚拟列表(virtual虚拟滚动)吗?大数据量的时候,这个级联组件卡死,包括展开,和选择的时候 HOT 2
- 提示无法找到模块“stylis”的声明文件。 HOT 1
- 真的没搞懂 !!!4.x 版本theme主题不支持组件级的样式调整,明明文档说的很清楚但源码里写的却是相反的逻辑 HOT 6
- Cascader级联组件多选获取所有勾选的子集 HOT 1
- Button 组件 type = link 定制主题色应用失效 HOT 1
- 在附带danger&type=text的按钮上使用ghost属性表现不在预期 HOT 1
- RTL Support HOT 1
- Tooltip或Popover组件子元素data-v标签丢失 HOT 4
- 将页面全屏时Tooltip组件的提示文字可能并不会自动消失 HOT 3
- loadData prop is not called after a Tree node, which was previously expanded manually, is expanded from the code HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ant-design-vue.