@mythpe/quasar-ui-qui 0.0.62 → 0.0.64
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
|
@@ -825,7 +825,7 @@ const onSuccess: SubmissionHandler = async (form) => {
|
|
|
825
825
|
return
|
|
826
826
|
}
|
|
827
827
|
loading.value = !0
|
|
828
|
-
const
|
|
828
|
+
const apiServices = getMythApiServicesSchema()
|
|
829
829
|
const fdt = isUpdateMode.value ? 'u' : 'c'
|
|
830
830
|
if (ignoreKeysProps.value) {
|
|
831
831
|
if (typeof ignoreKeysProps.value === 'function') {
|
|
@@ -854,7 +854,7 @@ const onSuccess: SubmissionHandler = async (form) => {
|
|
|
854
854
|
}
|
|
855
855
|
}
|
|
856
856
|
const _conf: any = { params: { fdt, requestWith: getRequestWith(isUpdateMode.value ? 'withUpdate' : 'withStore') || undefined } }
|
|
857
|
-
const method = async () => isUpdateMode.value ? await
|
|
857
|
+
const method = async () => isUpdateMode.value ? await apiServices.update(dialogs.item?.id || '', form, _conf) : await apiServices.store(form, _conf)
|
|
858
858
|
try {
|
|
859
859
|
const { _data, _message, _success }: any = await method()
|
|
860
860
|
_message && alertSuccess(_message)
|
|
@@ -58,171 +58,163 @@ defineOptions({
|
|
|
58
58
|
...pluginOptions.btn,
|
|
59
59
|
ariaLabel: getAriaLabel,
|
|
60
60
|
...$attrs,
|
|
61
|
+
loading,
|
|
61
62
|
label: loading && getLabel ? `${getLabel} ...` : getLabel,
|
|
62
63
|
}"
|
|
63
64
|
>
|
|
64
|
-
<template
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
</template>
|
|
65
|
+
<template #loading>
|
|
66
|
+
<slot name="loading">
|
|
67
|
+
<q-spinner-audio
|
|
68
|
+
v-if="loadingOptions.type === 'audio'"
|
|
69
|
+
:class="{'on-left': hasLabel}"
|
|
70
|
+
:color="loadingColor"
|
|
71
|
+
:size="loadingSize"
|
|
72
|
+
/>
|
|
73
|
+
<q-spinner-ball
|
|
74
|
+
v-if="loadingOptions.type === 'ball'"
|
|
75
|
+
:class="{'on-left': hasLabel}"
|
|
76
|
+
:color="loadingColor"
|
|
77
|
+
:size="loadingSize"
|
|
78
|
+
/>
|
|
79
|
+
<q-spinner-bars
|
|
80
|
+
v-if="loadingOptions.type === 'bars'"
|
|
81
|
+
:class="{'on-left': hasLabel}"
|
|
82
|
+
:color="loadingColor"
|
|
83
|
+
:size="loadingSize"
|
|
84
|
+
/>
|
|
85
|
+
<q-spinner-box
|
|
86
|
+
v-if="loadingOptions.type === 'box'"
|
|
87
|
+
:class="{'on-left': hasLabel}"
|
|
88
|
+
:color="loadingColor"
|
|
89
|
+
:size="loadingSize"
|
|
90
|
+
/>
|
|
91
|
+
<q-spinner-clock
|
|
92
|
+
v-if="loadingOptions.type === 'clock'"
|
|
93
|
+
:class="{'on-left': hasLabel}"
|
|
94
|
+
:color="loadingColor"
|
|
95
|
+
:size="loadingSize"
|
|
96
|
+
/>
|
|
97
|
+
<q-spinner-comment
|
|
98
|
+
v-if="loadingOptions.type === 'comment'"
|
|
99
|
+
:class="{'on-left': hasLabel}"
|
|
100
|
+
:color="loadingColor"
|
|
101
|
+
:size="loadingSize"
|
|
102
|
+
/>
|
|
103
|
+
<q-spinner-cube
|
|
104
|
+
v-if="loadingOptions.type === 'cube'"
|
|
105
|
+
:class="{'on-left': hasLabel}"
|
|
106
|
+
:color="loadingColor"
|
|
107
|
+
:size="loadingSize"
|
|
108
|
+
/>
|
|
109
|
+
<q-spinner-dots
|
|
110
|
+
v-if="loadingOptions.type === 'dots'"
|
|
111
|
+
:class="{'on-left': hasLabel}"
|
|
112
|
+
:color="loadingColor"
|
|
113
|
+
:size="loadingSize"
|
|
114
|
+
/>
|
|
115
|
+
<q-spinner-facebook
|
|
116
|
+
v-if="loadingOptions.type === 'facebook'"
|
|
117
|
+
:class="{'on-left': hasLabel}"
|
|
118
|
+
:color="loadingColor"
|
|
119
|
+
:size="loadingSize"
|
|
120
|
+
/>
|
|
121
|
+
<q-spinner-gears
|
|
122
|
+
v-if="loadingOptions.type === 'gears'"
|
|
123
|
+
:class="{'on-left': hasLabel}"
|
|
124
|
+
:color="loadingColor"
|
|
125
|
+
:size="loadingSize"
|
|
126
|
+
/>
|
|
127
|
+
<q-spinner-grid
|
|
128
|
+
v-if="loadingOptions.type === 'grid'"
|
|
129
|
+
:class="{'on-left': hasLabel}"
|
|
130
|
+
:color="loadingColor"
|
|
131
|
+
:size="loadingSize"
|
|
132
|
+
/>
|
|
133
|
+
<q-spinner-hearts
|
|
134
|
+
v-if="loadingOptions.type === 'hearts'"
|
|
135
|
+
:class="{'on-left': hasLabel}"
|
|
136
|
+
:color="loadingColor"
|
|
137
|
+
:size="loadingSize"
|
|
138
|
+
/>
|
|
139
|
+
<q-spinner-hearts
|
|
140
|
+
v-if="loadingOptions.type === 'hearts'"
|
|
141
|
+
:class="{'on-left': hasLabel}"
|
|
142
|
+
:color="loadingColor"
|
|
143
|
+
:size="loadingSize"
|
|
144
|
+
/>
|
|
145
|
+
<q-spinner-hourglass
|
|
146
|
+
v-if="loadingOptions.type === 'hourglass'"
|
|
147
|
+
:class="{'on-left': hasLabel}"
|
|
148
|
+
:color="loadingColor"
|
|
149
|
+
:size="loadingSize"
|
|
150
|
+
/>
|
|
151
|
+
<q-spinner-infinity
|
|
152
|
+
v-if="loadingOptions.type === 'infinity'"
|
|
153
|
+
:class="{'on-left': hasLabel}"
|
|
154
|
+
:color="loadingColor"
|
|
155
|
+
:size="loadingSize"
|
|
156
|
+
/>
|
|
157
|
+
<q-spinner-ios
|
|
158
|
+
v-if="loadingOptions.type === 'ios'"
|
|
159
|
+
:class="{'on-left': hasLabel}"
|
|
160
|
+
:color="loadingColor"
|
|
161
|
+
:size="loadingSize"
|
|
162
|
+
/>
|
|
163
|
+
<q-spinner-orbit
|
|
164
|
+
v-if="loadingOptions.type === 'orbit'"
|
|
165
|
+
:class="{'on-left': hasLabel}"
|
|
166
|
+
:color="loadingColor"
|
|
167
|
+
:size="loadingSize"
|
|
168
|
+
/>
|
|
169
|
+
<q-spinner-oval
|
|
170
|
+
v-if="loadingOptions.type === 'oval'"
|
|
171
|
+
:class="{'on-left': hasLabel}"
|
|
172
|
+
:color="loadingColor"
|
|
173
|
+
:size="loadingSize"
|
|
174
|
+
/>
|
|
175
|
+
<q-spinner-pie
|
|
176
|
+
v-if="loadingOptions.type === 'pie'"
|
|
177
|
+
:class="{'on-left': hasLabel}"
|
|
178
|
+
:color="loadingColor"
|
|
179
|
+
:size="loadingSize"
|
|
180
|
+
/>
|
|
181
|
+
<q-spinner-puff
|
|
182
|
+
v-if="loadingOptions.type === 'puff'"
|
|
183
|
+
:class="{'on-left': hasLabel}"
|
|
184
|
+
:color="loadingColor"
|
|
185
|
+
:size="loadingSize"
|
|
186
|
+
/>
|
|
187
|
+
<q-spinner-radio
|
|
188
|
+
v-if="loadingOptions.type === 'radio'"
|
|
189
|
+
:class="{'on-left': hasLabel}"
|
|
190
|
+
:color="loadingColor"
|
|
191
|
+
:size="loadingSize"
|
|
192
|
+
/>
|
|
193
|
+
<q-spinner-rings
|
|
194
|
+
v-if="loadingOptions.type === 'rings'"
|
|
195
|
+
:class="{'on-left': hasLabel}"
|
|
196
|
+
:color="loadingColor"
|
|
197
|
+
:size="loadingSize"
|
|
198
|
+
/>
|
|
199
|
+
<q-spinner-tail
|
|
200
|
+
v-if="loadingOptions.type === 'tail'"
|
|
201
|
+
:class="{'on-left': hasLabel}"
|
|
202
|
+
:color="loadingColor"
|
|
203
|
+
:size="loadingSize"
|
|
204
|
+
/>
|
|
205
|
+
<q-spinner
|
|
206
|
+
v-if="loadingOptions.type === 'spinner'"
|
|
207
|
+
:class="{'on-left': hasLabel}"
|
|
208
|
+
:color="loadingColor"
|
|
209
|
+
:size="loadingSize"
|
|
210
|
+
/>
|
|
211
|
+
<template v-if="loadingOptions.noLabel !== !1 && getLabel">
|
|
212
|
+
<span>{{ getLabel }}</span>
|
|
213
|
+
</template>
|
|
214
|
+
</slot>
|
|
215
215
|
</template>
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
#loading
|
|
219
|
-
>
|
|
220
|
-
<slot name="loading" />
|
|
221
|
-
</template>
|
|
222
|
-
<template
|
|
223
|
-
v-if="!!$slots.default"
|
|
224
|
-
#default
|
|
225
|
-
>
|
|
216
|
+
|
|
217
|
+
<template #default>
|
|
226
218
|
<slot name="default" />
|
|
227
219
|
</template>
|
|
228
220
|
</q-btn>
|
|
@@ -11,10 +11,9 @@ import { useI18n } from 'vue-i18n'
|
|
|
11
11
|
import type { RouteLocationNormalizedLoaded } from 'vue-router'
|
|
12
12
|
import type { QDialogOptions, QNotifyCreateOptions } from 'quasar'
|
|
13
13
|
import { copyToClipboard, extend, useQuasar } from 'quasar'
|
|
14
|
-
import { Helpers, type MythType, Str, veeRules } from '../utils'
|
|
14
|
+
import { Helpers, MythKey, type MythType, Str, veeRules } from '../utils'
|
|
15
15
|
import type { MDtColumn, MDtHeadersParameter, ParseHeaderOptions, Vue3MAlertMessage, Vue3MAlertMessageOptions, Vue3MConfirmMessage } from '../types'
|
|
16
16
|
import { computed, inject } from 'vue'
|
|
17
|
-
import { MythKey } from '../utils/const'
|
|
18
17
|
|
|
19
18
|
export const useMyth = () => {
|
|
20
19
|
const plugin = inject(MythKey) as MythType
|
package/src/utils/Str.ts
CHANGED
package/src/utils/vue-plugin.ts
CHANGED
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
* Website: https://www.4myth.com
|
|
6
6
|
* Github: https://github.com/mythpe
|
|
7
7
|
*/
|
|
8
|
+
import lodash from 'lodash'
|
|
9
|
+
import inflection from 'lodash-inflection'
|
|
10
|
+
if (process?.env?.NODE_ENV !== 'development') {
|
|
11
|
+
lodash.mixin(inflection)
|
|
12
|
+
}
|
|
8
13
|
|
|
9
14
|
import type { App } from 'vue'
|
|
10
15
|
import { name, version } from '../../package.json'
|