| | |
| | | return classNames.join(' '); |
| | | }, |
| | | |
| | | getSize: function (size = 'medium') { |
| | | var pxIndex = size.indexOf('px'); |
| | | if (pxIndex > -1) { |
| | | return 'width:' + size + ';height:' + size + ';font-size:' + ((size.slice(0, pxIndex) / 8) * 3 + 2) + 'px;'; |
| | | getSize: function (size = 'medium', systemInfo) { |
| | | var res = getRegExp('^([0-9]+)(px|rpx)$').exec(size); |
| | | |
| | | if (res && res.length >= 3) { |
| | | var px = res[1]; |
| | | if (res[2] === 'rpx') { |
| | | px = Math.floor((systemInfo.windowWidth * res[1]) / 750); |
| | | } |
| | | |
| | | return 'width:' + size + ';height:' + size + ';font-size:' + ((px / 8) * 3 + 2) + 'px'; |
| | | } |
| | | }, |
| | | |
| | | getStyles: function (isShow, zIndex) { |
| | | var displayStyle = isShow ? '' : 'display: none;'; |
| | | var zIndexStyle = zIndex ? 'z-index:' + zIndex + ';' : ''; |
| | | return displayStyle + zIndexStyle; |
| | | getStyles: function (isShow) { |
| | | return isShow ? '' : 'display: none;'; |
| | | }, |
| | | }; |