From 4a2d3dfda04e8b5c71228b933181099d764dec9b Mon Sep 17 00:00:00 2001 From: qsh <> Date: Wed, 4 Feb 2026 15:45:39 +0800 Subject: [PATCH] sc --- src/pages/account/accountForm.vue | 57 ++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/src/pages/account/accountForm.vue b/src/pages/account/accountForm.vue index 63958b9..c38b4a2 100644 --- a/src/pages/account/accountForm.vue +++ b/src/pages/account/accountForm.vue @@ -40,6 +40,18 @@ /> + + + 状态 + + + {{ form.status === 0 ? '启用' : '禁用' }} + + + + + + @@ -100,7 +112,8 @@ nickname: '', mobile: '', menuIds: [], - dataScope: '1' // 默认全部数据 + dataScope: '1', // 默认全部数据 + status: 0 // 默认启用 }); // 菜单列表 @@ -305,6 +318,48 @@ color: #303133; } + /* 状态开关 */ + .status-switch { + display: flex; + justify-content: space-between; + align-items: center; + } + + .status-text { + font-size: 24rpx; + color: #303133; + } + + .switch { + width: 80rpx; + height: 40rpx; + background-color: #dcdfe6; + border-radius: 20rpx; + position: relative; + transition: all 0.3s ease-in-out; + cursor: pointer; + } + + .switch.active { + background-color: #409eff; + } + + .switch-button { + width: 36rpx; + height: 36rpx; + background-color: #ffffff; + border-radius: 50%; + position: absolute; + top: 2rpx; + left: 2rpx; + transition: all 0.3s ease-in-out; + box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1); + } + + .switch.active .switch-button { + left: 42rpx; + } +