@mythpe/quasar-ui-qui 0.1.56 → 0.1.58
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/boot/register.ts +3 -2
- package/src/components/datatable/MDatatable.vue +0 -77
- package/src/components/util/sar/MSarCol.vue +3 -3
- package/src/index.sass +3 -1
- package/src/style/ckeditor5.sass +0 -3
- package/src/style/m-container.sass +0 -1
- package/src/style/m-dt.sass +76 -0
- package/src/style/main.sass +0 -1
- package/src/utils/Helpers.ts +9 -17
- package/src/utils/vue-plugin.ts +0 -1
package/package.json
CHANGED
package/src/boot/register.ts
CHANGED
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { boot } from 'quasar/wrappers'
|
|
10
|
-
import
|
|
10
|
+
import { install } from '../utils'
|
|
11
|
+
import type { InstallOptions } from '../types'
|
|
11
12
|
|
|
12
13
|
export default boot(({ app }) => {
|
|
13
|
-
app.use(
|
|
14
|
+
app.use(install, {} as InstallOptions)
|
|
14
15
|
})
|
|
@@ -1436,80 +1436,3 @@ defineExpose({
|
|
|
1436
1436
|
</q-page-sticky>
|
|
1437
1437
|
</div>
|
|
1438
1438
|
</template>
|
|
1439
|
-
|
|
1440
|
-
<style lang="sass">
|
|
1441
|
-
.touch
|
|
1442
|
-
.m--datatable-fab-tooltip
|
|
1443
|
-
display: none
|
|
1444
|
-
|
|
1445
|
-
.body--light
|
|
1446
|
-
.m--datatable
|
|
1447
|
-
.q-table__top,
|
|
1448
|
-
.q-table__bottom,
|
|
1449
|
-
thead tr:first-child th
|
|
1450
|
-
background: #fff
|
|
1451
|
-
|
|
1452
|
-
.body--dark
|
|
1453
|
-
.m--datatable
|
|
1454
|
-
.q-table__top,
|
|
1455
|
-
.q-table__bottom,
|
|
1456
|
-
thead tr:first-child th
|
|
1457
|
-
background: var(--q-dark-page)
|
|
1458
|
-
|
|
1459
|
-
.m--datatable-component
|
|
1460
|
-
.m--datatable.m--datatable-grid
|
|
1461
|
-
.q-table__top
|
|
1462
|
-
padding-left: 0
|
|
1463
|
-
padding-right: 0
|
|
1464
|
-
|
|
1465
|
-
&__fab
|
|
1466
|
-
margin-bottom: 12rem
|
|
1467
|
-
|
|
1468
|
-
&__fixed
|
|
1469
|
-
thead tr th
|
|
1470
|
-
position: sticky
|
|
1471
|
-
z-index: 1
|
|
1472
|
-
|
|
1473
|
-
thead tr:first-child th
|
|
1474
|
-
top: 0
|
|
1475
|
-
|
|
1476
|
-
.m--datatable:not(.m--datatable-grid)
|
|
1477
|
-
max-height: 80vh
|
|
1478
|
-
|
|
1479
|
-
.m--datatable:not(.m--datatable-grid).q-table--dense
|
|
1480
|
-
&.q-table--loading thead tr:last-child th
|
|
1481
|
-
top: 26px
|
|
1482
|
-
|
|
1483
|
-
.m--datatable:not(.m--datatable-grid):not(.q-table--dense)
|
|
1484
|
-
&.q-table--loading thead tr:last-child th
|
|
1485
|
-
top: 55px
|
|
1486
|
-
|
|
1487
|
-
.q-table__bottom
|
|
1488
|
-
justify-content: start !important
|
|
1489
|
-
|
|
1490
|
-
.q-table__separator.col
|
|
1491
|
-
display: none !important
|
|
1492
|
-
|
|
1493
|
-
.q-table__top
|
|
1494
|
-
align-items: center
|
|
1495
|
-
|
|
1496
|
-
.q-table__separator.col
|
|
1497
|
-
display: none !important
|
|
1498
|
-
|
|
1499
|
-
.q-table__control:last-child
|
|
1500
|
-
padding-left: 8px
|
|
1501
|
-
display: block
|
|
1502
|
-
flex: 10000 1 0
|
|
1503
|
-
width: auto
|
|
1504
|
-
min-width: 0
|
|
1505
|
-
max-width: 100%
|
|
1506
|
-
|
|
1507
|
-
.m--dialog-card
|
|
1508
|
-
.q-card__actions
|
|
1509
|
-
.q-btn
|
|
1510
|
-
padding: 4px 16px !important
|
|
1511
|
-
|
|
1512
|
-
.grid-style-transition
|
|
1513
|
-
transition: transform .28s, background-color .28s
|
|
1514
|
-
|
|
1515
|
-
</style>
|
|
@@ -24,8 +24,8 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
24
24
|
append: !1
|
|
25
25
|
})
|
|
26
26
|
|
|
27
|
-
const { te
|
|
28
|
-
const { __,
|
|
27
|
+
const { te } = useI18n({ useScope: 'global' })
|
|
28
|
+
const { __, formatMoney } = useMyth()
|
|
29
29
|
const getText = computed<string | undefined>(() => {
|
|
30
30
|
if (!props.text?.toString().length) {
|
|
31
31
|
return props.text
|
|
@@ -37,7 +37,7 @@ const getText = computed<string | undefined>(() => {
|
|
|
37
37
|
if (props.string) {
|
|
38
38
|
return te(`labels.${text}`) ? __(`labels.${text}`) : __(text)
|
|
39
39
|
}
|
|
40
|
-
const v =
|
|
40
|
+
const v = formatMoney(text)
|
|
41
41
|
|
|
42
42
|
return v !== null && v !== undefined ? (v?.toString?.() || v) : undefined
|
|
43
43
|
})
|
package/src/index.sass
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
//@import 'quasar/src/css/variables.sass'
|
|
8
8
|
@import './style/ckeditor5.sass'
|
|
9
|
-
@import './style/main.sass'
|
|
10
9
|
@import './style/m-container.sass'
|
|
10
|
+
@import './style/m-dt.sass'
|
|
11
|
+
@import './style/main.sass'
|
|
11
12
|
@import './style/print.sass'
|
|
13
|
+
@import './style/transition'
|
package/src/style/ckeditor5.sass
CHANGED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
|
|
2
|
+
$fixed-dt-height: 80vh !default
|
|
3
|
+
|
|
4
|
+
.touch
|
|
5
|
+
.m--datatable-fab-tooltip
|
|
6
|
+
display: none
|
|
7
|
+
|
|
8
|
+
.body--light
|
|
9
|
+
.m--datatable
|
|
10
|
+
.q-table__top,
|
|
11
|
+
.q-table__bottom,
|
|
12
|
+
thead tr:first-child th
|
|
13
|
+
background: #fff
|
|
14
|
+
|
|
15
|
+
.body--dark
|
|
16
|
+
.m--datatable
|
|
17
|
+
.q-table__top,
|
|
18
|
+
.q-table__bottom,
|
|
19
|
+
thead tr:first-child th
|
|
20
|
+
background: var(--q-dark-page)
|
|
21
|
+
|
|
22
|
+
.m--datatable-component
|
|
23
|
+
.m--datatable.m--datatable-grid
|
|
24
|
+
.q-table__top
|
|
25
|
+
padding-left: 0
|
|
26
|
+
padding-right: 0
|
|
27
|
+
|
|
28
|
+
&__fab
|
|
29
|
+
margin-bottom: 12rem
|
|
30
|
+
|
|
31
|
+
&__fixed
|
|
32
|
+
thead tr th
|
|
33
|
+
position: sticky
|
|
34
|
+
z-index: 1
|
|
35
|
+
|
|
36
|
+
thead tr:first-child th
|
|
37
|
+
top: 0
|
|
38
|
+
|
|
39
|
+
.m--datatable:not(.m--datatable-grid)
|
|
40
|
+
max-height: $fixed-dt-height
|
|
41
|
+
|
|
42
|
+
.m--datatable:not(.m--datatable-grid).q-table--dense
|
|
43
|
+
&.q-table--loading thead tr:last-child th
|
|
44
|
+
top: 26px
|
|
45
|
+
|
|
46
|
+
.m--datatable:not(.m--datatable-grid):not(.q-table--dense)
|
|
47
|
+
&.q-table--loading thead tr:last-child th
|
|
48
|
+
top: 55px
|
|
49
|
+
|
|
50
|
+
.q-table__bottom
|
|
51
|
+
justify-content: start !important
|
|
52
|
+
|
|
53
|
+
.q-table__separator.col
|
|
54
|
+
display: none !important
|
|
55
|
+
|
|
56
|
+
.q-table__top
|
|
57
|
+
align-items: center
|
|
58
|
+
|
|
59
|
+
.q-table__separator.col
|
|
60
|
+
display: none !important
|
|
61
|
+
|
|
62
|
+
.q-table__control:last-child
|
|
63
|
+
padding-left: 8px
|
|
64
|
+
display: block
|
|
65
|
+
flex: 10000 1 0
|
|
66
|
+
width: auto
|
|
67
|
+
min-width: 0
|
|
68
|
+
max-width: 100%
|
|
69
|
+
|
|
70
|
+
.m--dialog-card
|
|
71
|
+
.q-card__actions
|
|
72
|
+
.q-btn
|
|
73
|
+
padding: 4px 16px !important
|
|
74
|
+
|
|
75
|
+
.grid-style-transition
|
|
76
|
+
transition: transform .28s, background-color .28s
|
package/src/style/main.sass
CHANGED
package/src/utils/Helpers.ts
CHANGED
|
@@ -303,24 +303,16 @@ export const Helpers = {
|
|
|
303
303
|
}
|
|
304
304
|
return `//${path}`
|
|
305
305
|
},
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
if (
|
|
309
|
-
|
|
310
|
-
const def = prefix ? (value + ` ${prefix}`) : value
|
|
311
|
-
if (!text) {
|
|
312
|
-
return def
|
|
313
|
-
}
|
|
314
|
-
const after: string = (text.split?.('.')[1] || '')?.toString() || ''
|
|
315
|
-
if (!after) {
|
|
316
|
-
return def
|
|
317
|
-
}
|
|
318
|
-
if (after?.length === 1) {
|
|
319
|
-
value = `${value}0`
|
|
320
|
-
}
|
|
321
|
-
return value?.toString() + (prefix ? ` ${prefix}` : '')
|
|
306
|
+
formatMoney (value: any = '', suffix: string = ''): string {
|
|
307
|
+
let numValue = typeof value !== 'number' ? parseFloat(value) : value
|
|
308
|
+
if (isNaN(numValue)) {
|
|
309
|
+
numValue = 0.00
|
|
322
310
|
}
|
|
323
|
-
|
|
311
|
+
const formattedValue = numValue.toLocaleString('en-US', {
|
|
312
|
+
minimumFractionDigits: 2,
|
|
313
|
+
maximumFractionDigits: 2
|
|
314
|
+
})
|
|
315
|
+
return `${formattedValue} ${suffix}`.trim()
|
|
324
316
|
},
|
|
325
317
|
calculateAspectRatio: (width: number | string, height: number | string): [number, string] => {
|
|
326
318
|
width = Number(width)
|
package/src/utils/vue-plugin.ts
CHANGED
|
@@ -23,7 +23,6 @@ import { MythKey } from './const'
|
|
|
23
23
|
function install (app: App, options: InstallOptions) {
|
|
24
24
|
const myth = createMyth(options)
|
|
25
25
|
app.provide(MythKey, myth)
|
|
26
|
-
// defineOptions(options)
|
|
27
26
|
if (options?.asyncComponents) {
|
|
28
27
|
defineAsyncComponents(app)
|
|
29
28
|
} else {
|