UNPKG

bin-ui

Version:

基于 vue2.6 / vue-cli3 的 UI 组件库

282 lines (266 loc) 5.07 kB
.bin-modal-mask { position: fixed; top: 0; bottom: 0; left: 0; right: 0; background-color: rgba(0, 0, 0, .5); height: 100%; z-index: 1000; } .bin-modal-wrap { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1000; outline: 0; overflow: auto; &.bin-modal-hidden { display: none !important; } * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; } } .bin-modal { box-sizing: border-box; padding: 0; color: $color-text-default; font-size: $base-font-size; font-variant: tabular-nums; line-height: $base-line-height p { margin: 0; } } .bin-modal-inner { width: auto; margin: 0 auto; position: relative; outline: 0; top: 100px; } .bin-modal-content { position: relative; background-color: $color-white; border: 0; border-radius: $border-base-radius; background-clip: padding-box; box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05); } .bin-modal-close { position: absolute; top: 0; right: 0; z-index: 10; padding: 0; color: $color-text-secondary; line-height: 1; text-decoration: none; background: transparent; border: 0; outline: 0; cursor: pointer; transition: color $animation-duration-base; .icon-close { display: block; width: 56px; height: 56px; font-style: normal; line-height: 56px; text-align: center; text-transform: none; text-rendering: auto; font-size: 20px; color: $color-text-secondary; transition: color $animation-duration-base ease; &:hover { color: $color-text-default; } } } .bin-modal-header { border-bottom: $border-base-light; padding: 16px 24px; height: 55px; .bin-modal-header-inner, .bin-modal-header p { width: 100%; font-size: $header-font-size; color: $color-text-primary; font-weight: 500; line-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } } .bin-modal-body { padding: 24px; font-size: $base-font-size; line-height: $base-line-height; word-wrap: break-word; } .bin-modal-footer { border-top: $border-base-light; padding: 10px 16px; text-align: right; } .modal-fade-enter-active { animation: modal-fade-in $animation-duration-slow; .bin-modal-content { animation: dialog-fade-in $animation-duration-slow; } } .modal-fade-leave-active { animation: modal-fade-out $animation-duration-slow; .bin-modal-content { animation: dialog-fade-out $animation-duration-slow; } } @keyframes dialog-fade-in { 0% { transform: none; opacity: 0; } 5% { transform: scale(0.2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } } @keyframes dialog-fade-out { 0% { transform: scale(1); } 100% { transform: scale(0.2); opacity: 0; } } @keyframes modal-fade-in { 0% { opacity: 0; } 100% { transform: translate3d(0, 0, 0); opacity: 1; } } @keyframes modal-fade-out { 0% { opacity: 1; } 100% { opacity: 0; } } // 垂直居中 .vertical-center-modal { display: flex; align-items: center; justify-content: center; .bin-modal-inner { top: 0; } } // 全屏 .bin-modal-fullscreen { width: 100% !important; top: 0; bottom: 0; position: absolute; > .bin-modal-content { width: 100%; border-radius: 0; position: absolute; top: 0; bottom: 0; > .bin-modal-body { width: 100%; position: absolute; top: 55px; bottom: 53px; overflow: auto; } > .bin-modal-footer { position: absolute; width: 100%; bottom: 0; } } &.bin-modal-fullscreen-no-footer > .bin-modal-content > .bin-modal-body { bottom: 0; } } // 可拖拽时 .bin-modal-content-drag .bin-modal-header { cursor: move; } .bin-modal-no-mask { pointer-events: none; } .bin-modal-content-no-mask { pointer-events: auto; } .bin-modal-content-drag { position: absolute; } // confirm弹窗的样式 .bin-modal-confirm { padding: 0; } .bin-modal-confirm-head { padding: 0 12px 0 0; } .bin-modal-confirm-head-icon { display: inline-block; font-size: 28px; vertical-align: middle; position: relative; top: -2px; .iconfont { font-size: 28px; } } .bin-modal-confirm-head-icon-confirm { color: $color-warning; } .bin-modal-confirm-head-icon-info { color: $color-primary; } .bin-modal-confirm-head-icon-success { color: $color-success; } .bin-modal-confirm-head-icon-warning { color: $color-warning; } .bin-modal-confirm-head-icon-danger { color: $color-danger; } .bin-modal-confirm-head-title { display: inline-block; vertical-align: middle; margin-left: 12px; font-size: $header-font-size; color: $color-text-primary; } .bin-modal-confirm-body { padding-left: 42px; font-size: $base-font-size; color: $color-text-default; position: relative; p { margin: 0; padding: 0; } } .bin-modal-confirm-footer { margin-top: 10px; text-align: right; }