jiaqingjiayi-xiaochengxu/甲情_甲意/miniprogram/node_modules/antd-mini/less/Button/index.sjs

25 lines
526 B
Plaintext
Raw Normal View History

2024-11-10 07:01:22 +00:00
function getClass(size) {
const list = ['x-small', 'small', 'medium', 'large'];
if (list.indexOf(size) >=0) {
return `ant-button-${size}`;
}
return 'ant-button-medium';
}
function getHoverClass(loading, type, activeClassName) {
if (loading) {
return '';
}
let className = 'ant-button-active';
if (type === 'text') {
className += ' ant-button-text-active';
}
if (activeClassName) {
className += ' ' + activeClassName;
}
return className;
}
export default { getClass, getHoverClass };