@bildvitta/quasar-ui-asteroid 3.14.0-beta.4 → 3.14.0-beta.6
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
CHANGED
|
@@ -50,7 +50,7 @@ const props = defineProps({
|
|
|
50
50
|
|
|
51
51
|
maxWidth: {
|
|
52
52
|
type: String,
|
|
53
|
-
default: ''
|
|
53
|
+
default: '60%'
|
|
54
54
|
},
|
|
55
55
|
|
|
56
56
|
position: {
|
|
@@ -74,15 +74,16 @@ const emit = defineEmits(['update:modelValue'])
|
|
|
74
74
|
const attrs = useAttrs()
|
|
75
75
|
const screen = useScreen()
|
|
76
76
|
|
|
77
|
+
// computed
|
|
78
|
+
const normalizedMaxWidth = computed(() => screen.isSmall ? '100%' : props.maxWidth)
|
|
79
|
+
|
|
77
80
|
const loadingStyle = computed(() => {
|
|
78
81
|
return {
|
|
79
|
-
right: `calc(100% - ${
|
|
82
|
+
right: `calc(100% - ${normalizedMaxWidth.value})`
|
|
80
83
|
}
|
|
81
84
|
})
|
|
82
85
|
|
|
83
86
|
const attributes = computed(() => {
|
|
84
|
-
const maxWidth = screen.isSmall ? '100%' : props.maxWidth
|
|
85
|
-
|
|
86
87
|
const { modelValue } = attrs
|
|
87
88
|
|
|
88
89
|
return {
|
|
@@ -92,7 +93,7 @@ const attributes = computed(() => {
|
|
|
92
93
|
...props.dialogProps,
|
|
93
94
|
|
|
94
95
|
cancel: false,
|
|
95
|
-
maxWidth,
|
|
96
|
+
maxWidth: normalizedMaxWidth.value,
|
|
96
97
|
maximized: true,
|
|
97
98
|
ok: false,
|
|
98
99
|
position: props.position,
|
|
@@ -68,12 +68,6 @@ const { isNotificationsEnabled, setUnreadNotificationsCount } = useNotifications
|
|
|
68
68
|
const menuDrawer = ref(false)
|
|
69
69
|
const notificationsDrawer = ref(false)
|
|
70
70
|
|
|
71
|
-
/**
|
|
72
|
-
* Como está sendo utilizado em um watcher com a propriedade 'immediate: true',
|
|
73
|
-
* é necessário criar a variável antes de atribuí-la ao watcher, para assim conseguir pará-lo.
|
|
74
|
-
*/
|
|
75
|
-
let unreadNotificationsCountWatcher = () => {}
|
|
76
|
-
|
|
77
71
|
// computed
|
|
78
72
|
const defaultAppMenuProps = computed(() => {
|
|
79
73
|
return {
|
|
@@ -84,19 +78,7 @@ const defaultAppMenuProps = computed(() => {
|
|
|
84
78
|
|
|
85
79
|
const showMenuDrawer = computed(() => !screen.untilLarge || menuDrawer.value)
|
|
86
80
|
|
|
87
|
-
|
|
88
|
-
* A propriedade "initialUnreadNotificationsCount" é escutada apenas uma vez,
|
|
89
|
-
* quando ela é iniciada, seta o "unreadNotificationsCount" do composable,
|
|
90
|
-
* após isto quem controla é o QasLayout.
|
|
91
|
-
*/
|
|
92
|
-
unreadNotificationsCountWatcher = watch(() => props.initialUnreadNotificationsCount, value => {
|
|
93
|
-
if (value) {
|
|
94
|
-
setUnreadNotificationsCount(value)
|
|
95
|
-
|
|
96
|
-
// finaliza o watcher
|
|
97
|
-
unreadNotificationsCountWatcher()
|
|
98
|
-
}
|
|
99
|
-
}, { immediate: true })
|
|
81
|
+
watch(() => props.initialUnreadNotificationsCount, setUnreadNotificationsCount, { immediate: true })
|
|
100
82
|
|
|
101
83
|
// functions
|
|
102
84
|
function signOut () {
|