@d-mok/quasar-app-extension-quasar-axe 2.0.7 → 2.0.10
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/templates/src/boot/axe/Interceptor.ts +6 -14
- package/src/templates/src/boot/axe/components/QxBtn.vue +19 -0
- package/src/templates/src/boot/axe/components/QxFloatBtn.vue +1 -4
- package/src/templates/src/boot/axe/components/QxImg.vue +1 -4
- package/src/templates/src/boot/axe/components/QxLayout.vue +22 -24
- package/src/templates/src/boot/axe/components/QxMenuItem.vue +7 -22
- package/src/templates/src/boot/axe/components/QxPlate.vue +1 -4
- package/src/templates/src/boot/axe/components/QxSelect.vue +2 -5
- package/src/templates/src/boot/axe/components/QxSignoutBtn.vue +1 -4
- package/src/templates/src/boot/axe/components/QxSortable.vue +1 -4
- package/src/templates/src/boot/axe/components/QxWidget.vue +14 -7
- package/src/templates/src/utils/dialog/custom/dialogBtn.vue +1 -4
- package/src/templates/src/utils/dialog/custom/dialogForm.vue +5 -5
- package/src/templates/src/utils/dialog/custom/dialogTable.vue +1 -4
- package/src/templates/src/utils/dialog/custom/dialogTextarea.vue +1 -4
- package/src/templates/src/utils/dialog/custom/handson.vue +1 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { boot } from 'quasar/wrappers'
|
|
2
2
|
import { LoadingBar } from 'quasar'
|
|
3
3
|
|
|
4
|
-
console.log(
|
|
4
|
+
console.log('[QuasarAxe] Run Boot Interceptor')
|
|
5
5
|
|
|
6
6
|
declare global {
|
|
7
7
|
interface XMLHttpRequest {
|
|
@@ -61,34 +61,26 @@ export function setFetchInterceptor(
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
64
|
function isLogRocket(request: XMLHttpRequest): boolean {
|
|
68
65
|
return request._url.startsWith('https://r.lr-ingest.io')
|
|
69
66
|
}
|
|
70
67
|
|
|
71
68
|
setAjaxInterceptor(
|
|
72
|
-
|
|
69
|
+
request => {
|
|
73
70
|
if (!isLogRocket(request)) {
|
|
74
71
|
LoadingBar.start()
|
|
75
72
|
}
|
|
76
73
|
},
|
|
77
|
-
|
|
74
|
+
request => {
|
|
78
75
|
if (!isLogRocket(request)) {
|
|
79
76
|
LoadingBar.stop()
|
|
80
77
|
}
|
|
81
|
-
}
|
|
78
|
+
}
|
|
82
79
|
)
|
|
83
80
|
|
|
84
81
|
setFetchInterceptor(
|
|
85
82
|
() => LoadingBar.start(),
|
|
86
|
-
() => LoadingBar.stop()
|
|
83
|
+
() => LoadingBar.stop()
|
|
87
84
|
)
|
|
88
85
|
|
|
89
|
-
|
|
90
|
-
export default boot(({ app, router }) => {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
})
|
|
94
|
-
|
|
86
|
+
export default boot(({ app, router }) => {})
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-btn v-bind="$attrs">
|
|
3
|
+
<q-tooltip
|
|
4
|
+
class="text-body1"
|
|
5
|
+
v-if="tooltip"
|
|
6
|
+
:delay="150"
|
|
7
|
+
>{{ tooltip }}</q-tooltip
|
|
8
|
+
>
|
|
9
|
+
</q-btn>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script lang="ts" setup>
|
|
13
|
+
const props = withDefaults(
|
|
14
|
+
defineProps<{
|
|
15
|
+
tooltip?: string
|
|
16
|
+
}>(),
|
|
17
|
+
{}
|
|
18
|
+
)
|
|
19
|
+
</script>
|
|
@@ -81,10 +81,7 @@
|
|
|
81
81
|
</q-layout>
|
|
82
82
|
</template>
|
|
83
83
|
|
|
84
|
-
<script
|
|
85
|
-
lang="ts"
|
|
86
|
-
setup
|
|
87
|
-
>
|
|
84
|
+
<script lang="ts" setup>
|
|
88
85
|
import { ref } from 'vue'
|
|
89
86
|
|
|
90
87
|
type item = {
|
|
@@ -94,26 +91,27 @@ type item = {
|
|
|
94
91
|
link: string
|
|
95
92
|
}
|
|
96
93
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
94
|
+
const props = withDefaults(
|
|
95
|
+
defineProps<{
|
|
96
|
+
title: string
|
|
97
|
+
appendix?: string
|
|
98
|
+
onClickAppendix?: () => void
|
|
99
|
+
items: item[]
|
|
100
|
+
width?: string
|
|
101
|
+
showDrawer?: boolean
|
|
102
|
+
view?: string
|
|
103
|
+
noHeader?: boolean
|
|
104
|
+
onSignOut?: () => void
|
|
105
|
+
account?: string
|
|
106
|
+
}>(),
|
|
107
|
+
{
|
|
108
|
+
appendix: '',
|
|
109
|
+
width: '1200px',
|
|
110
|
+
showDrawer: false,
|
|
111
|
+
view: 'hHh LpR fFf',
|
|
112
|
+
noHeader: false,
|
|
113
|
+
}
|
|
114
|
+
)
|
|
117
115
|
|
|
118
116
|
let open = ref(false)
|
|
119
117
|
</script>
|
|
@@ -26,26 +26,11 @@
|
|
|
26
26
|
</q-item>
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
|
-
<script lang="ts">
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
required: true,
|
|
37
|
-
},
|
|
38
|
-
caption: {
|
|
39
|
-
type: String,
|
|
40
|
-
default: '',
|
|
41
|
-
},
|
|
42
|
-
link: {
|
|
43
|
-
type: String,
|
|
44
|
-
},
|
|
45
|
-
icon: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: '',
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
})
|
|
29
|
+
<script lang="ts" setup>
|
|
30
|
+
defineProps<{
|
|
31
|
+
title: string
|
|
32
|
+
caption?: string
|
|
33
|
+
link: string
|
|
34
|
+
icon?: string
|
|
35
|
+
}>()
|
|
51
36
|
</script>
|
|
@@ -7,10 +7,7 @@
|
|
|
7
7
|
/>
|
|
8
8
|
</template>
|
|
9
9
|
|
|
10
|
-
<script
|
|
11
|
-
lang="ts"
|
|
12
|
-
setup
|
|
13
|
-
>
|
|
10
|
+
<script lang="ts" setup>
|
|
14
11
|
import { watch } from 'vue'
|
|
15
12
|
import { useVModel } from '@vueuse/core'
|
|
16
13
|
import _ from 'lodash'
|
|
@@ -23,7 +20,7 @@ const props = withDefaults(
|
|
|
23
20
|
ticker?: number
|
|
24
21
|
}>(),
|
|
25
22
|
{
|
|
26
|
-
optionLabel:
|
|
23
|
+
optionLabel: ($: any) => String($),
|
|
27
24
|
ticker: 0,
|
|
28
25
|
}
|
|
29
26
|
)
|
|
@@ -8,7 +8,12 @@
|
|
|
8
8
|
<q-card flat>
|
|
9
9
|
<q-card-section>
|
|
10
10
|
<div class="row items-center">
|
|
11
|
-
<div
|
|
11
|
+
<div
|
|
12
|
+
v-if="title"
|
|
13
|
+
class="text-h5 text-weight-bold"
|
|
14
|
+
>
|
|
15
|
+
{{ title }}
|
|
16
|
+
</div>
|
|
12
17
|
<q-space />
|
|
13
18
|
<div v-if="!(noClose ?? false)">
|
|
14
19
|
<q-btn
|
|
@@ -25,17 +30,14 @@
|
|
|
25
30
|
</q-drawer>
|
|
26
31
|
</template>
|
|
27
32
|
|
|
28
|
-
<script
|
|
29
|
-
lang="ts"
|
|
30
|
-
setup
|
|
31
|
-
>
|
|
33
|
+
<script lang="ts" setup>
|
|
32
34
|
import { computed } from 'vue'
|
|
33
35
|
|
|
34
36
|
const props = defineProps<{
|
|
35
37
|
name?: string
|
|
36
|
-
modelValue
|
|
38
|
+
modelValue?: string | boolean
|
|
37
39
|
width?: number
|
|
38
|
-
title
|
|
40
|
+
title?: string
|
|
39
41
|
side?: 'right' | 'left'
|
|
40
42
|
noClose?: boolean
|
|
41
43
|
}>()
|
|
@@ -45,11 +47,16 @@ const emit = defineEmits(['update:model-value'])
|
|
|
45
47
|
function onClose() {
|
|
46
48
|
if (typeof props.modelValue === 'string') emit('update:model-value', '')
|
|
47
49
|
if (typeof props.modelValue === 'boolean') emit('update:model-value', false)
|
|
50
|
+
if (props.modelValue === undefined) emit('update:model-value', false)
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
let on = computed(() => {
|
|
54
|
+
// if undefined, default true
|
|
55
|
+
if (props.modelValue === undefined) return true
|
|
56
|
+
// if is string, check if is my name
|
|
51
57
|
if (typeof props.modelValue === 'string')
|
|
52
58
|
return props.modelValue === (props.name ?? 'xxx')
|
|
59
|
+
// if is boolean, return it
|
|
53
60
|
if (typeof props.modelValue === 'boolean') return props.modelValue
|
|
54
61
|
})
|
|
55
62
|
</script>
|
|
@@ -59,10 +59,7 @@
|
|
|
59
59
|
</q-dialog>
|
|
60
60
|
</template>
|
|
61
61
|
|
|
62
|
-
<script
|
|
63
|
-
lang="ts"
|
|
64
|
-
setup
|
|
65
|
-
>
|
|
62
|
+
<script lang="ts" setup>
|
|
66
63
|
import { useDialogPluginComponent } from 'quasar'
|
|
67
64
|
import { ref } from 'vue'
|
|
68
65
|
import { toSchema, isMatchSchema, clone } from './schema'
|
|
@@ -116,6 +113,9 @@ function getType(field: string): string {
|
|
|
116
113
|
}
|
|
117
114
|
|
|
118
115
|
function valid() {
|
|
119
|
-
return
|
|
116
|
+
return (
|
|
117
|
+
props.validator(dummy.value) === true &&
|
|
118
|
+
isMatchSchema(dummy.value, schema)
|
|
119
|
+
)
|
|
120
120
|
}
|
|
121
121
|
</script>
|