first commit
This commit is contained in:
14
uni_modules/tdesign-uniapp/components/popup/computed.js
Normal file
14
uni_modules/tdesign-uniapp/components/popup/computed.js
Normal file
@@ -0,0 +1,14 @@
|
||||
function getPopupStyles({ zIndex, distanceTop, placement, duration }) {
|
||||
let zIndexStyle = zIndex ? `z-index:${zIndex};` : '';
|
||||
if ((placement === 'top' || placement === 'left' || placement === 'right') && distanceTop) {
|
||||
zIndexStyle = `${zIndexStyle}top:${distanceTop}px;--td-popup-distance-top:${distanceTop}px;`;
|
||||
}
|
||||
if (duration) {
|
||||
zIndexStyle = `${zIndexStyle}--td-popup-transition:all ${duration}ms ease;`;
|
||||
}
|
||||
return zIndexStyle;
|
||||
}
|
||||
|
||||
export default {
|
||||
getPopupStyles,
|
||||
};
|
||||
Reference in New Issue
Block a user