| | |
| | | </a-popover> |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | <script setup> |
| | | import { defineProps, defineEmits, reactive, watch, computed } from 'vue'; |
| | | |
| | | const props = defineProps<{ |
| | | visible?: boolean; |
| | | loading?: Boolean; |
| | | disabled?: Boolean; |
| | | title?: String; |
| | | okText?: String; |
| | | cancelText?: String; |
| | | width?: Number; |
| | | }>(); |
| | | const props = defineProps(); |
| | | |
| | | const emit = defineEmits(['cancel', 'confirm']); |
| | | |
| | |
| | | return classList.join(' '); |
| | | }); |
| | | |
| | | function onConfirm(e: Event) { |
| | | function onConfirm(e) { |
| | | if (props.disabled) { |
| | | return; |
| | | } |
| | | emit('confirm', e); |
| | | } |
| | | |
| | | function onCancel(e: Event) { |
| | | function onCancel(e) { |
| | | state.sVisible = false; |
| | | emit('cancel', e); |
| | | } |