shared-ritm 1.2.17 → 1.2.18
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/README.md +103 -103
- package/dist/index.css +1 -1
- package/dist/shared-ritm.es.js +3537 -3578
- package/dist/shared-ritm.umd.js +6 -6
- package/dist/types/index.d.ts +1 -2
- package/package.json +1 -1
- package/src/App.vue +2445 -2455
- package/src/api/services/GanttService.ts +17 -17
- package/src/api/services/MetricsService.ts +101 -101
- package/src/api/services/ProjectsService.ts +67 -67
- package/src/api/settings/ApiService.ts +126 -126
- package/src/api/types/Api_Files.ts +1 -1
- package/src/api/types/Api_Projects.ts +55 -55
- package/src/api/types/Api_Repairs.ts +93 -93
- package/src/common/app-checkbox/AppCheckbox.vue +26 -26
- package/src/common/app-date-picker/AppDatePicker.vue +81 -81
- package/src/common/app-dialogs/AppConfirmDialog.vue +100 -100
- package/src/common/app-dropdown/AppDropdown.vue +31 -31
- package/src/common/app-input-search/AppInputSearch.vue +170 -170
- package/src/common/app-layout/AppLayout.vue +5 -1
- package/src/common/app-layout/components/AppLayoutHeader.vue +29 -41
- package/src/common/app-select/AppSelect.vue +157 -157
- package/src/common/app-sidebar/components/SidebarMenuItem.vue +146 -146
- package/src/common/app-toggle/AppToggle.vue +23 -23
- package/src/common/app-wrapper/AppWrapper.vue +28 -28
- package/src/icons/dialogs/RemoveIcon.vue +12 -12
- package/src/icons/dialogs/SafetyIcon.vue +12 -12
- package/src/icons/task/attention-icon.vue +13 -13
- package/src/icons/task/clock-icon.vue +10 -10
- package/src/icons/task/delete-icon.vue +10 -10
- package/src/icons/task/fire-icon.vue +16 -16
- package/src/index.ts +0 -2
- package/src/shared/styles/general.css +96 -96
- package/src/utils/confirm.ts +12 -12
- package/src/utils/notification.ts +9 -9
- package/src/common/app-layout/components/AppLayoutPage.vue +0 -32
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-dialog ref="dialogRef" persistent transition-show="slide-up" transition-hide="slide-down" :class="$style.dialog">
|
|
3
|
-
<q-card :class="$style.modal">
|
|
4
|
-
<q-card-section :class="$style['modal__content']">
|
|
5
|
-
<div :class="$style['modal__content__header']">
|
|
6
|
-
<safety-icon v-if="type === 'edit'" />
|
|
7
|
-
<remove-icon v-if="type === 'delete'" />
|
|
8
|
-
<h4>Подтвердить ?</h4>
|
|
9
|
-
</div>
|
|
10
|
-
<p>{{ content }}</p>
|
|
11
|
-
</q-card-section>
|
|
12
|
-
<q-card-section :class="$style.footer">
|
|
13
|
-
<app-button :class="$style['footer__btn--ok']" label="Подтвердить" @click="onDialogOK" />
|
|
14
|
-
<app-button :class="$style['footer__btn--cancel']" label="Отменить" @click="onDialogHide" />
|
|
15
|
-
</q-card-section>
|
|
16
|
-
</q-card>
|
|
17
|
-
</q-dialog>
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<script setup lang="ts">
|
|
21
|
-
import { useDialogPluginComponent } from 'quasar'
|
|
22
|
-
import AppButton from '@/common/app-button/AppButton.vue'
|
|
23
|
-
import SafetyIcon from '@/icons/dialogs/SafetyIcon.vue'
|
|
24
|
-
import RemoveIcon from '@/icons/dialogs/RemoveIcon.vue'
|
|
25
|
-
|
|
26
|
-
const { onDialogHide, onDialogOK, dialogRef } = useDialogPluginComponent()
|
|
27
|
-
|
|
28
|
-
interface Props {
|
|
29
|
-
content: string
|
|
30
|
-
type: 'delete' | 'edit'
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const props = defineProps<Props>()
|
|
34
|
-
</script>
|
|
35
|
-
|
|
36
|
-
<style lang="scss" module>
|
|
37
|
-
.modal {
|
|
38
|
-
font-family: NunitoSansFont, sans-serif;
|
|
39
|
-
display: flex;
|
|
40
|
-
flex-direction: column;
|
|
41
|
-
width: 400px;
|
|
42
|
-
border-radius: 24px !important;
|
|
43
|
-
justify-content: space-between;
|
|
44
|
-
padding: 40px;
|
|
45
|
-
&__content {
|
|
46
|
-
margin: 0 auto;
|
|
47
|
-
padding: 0;
|
|
48
|
-
flex-grow: 1;
|
|
49
|
-
&__header {
|
|
50
|
-
width: 100%;
|
|
51
|
-
display: flex;
|
|
52
|
-
align-items: center;
|
|
53
|
-
justify-content: center;
|
|
54
|
-
flex-direction: column;
|
|
55
|
-
gap: 16px;
|
|
56
|
-
h4 {
|
|
57
|
-
font-size: 24px;
|
|
58
|
-
font-weight: 600;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
p {
|
|
63
|
-
margin-top: 14px;
|
|
64
|
-
margin-bottom: 30px;
|
|
65
|
-
font-size: 16px;
|
|
66
|
-
text-align: center;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.footer {
|
|
71
|
-
display: flex;
|
|
72
|
-
flex-direction: column;
|
|
73
|
-
gap: 12px;
|
|
74
|
-
align-items: center;
|
|
75
|
-
justify-content: center;
|
|
76
|
-
//height: 146px;
|
|
77
|
-
padding: 0;
|
|
78
|
-
&__btn--ok,
|
|
79
|
-
&__btn--cancel {
|
|
80
|
-
background-color: #3f8cff;
|
|
81
|
-
border-radius: 9px;
|
|
82
|
-
color: white;
|
|
83
|
-
font-size: 16px;
|
|
84
|
-
font-weight: bold;
|
|
85
|
-
width: 300px;
|
|
86
|
-
height: 48px;
|
|
87
|
-
cursor: pointer;
|
|
88
|
-
span {
|
|
89
|
-
color: white;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
&__btn--cancel {
|
|
93
|
-
background-color: white;
|
|
94
|
-
border: 1px solid #3f8cff;
|
|
95
|
-
span {
|
|
96
|
-
color: #3f8cff;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<q-dialog ref="dialogRef" persistent transition-show="slide-up" transition-hide="slide-down" :class="$style.dialog">
|
|
3
|
+
<q-card :class="$style.modal">
|
|
4
|
+
<q-card-section :class="$style['modal__content']">
|
|
5
|
+
<div :class="$style['modal__content__header']">
|
|
6
|
+
<safety-icon v-if="type === 'edit'" />
|
|
7
|
+
<remove-icon v-if="type === 'delete'" />
|
|
8
|
+
<h4>Подтвердить ?</h4>
|
|
9
|
+
</div>
|
|
10
|
+
<p>{{ content }}</p>
|
|
11
|
+
</q-card-section>
|
|
12
|
+
<q-card-section :class="$style.footer">
|
|
13
|
+
<app-button :class="$style['footer__btn--ok']" label="Подтвердить" @click="onDialogOK" />
|
|
14
|
+
<app-button :class="$style['footer__btn--cancel']" label="Отменить" @click="onDialogHide" />
|
|
15
|
+
</q-card-section>
|
|
16
|
+
</q-card>
|
|
17
|
+
</q-dialog>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup lang="ts">
|
|
21
|
+
import { useDialogPluginComponent } from 'quasar'
|
|
22
|
+
import AppButton from '@/common/app-button/AppButton.vue'
|
|
23
|
+
import SafetyIcon from '@/icons/dialogs/SafetyIcon.vue'
|
|
24
|
+
import RemoveIcon from '@/icons/dialogs/RemoveIcon.vue'
|
|
25
|
+
|
|
26
|
+
const { onDialogHide, onDialogOK, dialogRef } = useDialogPluginComponent()
|
|
27
|
+
|
|
28
|
+
interface Props {
|
|
29
|
+
content: string
|
|
30
|
+
type: 'delete' | 'edit'
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const props = defineProps<Props>()
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<style lang="scss" module>
|
|
37
|
+
.modal {
|
|
38
|
+
font-family: NunitoSansFont, sans-serif;
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
width: 400px;
|
|
42
|
+
border-radius: 24px !important;
|
|
43
|
+
justify-content: space-between;
|
|
44
|
+
padding: 40px;
|
|
45
|
+
&__content {
|
|
46
|
+
margin: 0 auto;
|
|
47
|
+
padding: 0;
|
|
48
|
+
flex-grow: 1;
|
|
49
|
+
&__header {
|
|
50
|
+
width: 100%;
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
gap: 16px;
|
|
56
|
+
h4 {
|
|
57
|
+
font-size: 24px;
|
|
58
|
+
font-weight: 600;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
p {
|
|
63
|
+
margin-top: 14px;
|
|
64
|
+
margin-bottom: 30px;
|
|
65
|
+
font-size: 16px;
|
|
66
|
+
text-align: center;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.footer {
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
gap: 12px;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
//height: 146px;
|
|
77
|
+
padding: 0;
|
|
78
|
+
&__btn--ok,
|
|
79
|
+
&__btn--cancel {
|
|
80
|
+
background-color: #3f8cff;
|
|
81
|
+
border-radius: 9px;
|
|
82
|
+
color: white;
|
|
83
|
+
font-size: 16px;
|
|
84
|
+
font-weight: bold;
|
|
85
|
+
width: 300px;
|
|
86
|
+
height: 48px;
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
span {
|
|
89
|
+
color: white;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
&__btn--cancel {
|
|
93
|
+
background-color: white;
|
|
94
|
+
border: 1px solid #3f8cff;
|
|
95
|
+
span {
|
|
96
|
+
color: #3f8cff;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
</style>
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-btn-dropdown :color="color" :content-style="{ width: width || '200px', minWidth: height || '200px' }">
|
|
3
|
-
<template #label>
|
|
4
|
-
<slot name="label">
|
|
5
|
-
{{ label }}
|
|
6
|
-
</slot>
|
|
7
|
-
</template>
|
|
8
|
-
<template #default>
|
|
9
|
-
<slot name="content" />
|
|
10
|
-
</template>
|
|
11
|
-
</q-btn-dropdown>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script setup lang="ts">
|
|
15
|
-
interface Props {
|
|
16
|
-
label?: string
|
|
17
|
-
color?: string
|
|
18
|
-
width?: number
|
|
19
|
-
height?: number
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const props = defineProps<Props>()
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<style scoped lang="scss">
|
|
26
|
-
.q-btn {
|
|
27
|
-
&:before {
|
|
28
|
-
box-shadow: none;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<q-btn-dropdown :color="color" :content-style="{ width: width || '200px', minWidth: height || '200px' }">
|
|
3
|
+
<template #label>
|
|
4
|
+
<slot name="label">
|
|
5
|
+
{{ label }}
|
|
6
|
+
</slot>
|
|
7
|
+
</template>
|
|
8
|
+
<template #default>
|
|
9
|
+
<slot name="content" />
|
|
10
|
+
</template>
|
|
11
|
+
</q-btn-dropdown>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
interface Props {
|
|
16
|
+
label?: string
|
|
17
|
+
color?: string
|
|
18
|
+
width?: number
|
|
19
|
+
height?: number
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const props = defineProps<Props>()
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<style scoped lang="scss">
|
|
26
|
+
.q-btn {
|
|
27
|
+
&:before {
|
|
28
|
+
box-shadow: none;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
</style>
|
|
@@ -1,170 +1,170 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-input
|
|
3
|
-
v-model="value"
|
|
4
|
-
standout
|
|
5
|
-
outlined
|
|
6
|
-
clearable
|
|
7
|
-
dense
|
|
8
|
-
bg-color="white"
|
|
9
|
-
:class="[$style['app-input'], itemClasses]"
|
|
10
|
-
:type="type"
|
|
11
|
-
:readonly="readonly || field"
|
|
12
|
-
:placeholder="label"
|
|
13
|
-
>
|
|
14
|
-
<template #prepend>
|
|
15
|
-
<q-icon>
|
|
16
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
17
|
-
<path
|
|
18
|
-
d="M11.5 21C16.7467 21 21 16.7467 21 11.5C21 6.25329 16.7467 2 11.5 2C6.25329 2 2 6.25329 2 11.5C2 16.7467 6.25329 21 11.5 21Z"
|
|
19
|
-
stroke="#404650"
|
|
20
|
-
stroke-width="1.5"
|
|
21
|
-
stroke-linecap="round"
|
|
22
|
-
stroke-linejoin="round"
|
|
23
|
-
/>
|
|
24
|
-
<path d="M22 22L20 20" stroke="#3F8CFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
|
25
|
-
</svg>
|
|
26
|
-
</q-icon>
|
|
27
|
-
</template>
|
|
28
|
-
</q-input>
|
|
29
|
-
</template>
|
|
30
|
-
|
|
31
|
-
<script lang="ts" setup>
|
|
32
|
-
import { defineProps, defineEmits, computed, withDefaults } from 'vue'
|
|
33
|
-
|
|
34
|
-
import { ValidationRule, VueClassProp, VueStyleProp } from 'quasar/dist/types/api'
|
|
35
|
-
|
|
36
|
-
interface AppQInputProps {
|
|
37
|
-
height?: string
|
|
38
|
-
name?: string | undefined
|
|
39
|
-
mask?: string | undefined
|
|
40
|
-
fillMask?: boolean | string | undefined
|
|
41
|
-
reverseFillMask?: boolean | undefined
|
|
42
|
-
unmaskedValue?: boolean | undefined
|
|
43
|
-
modelValue: string | number | null | undefined
|
|
44
|
-
error?: boolean | undefined
|
|
45
|
-
errorMessage?: string | undefined
|
|
46
|
-
noErrorIcon?: boolean | undefined
|
|
47
|
-
rules?: ValidationRule[] | undefined
|
|
48
|
-
reactiveRules?: boolean | undefined
|
|
49
|
-
lazyRules?: boolean | 'ondemand' | undefined
|
|
50
|
-
label?: string | undefined
|
|
51
|
-
stackLabel?: boolean | undefined
|
|
52
|
-
hint?: string | undefined
|
|
53
|
-
hideHint?: boolean | undefined
|
|
54
|
-
prefix?: string | undefined
|
|
55
|
-
suffix?: string | undefined
|
|
56
|
-
labelColor?: string | undefined
|
|
57
|
-
color?: string | undefined
|
|
58
|
-
bgColor?: string | undefined
|
|
59
|
-
dark?: boolean | undefined
|
|
60
|
-
loading?: boolean | undefined
|
|
61
|
-
clearable?: boolean | undefined
|
|
62
|
-
clearIcon?: string | undefined
|
|
63
|
-
filled?: boolean | undefined
|
|
64
|
-
outlined?: boolean | undefined
|
|
65
|
-
borderless?: boolean | undefined
|
|
66
|
-
bordered?: boolean | undefined
|
|
67
|
-
standout?: boolean | string | undefined
|
|
68
|
-
labelSlot?: boolean | undefined
|
|
69
|
-
bottomSlots?: boolean | undefined
|
|
70
|
-
hideBottomSpace?: boolean | undefined
|
|
71
|
-
counter?: boolean | undefined
|
|
72
|
-
rounded?: boolean | undefined
|
|
73
|
-
square?: boolean | undefined
|
|
74
|
-
dense?: boolean | undefined
|
|
75
|
-
itemAligned?: boolean | undefined
|
|
76
|
-
disable?: boolean | undefined
|
|
77
|
-
readonly?: boolean | undefined
|
|
78
|
-
autofocus?: boolean | undefined
|
|
79
|
-
for?: string | undefined
|
|
80
|
-
shadowText?: string | undefined
|
|
81
|
-
type?:
|
|
82
|
-
| 'text'
|
|
83
|
-
| 'password'
|
|
84
|
-
| 'textarea'
|
|
85
|
-
| 'email'
|
|
86
|
-
| 'search'
|
|
87
|
-
| 'tel'
|
|
88
|
-
| 'file'
|
|
89
|
-
| 'number'
|
|
90
|
-
| 'url'
|
|
91
|
-
| 'time'
|
|
92
|
-
| 'date'
|
|
93
|
-
| undefined
|
|
94
|
-
debounce?: string | number | undefined
|
|
95
|
-
maxlength?: string | number | undefined
|
|
96
|
-
autogrow?: boolean | undefined
|
|
97
|
-
inputClass?: VueClassProp | undefined
|
|
98
|
-
inputStyle?: VueStyleProp | undefined
|
|
99
|
-
onClear?: (value: any) => void
|
|
100
|
-
'onUpdate:modelValue'?: (value: string | number | null) => void
|
|
101
|
-
onFocus?: (evt: Event) => void
|
|
102
|
-
onBlur?: (evt: Event) => void
|
|
103
|
-
onClick?: (evt: Event) => void
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
interface AppInputProps extends AppQInputProps {
|
|
107
|
-
field?: boolean
|
|
108
|
-
required?: boolean
|
|
109
|
-
datePicker?: boolean
|
|
110
|
-
timePicker?: boolean
|
|
111
|
-
dateLocale?: any
|
|
112
|
-
withIcon?: boolean
|
|
113
|
-
iconName?: string
|
|
114
|
-
iconColor?: string
|
|
115
|
-
withButton?: boolean
|
|
116
|
-
buttonIcon?: string
|
|
117
|
-
buttonTooltip?: string
|
|
118
|
-
clearTooltip?: string
|
|
119
|
-
withArrow?: boolean
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
const props = withDefaults(defineProps<AppInputProps>(), {
|
|
123
|
-
dense: true,
|
|
124
|
-
height: '48px',
|
|
125
|
-
outlined: true,
|
|
126
|
-
error: undefined,
|
|
127
|
-
modelValue: '',
|
|
128
|
-
})
|
|
129
|
-
|
|
130
|
-
const emit = defineEmits(['update:modelValue', 'button-click', 'clear', 'focus', 'blur', 'click'])
|
|
131
|
-
|
|
132
|
-
const value = computed({
|
|
133
|
-
get: () =>
|
|
134
|
-
props.modelValue !== null && props.modelValue !== undefined && props.type === 'number'
|
|
135
|
-
? +props.modelValue
|
|
136
|
-
: props.modelValue,
|
|
137
|
-
set: (newValue: any) => emit('update:modelValue', props.type === 'number' ? +newValue : newValue),
|
|
138
|
-
})
|
|
139
|
-
|
|
140
|
-
const itemClasses = computed(() => ({
|
|
141
|
-
'--dense': props.dense,
|
|
142
|
-
'--bordered': props.bordered,
|
|
143
|
-
}))
|
|
144
|
-
</script>
|
|
145
|
-
|
|
146
|
-
<style lang="scss" module>
|
|
147
|
-
.app-input {
|
|
148
|
-
&:global(.q-field--outlined .q-field__control) {
|
|
149
|
-
border-radius: 14px;
|
|
150
|
-
height: v-bind(height);
|
|
151
|
-
align-items: center;
|
|
152
|
-
padding: 0 16px;
|
|
153
|
-
color: #87caff;
|
|
154
|
-
}
|
|
155
|
-
:global(.q-field__control-container) {
|
|
156
|
-
margin-left: 8px;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
@media (max-width: 1440px) {
|
|
160
|
-
.app-input {
|
|
161
|
-
&:global(.q-field--outlined .q-field__control) {
|
|
162
|
-
height: 40px;
|
|
163
|
-
padding: 0 12px;
|
|
164
|
-
}
|
|
165
|
-
:global(.q-field__control-container) {
|
|
166
|
-
margin-left: 6px;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<q-input
|
|
3
|
+
v-model="value"
|
|
4
|
+
standout
|
|
5
|
+
outlined
|
|
6
|
+
clearable
|
|
7
|
+
dense
|
|
8
|
+
bg-color="white"
|
|
9
|
+
:class="[$style['app-input'], itemClasses]"
|
|
10
|
+
:type="type"
|
|
11
|
+
:readonly="readonly || field"
|
|
12
|
+
:placeholder="label"
|
|
13
|
+
>
|
|
14
|
+
<template #prepend>
|
|
15
|
+
<q-icon>
|
|
16
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
17
|
+
<path
|
|
18
|
+
d="M11.5 21C16.7467 21 21 16.7467 21 11.5C21 6.25329 16.7467 2 11.5 2C6.25329 2 2 6.25329 2 11.5C2 16.7467 6.25329 21 11.5 21Z"
|
|
19
|
+
stroke="#404650"
|
|
20
|
+
stroke-width="1.5"
|
|
21
|
+
stroke-linecap="round"
|
|
22
|
+
stroke-linejoin="round"
|
|
23
|
+
/>
|
|
24
|
+
<path d="M22 22L20 20" stroke="#3F8CFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
|
25
|
+
</svg>
|
|
26
|
+
</q-icon>
|
|
27
|
+
</template>
|
|
28
|
+
</q-input>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script lang="ts" setup>
|
|
32
|
+
import { defineProps, defineEmits, computed, withDefaults } from 'vue'
|
|
33
|
+
|
|
34
|
+
import { ValidationRule, VueClassProp, VueStyleProp } from 'quasar/dist/types/api'
|
|
35
|
+
|
|
36
|
+
interface AppQInputProps {
|
|
37
|
+
height?: string
|
|
38
|
+
name?: string | undefined
|
|
39
|
+
mask?: string | undefined
|
|
40
|
+
fillMask?: boolean | string | undefined
|
|
41
|
+
reverseFillMask?: boolean | undefined
|
|
42
|
+
unmaskedValue?: boolean | undefined
|
|
43
|
+
modelValue: string | number | null | undefined
|
|
44
|
+
error?: boolean | undefined
|
|
45
|
+
errorMessage?: string | undefined
|
|
46
|
+
noErrorIcon?: boolean | undefined
|
|
47
|
+
rules?: ValidationRule[] | undefined
|
|
48
|
+
reactiveRules?: boolean | undefined
|
|
49
|
+
lazyRules?: boolean | 'ondemand' | undefined
|
|
50
|
+
label?: string | undefined
|
|
51
|
+
stackLabel?: boolean | undefined
|
|
52
|
+
hint?: string | undefined
|
|
53
|
+
hideHint?: boolean | undefined
|
|
54
|
+
prefix?: string | undefined
|
|
55
|
+
suffix?: string | undefined
|
|
56
|
+
labelColor?: string | undefined
|
|
57
|
+
color?: string | undefined
|
|
58
|
+
bgColor?: string | undefined
|
|
59
|
+
dark?: boolean | undefined
|
|
60
|
+
loading?: boolean | undefined
|
|
61
|
+
clearable?: boolean | undefined
|
|
62
|
+
clearIcon?: string | undefined
|
|
63
|
+
filled?: boolean | undefined
|
|
64
|
+
outlined?: boolean | undefined
|
|
65
|
+
borderless?: boolean | undefined
|
|
66
|
+
bordered?: boolean | undefined
|
|
67
|
+
standout?: boolean | string | undefined
|
|
68
|
+
labelSlot?: boolean | undefined
|
|
69
|
+
bottomSlots?: boolean | undefined
|
|
70
|
+
hideBottomSpace?: boolean | undefined
|
|
71
|
+
counter?: boolean | undefined
|
|
72
|
+
rounded?: boolean | undefined
|
|
73
|
+
square?: boolean | undefined
|
|
74
|
+
dense?: boolean | undefined
|
|
75
|
+
itemAligned?: boolean | undefined
|
|
76
|
+
disable?: boolean | undefined
|
|
77
|
+
readonly?: boolean | undefined
|
|
78
|
+
autofocus?: boolean | undefined
|
|
79
|
+
for?: string | undefined
|
|
80
|
+
shadowText?: string | undefined
|
|
81
|
+
type?:
|
|
82
|
+
| 'text'
|
|
83
|
+
| 'password'
|
|
84
|
+
| 'textarea'
|
|
85
|
+
| 'email'
|
|
86
|
+
| 'search'
|
|
87
|
+
| 'tel'
|
|
88
|
+
| 'file'
|
|
89
|
+
| 'number'
|
|
90
|
+
| 'url'
|
|
91
|
+
| 'time'
|
|
92
|
+
| 'date'
|
|
93
|
+
| undefined
|
|
94
|
+
debounce?: string | number | undefined
|
|
95
|
+
maxlength?: string | number | undefined
|
|
96
|
+
autogrow?: boolean | undefined
|
|
97
|
+
inputClass?: VueClassProp | undefined
|
|
98
|
+
inputStyle?: VueStyleProp | undefined
|
|
99
|
+
onClear?: (value: any) => void
|
|
100
|
+
'onUpdate:modelValue'?: (value: string | number | null) => void
|
|
101
|
+
onFocus?: (evt: Event) => void
|
|
102
|
+
onBlur?: (evt: Event) => void
|
|
103
|
+
onClick?: (evt: Event) => void
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
interface AppInputProps extends AppQInputProps {
|
|
107
|
+
field?: boolean
|
|
108
|
+
required?: boolean
|
|
109
|
+
datePicker?: boolean
|
|
110
|
+
timePicker?: boolean
|
|
111
|
+
dateLocale?: any
|
|
112
|
+
withIcon?: boolean
|
|
113
|
+
iconName?: string
|
|
114
|
+
iconColor?: string
|
|
115
|
+
withButton?: boolean
|
|
116
|
+
buttonIcon?: string
|
|
117
|
+
buttonTooltip?: string
|
|
118
|
+
clearTooltip?: string
|
|
119
|
+
withArrow?: boolean
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const props = withDefaults(defineProps<AppInputProps>(), {
|
|
123
|
+
dense: true,
|
|
124
|
+
height: '48px',
|
|
125
|
+
outlined: true,
|
|
126
|
+
error: undefined,
|
|
127
|
+
modelValue: '',
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
const emit = defineEmits(['update:modelValue', 'button-click', 'clear', 'focus', 'blur', 'click'])
|
|
131
|
+
|
|
132
|
+
const value = computed({
|
|
133
|
+
get: () =>
|
|
134
|
+
props.modelValue !== null && props.modelValue !== undefined && props.type === 'number'
|
|
135
|
+
? +props.modelValue
|
|
136
|
+
: props.modelValue,
|
|
137
|
+
set: (newValue: any) => emit('update:modelValue', props.type === 'number' ? +newValue : newValue),
|
|
138
|
+
})
|
|
139
|
+
|
|
140
|
+
const itemClasses = computed(() => ({
|
|
141
|
+
'--dense': props.dense,
|
|
142
|
+
'--bordered': props.bordered,
|
|
143
|
+
}))
|
|
144
|
+
</script>
|
|
145
|
+
|
|
146
|
+
<style lang="scss" module>
|
|
147
|
+
.app-input {
|
|
148
|
+
&:global(.q-field--outlined .q-field__control) {
|
|
149
|
+
border-radius: 14px;
|
|
150
|
+
height: v-bind(height);
|
|
151
|
+
align-items: center;
|
|
152
|
+
padding: 0 16px;
|
|
153
|
+
color: #87caff;
|
|
154
|
+
}
|
|
155
|
+
:global(.q-field__control-container) {
|
|
156
|
+
margin-left: 8px;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
@media (max-width: 1440px) {
|
|
160
|
+
.app-input {
|
|
161
|
+
&:global(.q-field--outlined .q-field__control) {
|
|
162
|
+
height: 40px;
|
|
163
|
+
padding: 0 12px;
|
|
164
|
+
}
|
|
165
|
+
:global(.q-field__control-container) {
|
|
166
|
+
margin-left: 6px;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
</style>
|
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
<slot name="drawer"></slot>
|
|
8
8
|
<slot name="header"></slot>
|
|
9
9
|
<q-page-container :class="{ container: container }" @wheel="mouseMove">
|
|
10
|
-
<
|
|
10
|
+
<q-page>
|
|
11
|
+
<slot></slot>
|
|
12
|
+
|
|
13
|
+
<slot name="page-bottom"></slot>
|
|
14
|
+
</q-page>
|
|
11
15
|
</q-page-container>
|
|
12
16
|
|
|
13
17
|
<slot name="footer"></slot>
|