Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const prefixCls = classCreator('collapse')();
const CollapsePanel = san.defineComponent({
inited() {
const showArrow = this.data.get('showArrow');
const className = this.data.get('className');
let classArr = [];
className && classArr.push(className);
!showArrow && classArr.push(`${prefixCls}-no-arrow`);
this.data.set('className', classArr.join(' '));
}
});
san.inherits(CollapsePanel, Collapse.Panel);
export default CollapsePanel;
},
computed: {
...scrollableInkTabBar.prototype.computed,
className() {
const tabPosition = this.data.get('tabBarPosition');
const size = this.data.get('size');
const type = this.data.get('type');
let classArr = [`${prefixCls}-${tabPosition}-bar`];
!!size && classArr.push(`${prefixCls}-${size}-bar`);
type && type.indexOf('card') >= 0 && classArr.push(`${prefixCls}-card-bar`);
return classArr.join(' ');
}
}
});
san.inherits(tabBar, scrollableInkTabBar);
return tabBar;
},
defaultRenderTabContent() {
hasTabPaneAnimated: hasTabPaneAnimated,
animatedWithMargin: true
};
},
computed: {
...TabContent.prototype.computed,
className() {
const tabPosition = this.data.get('tabBarPosition');
const type = this.data.get('type') || '';
let classArr = [`${prefixCls}-${tabPosition}-content`];
type.indexOf('card') >= 0 && classArr.push(prefixCls + '-card-content');
return classArr.join(' ');
}
}
});
san.inherits(newTabContent, TabContent);
return newTabContent;
},
injectComponent(tab) {
}
},
initData() {
return {
prefixCls,
bordered: true,
accordion: false,
destroyInactivePanel: false,
children: [],
expandIcon: expandIcon
};
}
});
san.inherits(Collapse, BaseCollapse);
export default Collapse;
import './style/index.less';
import san from 'san';
import {classCreator} from '../core/util';
import Radio from './radio';
const prefixCls = classCreator('radio-button')();
const radioButton = san.defineComponent({
initData() {
return {
prefixCls
};
}
});
san.inherits(radioButton, Radio);
export default radioButton;