project init & fix ui
This commit is contained in:
16
miniprogram_npm/tdesign-miniprogram/dropdown-menu/util.wxs
Normal file
16
miniprogram_npm/tdesign-miniprogram/dropdown-menu/util.wxs
Normal file
@@ -0,0 +1,16 @@
|
||||
var getTreeClass = function (level) {
|
||||
if (level === 0) return 'leaf';
|
||||
if (level === 1) return 'parent';
|
||||
return 'ancestor';
|
||||
};
|
||||
|
||||
var getDropdownItemStyles = function (top, zIndex, customStyle) {
|
||||
var topStyle = top ? 'top:' + top + 'px;' : '';
|
||||
var zIndexStyle = zIndex ? 'z-index:' + zIndex + ';' : '';
|
||||
return topStyle + zIndexStyle + customStyle;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
getTreeClass: getTreeClass,
|
||||
getDropdownItemStyles: getDropdownItemStyles,
|
||||
};
|
||||
Reference in New Issue
Block a user