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 @@