EditDialog 编辑弹窗
基础使用
<dg-edit-dialog :visible="visible" />
<script setup>
const visible = ref(false)
</script>
1
2
3
4
5
显示loading
<dg-edit-dialog :visible="visible" :okLoading="loading" @onConfirm="handleConfirm" />
<script setup>
const visible = ref(false)
const loading = ref(false)
const handleConfirm = async () => {
loading.value = true
await post()
loading.value = false
visible.value = false
}
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
Attributes
| 参数 | 类型 | 说明 | 可选值 | 默认值 |
|---|
| visible | boolean | 是否显示弹窗 | true / false | false |
| title | boolean | 弹窗标题 | — | — |
| okLoading | string | 确认按钮是否显示 loading | true / false | false |
| confirmButtonText | string | 确认按钮文案 | — | 确认 |
| cancelButtonText | string | 取消按钮文案 | — | 取消 |
| onConfirm | function | 确认按钮回调函数 | — | — |
| onCancel | function | 取消按钮回调函数 | — | — |