@mythpe/quasar-ui-qui 0.2.19 → 0.2.21
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/form/MAvatarViewer.vue +2 -2
- package/src/components/form/MSignaturePad.vue +2 -2
- package/src/components/transition/MTransition.vue +4 -14
- package/src/components/transition/MTransitionGroup.vue +3 -13
- package/src/components/transition/useTransition.ts +38 -1
package/package.json
CHANGED
|
@@ -233,7 +233,7 @@ defineOptions({
|
|
|
233
233
|
>
|
|
234
234
|
<MColumn :class="contentClass">
|
|
235
235
|
<slot name="top" />
|
|
236
|
-
<
|
|
236
|
+
<MTransitionGroup>
|
|
237
237
|
<div
|
|
238
238
|
v-if="label !== undefined"
|
|
239
239
|
key="label"
|
|
@@ -362,7 +362,7 @@ defineOptions({
|
|
|
362
362
|
@click="openWindow(url)"
|
|
363
363
|
/>
|
|
364
364
|
</div>
|
|
365
|
-
</
|
|
365
|
+
</MTransitionGroup>
|
|
366
366
|
<slot name="caption">
|
|
367
367
|
<div
|
|
368
368
|
v-if="!!caption"
|
|
@@ -160,7 +160,7 @@ watch(url, (url) => {
|
|
|
160
160
|
name="top-input"
|
|
161
161
|
v-bind="scopes"
|
|
162
162
|
/>
|
|
163
|
-
<
|
|
163
|
+
<MTransitionGroup>
|
|
164
164
|
<div
|
|
165
165
|
key="top"
|
|
166
166
|
class="row justify-between items-center q-mb-lg"
|
|
@@ -285,7 +285,7 @@ watch(url, (url) => {
|
|
|
285
285
|
</MColumn>
|
|
286
286
|
</MTransition>
|
|
287
287
|
</div>
|
|
288
|
-
</
|
|
288
|
+
</MTransitionGroup>
|
|
289
289
|
<slot
|
|
290
290
|
:confirmed="confirmed"
|
|
291
291
|
name="bottom-input"
|
|
@@ -10,29 +10,19 @@
|
|
|
10
10
|
lang="ts"
|
|
11
11
|
setup
|
|
12
12
|
>
|
|
13
|
-
import
|
|
13
|
+
import { MTransitionProps as Props } from '../../types'
|
|
14
14
|
import { useTransition } from './useTransition'
|
|
15
15
|
|
|
16
16
|
const props = defineProps<Props>()
|
|
17
|
-
const {
|
|
17
|
+
const { computedProps } = useTransition(props)
|
|
18
18
|
|
|
19
19
|
defineOptions({
|
|
20
|
-
name: 'MTransition'
|
|
21
|
-
inheritAttrs: !1
|
|
20
|
+
name: 'MTransition'
|
|
22
21
|
})
|
|
23
22
|
</script>
|
|
24
23
|
|
|
25
24
|
<template>
|
|
26
|
-
<transition
|
|
27
|
-
v-bind="{
|
|
28
|
-
...$props,
|
|
29
|
-
...$attrs,
|
|
30
|
-
enterActiveClass: getClasses('in'),
|
|
31
|
-
leaveActiveClass: getClasses('out'),
|
|
32
|
-
appear: !noAppear,
|
|
33
|
-
css: !noCss
|
|
34
|
-
}"
|
|
35
|
-
>
|
|
25
|
+
<transition v-bind="computedProps">
|
|
36
26
|
<slot />
|
|
37
27
|
</transition>
|
|
38
28
|
</template>
|
|
@@ -14,25 +14,15 @@ import type { MTransitionGroupProps as Props } from '../../types'
|
|
|
14
14
|
import { useTransition } from './useTransition'
|
|
15
15
|
|
|
16
16
|
const props = defineProps<Props>()
|
|
17
|
-
const {
|
|
17
|
+
const { computedProps } = useTransition(props)
|
|
18
18
|
|
|
19
19
|
defineOptions({
|
|
20
|
-
name: 'MTransitionGroup'
|
|
21
|
-
inheritAttrs: !1
|
|
20
|
+
name: 'MTransitionGroup'
|
|
22
21
|
})
|
|
23
22
|
</script>
|
|
24
23
|
|
|
25
24
|
<template>
|
|
26
|
-
<transition-group
|
|
27
|
-
v-bind="{
|
|
28
|
-
...$props,
|
|
29
|
-
...$attrs,
|
|
30
|
-
enterActiveClass: getClasses('in'),
|
|
31
|
-
leaveActiveClass: getClasses('out'),
|
|
32
|
-
appear: !noAppear,
|
|
33
|
-
css: !noCss
|
|
34
|
-
}"
|
|
35
|
-
>
|
|
25
|
+
<transition-group v-bind="computedProps">
|
|
36
26
|
<slot />
|
|
37
27
|
</transition-group>
|
|
38
28
|
</template>
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* Github: https://github.com/mythpe
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import { computed } from 'vue'
|
|
10
|
+
|
|
9
11
|
export function useTransition (props: any) {
|
|
10
12
|
const getClasses = (mode: 'in' | 'out') => {
|
|
11
13
|
if (mode === 'in' && props.enterActiveClass) {
|
|
@@ -50,5 +52,40 @@ export function useTransition (props: any) {
|
|
|
50
52
|
}
|
|
51
53
|
return classes.join(' ')
|
|
52
54
|
}
|
|
53
|
-
|
|
55
|
+
const computedProps = computed(() => {
|
|
56
|
+
const p = {
|
|
57
|
+
...props,
|
|
58
|
+
enterActiveClass: getClasses('in'),
|
|
59
|
+
leaveActiveClass: getClasses('out'),
|
|
60
|
+
appear: !props.noAppear,
|
|
61
|
+
css: !props.noCss
|
|
62
|
+
}
|
|
63
|
+
const remove = [
|
|
64
|
+
'in',
|
|
65
|
+
'inSlower',
|
|
66
|
+
'inSlow',
|
|
67
|
+
'inFast',
|
|
68
|
+
'inFaster',
|
|
69
|
+
'inDelay',
|
|
70
|
+
'inRepeat',
|
|
71
|
+
'out',
|
|
72
|
+
'outSlower',
|
|
73
|
+
'outSlow',
|
|
74
|
+
'outFast',
|
|
75
|
+
'outFaster',
|
|
76
|
+
'outDelay',
|
|
77
|
+
'outRepeat',
|
|
78
|
+
'noAppear',
|
|
79
|
+
'noCss',
|
|
80
|
+
'enterActiveClass',
|
|
81
|
+
'leaveActiveClass',
|
|
82
|
+
'appear',
|
|
83
|
+
'css'
|
|
84
|
+
]
|
|
85
|
+
for (const removeKey in remove) {
|
|
86
|
+
delete p[removeKey]
|
|
87
|
+
}
|
|
88
|
+
return p
|
|
89
|
+
})
|
|
90
|
+
return { getClasses, computedProps }
|
|
54
91
|
}
|