From ea0a1f3d0a2ccf7e719692cb02cfc1b314d10c02 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 5 May 2019 19:14:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E5=88=87=E6=8D=A2=E5=BC=80?= =?UTF-8?q?=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/static/ruoyi/css/ry-ui.css | 73 +++++++++++++++++++ .../resources/templates/system/role/add.html | 11 +-- .../resources/templates/system/role/edit.html | 11 +-- .../resources/templates/system/user/add.html | 12 ++- .../resources/templates/system/user/edit.html | 11 +-- .../resources/templates/tool/build/build.html | 11 +-- 6 files changed, 94 insertions(+), 35 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css b/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css index 3831e73c..020fbfad 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css +++ b/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css @@ -413,6 +413,79 @@ label.error { background-position: -180px 0 } +/* 切换开关 */ +.toggle-switch { + display: -webkit-inline-box; + display: -webkit-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + margin-bottom: 0; + padding-top: 8px; +} +.toggle-switch input { + height: 0; + width: 0; + position: absolute; + opacity: 0; +} +.toggle-switch span { + display: inline-block; + position: relative; + width: 40px; + height: 10px; + -webkit-border-radius: 10px; + border-radius: 10px; + background-color: #ebebeb; + border: 2px solid #ebebeb; + cursor: pointer; + -webkit-transition: all .1s ease; + -o-transition: all .1s ease; + transition: all .1s ease +} +.toggle-switch span:after { + content: ''; + height: 20px; + width: 20px; + -webkit-border-radius: 50%; + border-radius: 50%; + position: absolute; + left: 1px; + top: -7px; + color: #aaa; + -webkit-transition: all .1s ease; + -o-transition: all .1s ease; + transition: all .1s ease; + text-align: center; + font-size: 13px; + background-color: #fff; + -webkit-box-shadow: rgba(0,0,0,.12) 0 1px 6px,rgba(0,0,0,.12) 0 1px 4px; + box-shadow: rgba(0,0,0,.12) 0 1px 6px,rgba(0,0,0,.12) 0 1px 4px +} +.toggle-switch input:checked~span:after { + left: -webkit-calc(100% - 20px); + left: calc(100% - 20px); + background-color: #15c377 +} + +.toggle-switch.switch-solid span { + height: 20px; +} +.toggle-switch.switch-solid span:after { + top: -2px; +} +.switch-solid input:checked~span { + background-color: #15c377; + border-color: #15c377 +} +.switch-solid input:checked~span:after { + background-color: #fff; + color: #15c377 +} + /** 遮罩层 **/ .loaderbox { display: inline-block; diff --git a/ruoyi-admin/src/main/resources/templates/system/role/add.html b/ruoyi-admin/src/main/resources/templates/system/role/add.html index e4b79f69..3a10e681 100644 --- a/ruoyi-admin/src/main/resources/templates/system/role/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/role/add.html @@ -28,13 +28,10 @@
-
- - -
+
diff --git a/ruoyi-admin/src/main/resources/templates/system/role/edit.html b/ruoyi-admin/src/main/resources/templates/system/role/edit.html index c1a4c667..246213bb 100644 --- a/ruoyi-admin/src/main/resources/templates/system/role/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/role/edit.html @@ -29,13 +29,10 @@
-
- - -
+
diff --git a/ruoyi-admin/src/main/resources/templates/system/user/add.html b/ruoyi-admin/src/main/resources/templates/system/user/add.html index abd2d437..e5963383 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/add.html @@ -83,13 +83,10 @@
-
- - -
+
@@ -131,6 +128,7 @@
+
  diff --git a/ruoyi-admin/src/main/resources/templates/system/user/edit.html b/ruoyi-admin/src/main/resources/templates/system/user/edit.html index e7a58944..8fd1a574 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/edit.html @@ -62,13 +62,10 @@
-
- - -
+
diff --git a/ruoyi-admin/src/main/resources/templates/tool/build/build.html b/ruoyi-admin/src/main/resources/templates/tool/build/build.html index 91ef8a07..435fe9ff 100644 --- a/ruoyi-admin/src/main/resources/templates/tool/build/build.html +++ b/ruoyi-admin/src/main/resources/templates/tool/build/build.html @@ -101,13 +101,10 @@
-
- - -
+