shared-ritm 1.2.88 → 1.2.90
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/dist/index.css +1 -1
- package/dist/shared-ritm.es.js +2534 -2542
- package/dist/shared-ritm.umd.js +106 -106
- package/package.json +1 -1
- package/src/common/app-sheet-new/AppSheetNew.vue +10 -20
- package/src/common/app-table/AppTable.vue +5 -1
- package/src/common/app-table/controllers/useBaseTable.ts +4 -1
package/package.json
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<q-dialog
|
|
3
|
-
|
|
4
|
-
:model-value="true"
|
|
3
|
+
:model-value="modelValue"
|
|
5
4
|
:position="'right'"
|
|
6
5
|
:class="$style['sheet-dialog']"
|
|
7
6
|
:persistent="persistent"
|
|
8
7
|
no-shake
|
|
9
8
|
no-esc-dismiss
|
|
10
9
|
full-height
|
|
11
|
-
|
|
12
|
-
@before-hide="emit('before-hide')"
|
|
10
|
+
@update:model-value="emit('update:modelValue', $event)"
|
|
13
11
|
>
|
|
14
|
-
<div v-if="loading" class="custom-wrapper">
|
|
12
|
+
<div v-if="loading" class="custom-wrapper" :style="{ width }">
|
|
15
13
|
<div class="loader">
|
|
16
14
|
<q-spinner-audio v-if="loading" class="loader-spinner" size="md" :thickness="3" color="primary" />
|
|
17
15
|
</div>
|
|
18
16
|
</div>
|
|
19
|
-
<div v-else class="wrapper">
|
|
17
|
+
<div v-else class="wrapper" :style="{ width }">
|
|
20
18
|
<div v-if="tabs?.length" class="sidebar" :class="{ noTitle: !tabsTitle }" :style="{ width: sidebarWidth }">
|
|
21
19
|
<h5 v-if="tabsTitle">{{ tabsTitle }}</h5>
|
|
22
20
|
<q-tabs
|
|
@@ -57,11 +55,11 @@
|
|
|
57
55
|
</template>
|
|
58
56
|
|
|
59
57
|
<script setup lang="ts">
|
|
60
|
-
import { computed, defineEmits, defineProps,
|
|
58
|
+
import { computed, defineEmits, defineProps, useSlots, withDefaults } from 'vue'
|
|
61
59
|
import { QDialog } from 'quasar'
|
|
62
60
|
|
|
63
61
|
interface DialogProps {
|
|
64
|
-
|
|
62
|
+
modelValue: boolean
|
|
65
63
|
loading?: boolean
|
|
66
64
|
title?: string
|
|
67
65
|
tabsTitle?: string
|
|
@@ -74,6 +72,7 @@ interface DialogProps {
|
|
|
74
72
|
}
|
|
75
73
|
|
|
76
74
|
const props = withDefaults(defineProps<DialogProps>(), {
|
|
75
|
+
modelValue: false,
|
|
77
76
|
title: '',
|
|
78
77
|
tabsTitle: '',
|
|
79
78
|
width: '1200px',
|
|
@@ -85,19 +84,10 @@ const props = withDefaults(defineProps<DialogProps>(), {
|
|
|
85
84
|
persistent: false,
|
|
86
85
|
})
|
|
87
86
|
|
|
88
|
-
const emit = defineEmits(['update:
|
|
87
|
+
const emit = defineEmits(['update:modelValue', 'update:tabId', 'close', 'before-hide'])
|
|
89
88
|
|
|
90
89
|
const slots = useSlots()
|
|
91
90
|
|
|
92
|
-
const DialogRef = computed({
|
|
93
|
-
get() {
|
|
94
|
-
return props.dialogRef
|
|
95
|
-
},
|
|
96
|
-
set(value) {
|
|
97
|
-
emit('update:dialogRef', value)
|
|
98
|
-
},
|
|
99
|
-
})
|
|
100
|
-
|
|
101
91
|
const currTabId = computed({
|
|
102
92
|
get() {
|
|
103
93
|
return props.tabs?.find(t => t.id === props.tabId)?.title
|
|
@@ -111,7 +101,7 @@ const currTabId = computed({
|
|
|
111
101
|
|
|
112
102
|
<style lang="scss" scoped>
|
|
113
103
|
.custom-wrapper {
|
|
114
|
-
width:
|
|
104
|
+
max-width: unset;
|
|
115
105
|
background-color: white;
|
|
116
106
|
}
|
|
117
107
|
|
|
@@ -131,6 +121,7 @@ const currTabId = computed({
|
|
|
131
121
|
overflow: hidden;
|
|
132
122
|
font-family: 'NunitoSansFont', sans-serif;
|
|
133
123
|
color: #3f414d;
|
|
124
|
+
max-width: unset;
|
|
134
125
|
}
|
|
135
126
|
|
|
136
127
|
.sidebar {
|
|
@@ -193,7 +184,6 @@ const currTabId = computed({
|
|
|
193
184
|
<style lang="scss" module>
|
|
194
185
|
.sheet-dialog {
|
|
195
186
|
:global(.q-dialog__inner) {
|
|
196
|
-
width: v-bind(width);
|
|
197
187
|
max-width: 95vw;
|
|
198
188
|
}
|
|
199
189
|
|
|
@@ -29,7 +29,11 @@
|
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<template v-for="col in resCols" :key="col.name" #[`header-cell-${col.name}`]="propsSlot">
|
|
32
|
-
<q-th
|
|
32
|
+
<q-th
|
|
33
|
+
:props="propsSlot"
|
|
34
|
+
:class="{ 'cursor-pointer': col.filterType, actions: col.name === 'actions' }"
|
|
35
|
+
:style="col.style"
|
|
36
|
+
>
|
|
33
37
|
<div
|
|
34
38
|
v-if="col.filterType"
|
|
35
39
|
class="row items-center no-wrap"
|
|
@@ -25,7 +25,10 @@ export function useBaseTable(model: {
|
|
|
25
25
|
|
|
26
26
|
watch(
|
|
27
27
|
() => model.columnFilters.value,
|
|
28
|
-
() =>
|
|
28
|
+
async () => {
|
|
29
|
+
currentPage.value = 1
|
|
30
|
+
await loadTable(search.value, currentPage.value)
|
|
31
|
+
},
|
|
29
32
|
{ deep: true },
|
|
30
33
|
)
|
|
31
34
|
|