提交新的移动端框架
This commit is contained in:
1 parent
134f711349
commit
9bda3717fe
75 files changed
+5283
-9011
No files matched your search
@@ -46,24 +46,24 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.service-item {
|
||||
background: $uni-bg-color;
|
||||
border-radius: $uni-border-radius-lg;
|
||||
padding: $uni-spacing-col-xl;
|
||||
background: #ffffff;
|
||||
border-radius: 12px;
|
||||
padding: 9px 16px;
|
||||
text-align: center;
|
||||
box-shadow: $uni-shadow;
|
||||
transition: $uni-transition;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
transition: all 0.3s ease;
|
||||
cursor: pointer;
|
||||
border: 1px solid transparent;
|
||||
position: relative;
|
||||
|
||||
&:hover {
|
||||
transform: translateY(-3px);
|
||||
box-shadow: $uni-shadow-hover;
|
||||
border-color: $uni-color-primary;
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
|
||||
border-color: #007aff;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: 2px solid $uni-color-primary;
|
||||
outline: 2px solid #007aff;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
@@ -71,133 +71,143 @@ export default {
|
||||
.service-icon {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
background: $uni-color-primary-light;
|
||||
border-radius: $uni-border-radius-circle;
|
||||
background: rgba(0, 122, 255, 0.1);
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0 auto $uni-spacing-col-base;
|
||||
color: $uni-color-primary;
|
||||
transition: $uni-transition;
|
||||
margin: 0 auto 12px;
|
||||
color: #007aff;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
.icon {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
// 支持u-icon组件
|
||||
// 支持u-icon组件 - uview-plus图标
|
||||
:deep(.u-icon) {
|
||||
font-size: 24px !important;
|
||||
color: inherit !important;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
// 支持uview内置图标
|
||||
:deep(.uview-icon) {
|
||||
font-size: 24px !important;
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
// 支持iconfont图标
|
||||
.iconfont {
|
||||
// 支持普通文本图标
|
||||
.text-icon {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
font-size: 24px;
|
||||
color: inherit;
|
||||
filter: brightness(0) saturate(100%) invert(49%) sepia(98%) saturate(3332%)
|
||||
hue-rotate(196deg) brightness(104%) contrast(101%);
|
||||
line-height: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.service-item:hover .service-icon {
|
||||
background: $uni-color-primary;
|
||||
color: $uni-text-color-inverse;
|
||||
background: rgba(0, 122, 255, 0.2);
|
||||
transform: scale(1.1);
|
||||
|
||||
.iconfont {
|
||||
filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg)
|
||||
brightness(100%) contrast(100%);
|
||||
}
|
||||
}
|
||||
|
||||
.service-title {
|
||||
font-size: $uni-font-size-base;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: $uni-text-color;
|
||||
color: #333333;
|
||||
display: block;
|
||||
margin-top: 8px;
|
||||
word-break: break-all;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.service-badge {
|
||||
position: absolute;
|
||||
top: -4px;
|
||||
right: -4px;
|
||||
background: #ff4757;
|
||||
border-radius: $uni-border-radius-lg;
|
||||
top: -6px;
|
||||
right: -6px;
|
||||
background: #ff3b30;
|
||||
border-radius: 12px;
|
||||
min-width: 20px;
|
||||
height: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.badge-text {
|
||||
color: $uni-text-color-inverse;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
padding: 0 6px;
|
||||
}
|
||||
padding: 0 6px;
|
||||
box-shadow: 0 2px 4px rgba(255, 59, 48, 0.3);
|
||||
}
|
||||
|
||||
/* 网格布局支持 */
|
||||
.grid-2 .service-item {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.grid-3 .service-item {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.grid-4 .service-item {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* 动画效果 */
|
||||
.service-item {
|
||||
animation: fadeInUp 0.6s ease-out backwards;
|
||||
}
|
||||
|
||||
@keyframes fadeInUp {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
.badge-text {
|
||||
color: #ffffff;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 375px) {
|
||||
.service-item {
|
||||
padding: $uni-spacing-col-lg;
|
||||
padding: 20px 12px;
|
||||
}
|
||||
|
||||
.service-icon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-bottom: 8px;
|
||||
|
||||
.icon {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
// 响应式u-icon支持
|
||||
.icon,
|
||||
:deep(.u-icon) {
|
||||
font-size: 20px !important;
|
||||
}
|
||||
|
||||
// 响应式iconfont支持
|
||||
.iconfont {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.service-title {
|
||||
font-size: $uni-font-size-sm;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 小屏幕设备适配 */
|
||||
@media (max-width: 320px) {
|
||||
.service-item {
|
||||
padding: 16px 8px;
|
||||
}
|
||||
|
||||
.service-icon {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
|
||||
.icon,
|
||||
:deep(.u-icon) {
|
||||
font-size: 18px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.service-title {
|
||||
font-size: 12px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 活跃状态动画 */
|
||||
.service-item:active {
|
||||
transform: scale(0.95);
|
||||
transition: transform 0.1s ease;
|
||||
}
|
||||
|
||||
/* 无障碍访问增强 */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.service-item,
|
||||
.service-icon {
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.service-item:hover {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user