shared-ritm 1.1.90 → 1.1.91
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/dist/index.css +1 -1
- package/dist/shared-ritm.es.js +471 -455
- package/dist/shared-ritm.umd.js +2 -2
- package/package.json +1 -1
- package/src/common/app-sheet/AppSheet.vue +38 -10
package/package.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<q-dialog
|
|
3
|
-
|
|
4
|
-
:
|
|
3
|
+
v-model="internalModel"
|
|
4
|
+
:auto-focus="false"
|
|
5
5
|
:focus-trap="false"
|
|
6
|
-
:position="
|
|
7
|
-
:
|
|
6
|
+
:position="position"
|
|
7
|
+
:persistent="persistent"
|
|
8
|
+
:class="customClass"
|
|
9
|
+
full-width
|
|
10
|
+
full-height
|
|
8
11
|
no-shake
|
|
9
12
|
no-esc-dismiss
|
|
10
|
-
full-height
|
|
11
|
-
full-width
|
|
12
13
|
>
|
|
13
|
-
<template v-if="type === 'details'">
|
|
14
|
+
<template v-if="type === 'details' && ready">
|
|
14
15
|
<q-card>
|
|
15
16
|
<div class="wrapper">
|
|
16
17
|
<div class="sheet-header">
|
|
@@ -26,7 +27,7 @@
|
|
|
26
27
|
</div>
|
|
27
28
|
</q-card>
|
|
28
29
|
</template>
|
|
29
|
-
<template v-if="type === 'custom'">
|
|
30
|
+
<template v-if="type === 'custom' && ready">
|
|
30
31
|
<div v-if="loading" class="custom-wrapper">
|
|
31
32
|
<div class="loader">
|
|
32
33
|
<q-spinner-audio v-if="loading" class="loader-spinner" size="md" :thickness="3" color="primary" />
|
|
@@ -38,9 +39,13 @@
|
|
|
38
39
|
</template>
|
|
39
40
|
|
|
40
41
|
<script setup lang="ts">
|
|
41
|
-
import { computed, defineEmits, defineProps, withDefaults } from 'vue'
|
|
42
|
+
import { computed, defineEmits, defineProps, ref, watch, withDefaults } from 'vue'
|
|
42
43
|
|
|
43
44
|
interface DialogProps {
|
|
45
|
+
modelValue: boolean
|
|
46
|
+
position?: string
|
|
47
|
+
persistent?: boolean
|
|
48
|
+
customClass?: string
|
|
44
49
|
dialogRef: any
|
|
45
50
|
loading?: boolean
|
|
46
51
|
title?: string
|
|
@@ -52,6 +57,7 @@ interface DialogProps {
|
|
|
52
57
|
|
|
53
58
|
const props = withDefaults(defineProps<DialogProps>(), {
|
|
54
59
|
title: '',
|
|
60
|
+
position: 'right',
|
|
55
61
|
width: '976px',
|
|
56
62
|
type: 'details',
|
|
57
63
|
loading: false,
|
|
@@ -59,7 +65,7 @@ const props = withDefaults(defineProps<DialogProps>(), {
|
|
|
59
65
|
currentTabName: '',
|
|
60
66
|
})
|
|
61
67
|
|
|
62
|
-
const emit = defineEmits(['update:dialogRef', 'update:currentTabName'])
|
|
68
|
+
const emit = defineEmits(['update:dialogRef', 'update:currentTabName', 'update:modelValue'])
|
|
63
69
|
|
|
64
70
|
const DialogRef = computed({
|
|
65
71
|
get() {
|
|
@@ -69,6 +75,28 @@ const DialogRef = computed({
|
|
|
69
75
|
emit('update:dialogRef', value)
|
|
70
76
|
},
|
|
71
77
|
})
|
|
78
|
+
|
|
79
|
+
const internalModel = ref(props.modelValue)
|
|
80
|
+
const ready = ref(false)
|
|
81
|
+
|
|
82
|
+
watch(
|
|
83
|
+
() => props.modelValue,
|
|
84
|
+
val => {
|
|
85
|
+
internalModel.value = val
|
|
86
|
+
if (val) {
|
|
87
|
+
// отложенный рендер слота после открытия
|
|
88
|
+
setTimeout(() => {
|
|
89
|
+
ready.value = true
|
|
90
|
+
}, 50)
|
|
91
|
+
} else {
|
|
92
|
+
ready.value = false
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
watch(internalModel, val => {
|
|
98
|
+
emit('update:modelValue', val)
|
|
99
|
+
})
|
|
72
100
|
</script>
|
|
73
101
|
|
|
74
102
|
<style lang="scss" scoped>
|