Skip to content

Commit 4bc7a09

Browse files
committed
fix(dialog-box): fix dialog wrapper animation is not working (#3636)
1 parent 7284629 commit 4bc7a09

File tree

5 files changed

+10
-13
lines changed

5 files changed

+10
-13
lines changed

examples/sites/src/App.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { onMounted, provide, ref } from 'vue'
1616
import { TinyConfigProvider, TinyModal } from '@opentiny/vue'
1717
import { iconClose } from '@opentiny/vue-icon'
1818
import { TinyRemoter } from '@opentiny/next-remoter'
19-
import '@opentiny/next-remoter/dist/style.css'
2019
import { useTinyRemoter, webMcpSessionId } from './composable/useTinyRemoter'
2120
2221
import useTheme from './tools/useTheme'

examples/sites/src/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import { createHead } from '@vueuse/head'
22
import { createApp } from 'vue'
3+
4+
// 由于 @opentiny/next-remoter/dist/style.css 中包含了旧版的弹窗和动画样式,这里调整到最前,不确定是否会有其他影响,请评估
5+
import '@opentiny/next-remoter/dist/style.css'
36
import '@unocss/reset/eric-meyer.css'
47

58
// markdown文件内代码高亮

packages/theme-saas/src/dialog-box/index.less

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@
155155
@apply top-0;
156156
@apply w-full;
157157
@apply h-full;
158-
@apply opacity-30;
159-
@apply bg-black;
158+
@apply bg-transparent;
160159
}
161160

162161
.v-modal-enter {
@@ -231,24 +230,20 @@
231230

232231
@keyframes dialog-fade-in {
233232
0% {
234-
transform: translate3d(0, -20px, 0);
235233
@apply opacity-0;
236234
}
237235

238236
100% {
239-
transform: translate3d(0, 0, 0);
240237
@apply opacity-100;
241238
}
242239
}
243240

244241
@keyframes dialog-fade-out {
245242
0% {
246-
transform: translate3d(0, 0, 0);
247243
@apply opacity-100;
248244
}
249245

250246
100% {
251-
transform: translate3d(0, -20px, 0);
252247
@apply opacity-0;
253248
}
254249
}

packages/theme/src/dialog-box/index.less

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
margin: 0;
3636
display: block;
3737
align-items: normal;
38+
39+
&.is-modal {
40+
background: var(--tv-DialogBox-mask-bg-color);
41+
}
3842
}
3943

4044
&.is-fullscreen {
@@ -205,7 +209,7 @@
205209
top: 0;
206210
width: 100%;
207211
height: 100%;
208-
background: var(--tv-DialogBox-mask-bg-color);
212+
background: transparent;
209213
}
210214

211215
.v-modal-enter {
@@ -283,24 +287,20 @@
283287

284288
@keyframes dialog-fade-in {
285289
0% {
286-
transform: translate3d(0, -20px, 0);
287290
opacity: 0;
288291
}
289292

290293
100% {
291-
transform: translate3d(0, 0, 0);
292294
opacity: 1;
293295
}
294296
}
295297

296298
@keyframes dialog-fade-out {
297299
0% {
298-
transform: translate3d(0, 0, 0);
299300
opacity: 1;
300301
}
301302

302303
100% {
303-
transform: translate3d(0, -20px, 0);
304304
opacity: 0;
305305
}
306306
}

packages/vue/src/dialog-box/src/pc.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
>
1919
<div
2020
v-show="visible"
21-
:class="['tiny-dialog-box__wrapper', dialogClass]"
21+
:class="['tiny-dialog-box__wrapper', dialogClass, { 'is-modal': modal }]"
2222
@click.self="handleWrapperClick"
2323
@mouseup="useMouseEventUp"
2424
@mousedown="useMouseEventDown"

0 commit comments

Comments
 (0)