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

24 lines
545 B
Plaintext
Raw Normal View History

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