@ebiz/designer-components 0.0.18-beta.8 → 0.0.18-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/TdesignDialog.vue +10 -38
package/package.json
CHANGED
@@ -1,33 +1,12 @@
|
|
1
1
|
<template>
|
2
|
-
<t-dialog
|
3
|
-
|
4
|
-
:
|
5
|
-
:
|
6
|
-
:
|
7
|
-
|
8
|
-
|
9
|
-
:
|
10
|
-
:confirm-btn="confirmBtn"
|
11
|
-
:default-visible="defaultVisible"
|
12
|
-
:destroy-on-close="destroyOnClose"
|
13
|
-
:draggable="draggable"
|
14
|
-
:footer="footer"
|
15
|
-
:header="header"
|
16
|
-
:mode="mode"
|
17
|
-
:placement="placement"
|
18
|
-
:show-overlay="showOverlay"
|
19
|
-
:width="width"
|
20
|
-
:z-index="zIndex"
|
21
|
-
@cancel="handleCancel"
|
22
|
-
@close="handleClose"
|
23
|
-
@close-btn-click="handleCloseBtnClick"
|
24
|
-
@confirm="handleConfirm"
|
25
|
-
@esc-keydown="handleEscKeydown"
|
26
|
-
@overlay-click="handleOverlayClick"
|
27
|
-
@opened="handleOpened"
|
28
|
-
@closed="handleClosed"
|
29
|
-
@update:visible="handleUpdateVisible"
|
30
|
-
>
|
2
|
+
<t-dialog v-model:visible="isVisible" :attach="attach" :body="body" :cancel-btn="cancelBtn" :close-btn="closeBtn"
|
3
|
+
:close-on-esc-keydown="closeOnEscKeydown" :close-on-overlay-click="closeOnOverlayClick"
|
4
|
+
:confirm-btn="confirmBtn" :default-visible="defaultVisible" :destroy-on-close="destroyOnClose"
|
5
|
+
:draggable="draggable" :footer="footer" :header="header" :mode="mode" :placement="placement"
|
6
|
+
:show-overlay="showOverlay" :width="width" :z-index="zIndex" @cancel="handleCancel" @close="handleClose"
|
7
|
+
@close-btn-click="handleCloseBtnClick" @confirm="handleConfirm" @esc-keydown="handleEscKeydown"
|
8
|
+
@overlay-click="handleOverlayClick" @opened="handleOpened" @closed="handleClosed"
|
9
|
+
@update:visible="handleUpdateVisible">
|
31
10
|
<!-- 头部插槽 -->
|
32
11
|
<template v-if="$slots.header" #header>
|
33
12
|
<slot name="header"></slot>
|
@@ -165,14 +144,7 @@ const props = defineProps({
|
|
165
144
|
});
|
166
145
|
|
167
146
|
// 显示状态
|
168
|
-
const isVisible = ref(props.
|
169
|
-
|
170
|
-
// 监听visible属性变化
|
171
|
-
watch(() => props.visible, (newValue) => {
|
172
|
-
if (newValue !== undefined) {
|
173
|
-
isVisible.value = newValue;
|
174
|
-
}
|
175
|
-
});
|
147
|
+
const isVisible = ref(props.visible);
|
176
148
|
|
177
149
|
// 定义事件
|
178
150
|
const emit = defineEmits([
|
@@ -246,4 +218,4 @@ const handleUpdateVisible = (visible) => {
|
|
246
218
|
|
247
219
|
<style lang="less" scoped>
|
248
220
|
/* 自定义样式 */
|
249
|
-
</style>
|
221
|
+
</style>
|