popconfirm支持disabled
parent
9c52169a5b
commit
ab2a1945f2
|
@ -23,7 +23,8 @@ const DEFAULT_TIPS = '请确认你的操作!'
|
|||
class PopConfirm extends Component {
|
||||
static props = {
|
||||
title: 'str!',
|
||||
confirmButtonType: 'str!primary'
|
||||
confirmButtonType: 'str!primary',
|
||||
disabled: false
|
||||
}
|
||||
|
||||
static styles = [
|
||||
|
@ -34,6 +35,18 @@ class PopConfirm extends Component {
|
|||
|
||||
.container {
|
||||
position: relative;
|
||||
|
||||
.wrapper {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
:host([disabled]) {
|
||||
opacity: 0.6;
|
||||
|
||||
.container .wrapper {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
|
@ -144,7 +157,7 @@ class PopConfirm extends Component {
|
|||
let styles = { display: 'block' }
|
||||
let st = document.documentElement.scrollTop
|
||||
|
||||
if (this.#poped) {
|
||||
if (this.disabled || this.#poped) {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue