diff --git a/src/modal/popconfirm.js b/src/modal/popconfirm.js index cc83745..b174bc6 100644 --- a/src/modal/popconfirm.js +++ b/src/modal/popconfirm.js @@ -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 }