kui-vue
Version:
A lightweight desktop UI component library suitable for Vue.js 2.
220 lines (185 loc) • 3.69 kB
text/less
@import "../../styles/var.less";
.k-popconfirm {
display: inline-block;
// position: relative;
min-width: 200px;
// max-width: 300px;
font-size: 12px;
line-height: 1.5;
position: absolute;
z-index: 1001;
color: var(--kui-color-font);
&[k-placement^="top"] {
.k-popconfirm-arrow {
bottom: -7px;
height: 9px;
}
.k-popconfirm-content {
margin-bottom: 12px;
}
}
&[k-placement="top"] {
.k-popconfirm-arrow {
left: 50%;
transform: translateX(-50%);
}
}
&[k-placement="top-right"] {
.k-popconfirm-arrow {
right: 10px;
}
}
&[k-placement="top-left"] {
.k-popconfirm-arrow {
left: 10px;
}
}
&[k-placement^="bottom"] {
.k-popconfirm-arrow {
top: -7px;
height: 9px;
transform: rotate(180deg);
}
.k-popconfirm-content {
margin-top: 12px;
}
}
&[k-placement="bottom"] {
.k-popconfirm-arrow {
left: 50%;
}
}
&[k-placement="bottom-left"] {
.k-popconfirm-arrow {
left: 10px;
}
}
&[k-placement="bottom-right"] {
.k-popconfirm-arrow {
right: 10px;
}
}
&[k-placement^="left"] {
.k-popconfirm-arrow {
right: -14px;
width: 23px;
height: 9px;
transform: rotate(-90deg);
}
.k-popconfirm-content {
margin-right: 12px;
}
}
&[k-placement="left"] {
.k-popconfirm-arrow {
top: 50%;
transform: translateY(-50%) rotate(-90deg);
}
}
&[k-placement="left-bottom"] {
.k-popconfirm-arrow {
bottom: 17px;
}
}
&[k-placement="left-top"] {
.k-popconfirm-arrow {
top: 17px;
}
}
&[k-placement^="right"] {
.k-popconfirm-arrow {
left: -14px;
width: 23px;
height: 9px;
transform: rotate(90deg);
}
.k-popconfirm-content {
margin-left: 12px;
}
}
&[k-placement="right"] {
.k-popconfirm-arrow {
top: 50%;
transform: translateY(-50%) rotate(90deg);
}
}
&[k-placement="right-top"] {
.k-popconfirm-arrow {
top: 17px;
}
}
&[k-placement="right-bottom"] {
.k-popconfirm-arrow {
bottom: 17px;
}
}
}
.k-popconfirm-content {
// .k-popconfirm-inner {
background: var(--kui-color-back-10);
// background: #333;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
border-radius: 12px; //var(--kui-border-radius);
position: relative;
// border: 1px solid var(--kui-color-border);
// }
border: 1px solid var(--kui-color-border);
#ot {
stroke-width: 0.1em;
stroke: var(--kui-color-border);
}
.k-popconfirm-body {
padding: 18px 18px 10px 18px;
box-sizing: border-box;
position: relative;
display: flex;
align-items: flex-start;
}
.k-icon {
font-size: 18px;
color: var(--kui-color-warning);
margin-right: 5px;
margin-top: 2px;
}
.k-popconfirm-footer {
text-align: right;
padding-top: 10px;
}
.k-popconfirm-title {
font-size: 14px;
}
.k-popconfirm-arrow {
position: absolute;
box-sizing: border-box;
display: flex;
color: var(--kui-color-back-10);
// color:inherit;
width: 23px;
height: 9px;
}
.k-popconfirm-footer {
text-align: right;
padding: 8px 16px 16px;
.k-btn {
margin-left: 10px;
}
}
}
@keyframes k-pop-zoom {
from {
opacity: 0;
transform: scale(0.8, 0.8);
}
to {
opacity: 1;
transform: scale(1, 1);
}
}
.k-popconfirm-enter-active {
// transform-origin: center bottom;
animation: k-pop-zoom 0.3s;
}
.k-popconfirm-leave-active {
// transform-origin: center bottom;
animation: k-pop-zoom 0.3s reverse;
}