@mythpe/quasar-ui-qui 0.4.7 → 0.4.9
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
|
@@ -154,24 +154,26 @@ defineOptions({
|
|
|
154
154
|
}"
|
|
155
155
|
v-on="listeners"
|
|
156
156
|
>
|
|
157
|
-
<template
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
<div
|
|
163
|
-
v-if="!!getLabel"
|
|
164
|
-
:class="errorMessage ? undefined : 'text-body'"
|
|
157
|
+
<template #default>
|
|
158
|
+
<slot name="default">
|
|
159
|
+
<MRow
|
|
160
|
+
v-if="!!getLabel || !help"
|
|
161
|
+
class="items-center"
|
|
165
162
|
>
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
163
|
+
<div
|
|
164
|
+
v-if="!!getLabel"
|
|
165
|
+
:class="errorMessage ? undefined : 'text-body'"
|
|
166
|
+
>
|
|
167
|
+
{{ getLabel }}
|
|
168
|
+
</div>
|
|
169
|
+
<MHelpRow
|
|
170
|
+
v-if="!!help"
|
|
171
|
+
:right="!!getLabel"
|
|
172
|
+
:text="help"
|
|
173
|
+
tooltip
|
|
174
|
+
/>
|
|
175
|
+
</MRow>
|
|
176
|
+
</slot>
|
|
175
177
|
</template>
|
|
176
178
|
</q-checkbox>
|
|
177
179
|
</q-field>
|
package/src/utils/Helpers.ts
CHANGED
|
@@ -297,15 +297,17 @@ export const Helpers = {
|
|
|
297
297
|
}
|
|
298
298
|
return `//${path}`
|
|
299
299
|
},
|
|
300
|
-
formatMoney (value: any = '', suffix: string = ''): string {
|
|
300
|
+
formatMoney (value: any = '', suffix: string = '', options?: Intl.NumberFormatOptions): string {
|
|
301
301
|
let numValue = typeof value !== 'number' ? parseFloat(value) : value
|
|
302
302
|
if (isNaN(numValue)) {
|
|
303
303
|
numValue = 0.00
|
|
304
304
|
}
|
|
305
|
-
const
|
|
305
|
+
const opt = {
|
|
306
306
|
minimumFractionDigits: 2,
|
|
307
|
-
maximumFractionDigits: 2
|
|
308
|
-
|
|
307
|
+
maximumFractionDigits: 2,
|
|
308
|
+
...(options || {})
|
|
309
|
+
}
|
|
310
|
+
const formattedValue = numValue.toLocaleString('en-US', opt)
|
|
309
311
|
return `${formattedValue} ${suffix}`.trim()
|
|
310
312
|
},
|
|
311
313
|
calculateAspectRatio: (width: number | string, height: number | string): [number, string] => {
|