parent
							
								
									881a796afd
								
							
						
					
					
						commit
						093f07c500
					
				| 
						 | 
				
			
			@ -11,11 +11,14 @@ import openAnimationFactory from './openAnimationFactory';
 | 
			
		|||
import { collapseProps } from './commonProps';
 | 
			
		||||
import { getDataAndAriaProps } from '../../_util/util';
 | 
			
		||||
import { defineComponent } from 'vue';
 | 
			
		||||
import isNil from 'lodash/isNil';
 | 
			
		||||
 | 
			
		||||
function _toArray(activeKey) {
 | 
			
		||||
  let currentActiveKey = activeKey;
 | 
			
		||||
  if (!Array.isArray(currentActiveKey)) {
 | 
			
		||||
    currentActiveKey = currentActiveKey ? [currentActiveKey] : [];
 | 
			
		||||
    const activeKeyType = typeof currentActiveKey;
 | 
			
		||||
    currentActiveKey =
 | 
			
		||||
      activeKeyType === 'number' || activeKeyType === 'string' ? [currentActiveKey] : [];
 | 
			
		||||
  }
 | 
			
		||||
  return currentActiveKey.map(key => String(key));
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -76,7 +79,7 @@ export default defineComponent({
 | 
			
		|||
      const { prefixCls, accordion, destroyInactivePanel, expandIcon } = this.$props;
 | 
			
		||||
 | 
			
		||||
      // If there is no key provide, use the panel order as default key
 | 
			
		||||
      const key = child.key || String(index);
 | 
			
		||||
      const key = !isNil(child.key) ? String(child.key) : String(index);
 | 
			
		||||
      const { header, headerClass, disabled } = getPropsData(child);
 | 
			
		||||
      let isActive = false;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue