index.sjs 477 B

1234567891011121314151617181920212223
  1. function isActive(current, index, disabled) {
  2. if (disabled) {
  3. return false;
  4. }
  5. return (current || []).indexOf(index) >= 0;
  6. }
  7. function getStyleHeight(index, contentHeight, disabled) {
  8. if (disabled) {
  9. return 'height: 0px';
  10. }
  11. var height = contentHeight[index];
  12. if (height === '') {
  13. return '';
  14. }
  15. if (height) {
  16. return "height: ".concat(height);
  17. }
  18. return 'height: 0px';
  19. }
  20. export default {
  21. isActive: isActive,
  22. getStyleHeight: getStyleHeight
  23. };