feat: 按钮组件新增add类型

This commit is contained in:
zhuoqinglian
2026-06-23 14:14:29 +08:00
parent ea48b948bf
commit 9705149b2b
@@ -15,7 +15,7 @@ export default {
type: {
type: String,
default: 'default',
validator: (val) => ['default', 'confirm', 'delete'].includes(val)
validator: (val) => ['default', 'confirm', 'delete', 'add'].includes(val)
}
}
};
@@ -122,4 +122,37 @@ export default {
cursor: not-allowed;
}
}
.custom-button--add {
width: fit-content;
background: #52c41a;
color: white;
border: none;
border-radius: 6px;
transition: all 0.3s ease;
&.el-button--small {
font-size: 14px;
}
&.el-button--medium {
padding: 12px 20px;
}
&:hover {
color: white;
border-color: transparent;
box-shadow: 0 2px 8px rgba(82, 196, 26, 0.3);
transform: translateY(-2px);
}
&.is-disabled,
&.is-disabled:hover {
background: linear-gradient(to right, #a0e89a, #c4f0c0);
color: rgba(255, 255, 255, 0.6);
border-color: transparent;
box-shadow: none;
transform: none;
cursor: not-allowed;
}
}
</style>