pgo-ui 1.1.48 → 1.1.49
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/Radio-B_-QJSkx.js +4 -0
- package/dist/{index-DgZtxmDp.js → index-HmqNPZr5.js} +4881 -4881
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +34 -34
- package/package.json +1 -1
- package/src/components/pgo/forms/DynamicForm.vue +5 -2
- package/src/pgo-components/pages/Dashboard.vue +19 -1
- package/src/pgo-components/pages/ListView.vue +4 -1
- package/dist/Radio-ByEO2VYW.js +0 -4
package/package.json
CHANGED
|
@@ -154,6 +154,7 @@
|
|
|
154
154
|
const clickedButton = ref('');
|
|
155
155
|
const isPreFilled = ref(false)
|
|
156
156
|
const originalFormData = ref({})
|
|
157
|
+
const dataChanged = ref(false)
|
|
157
158
|
|
|
158
159
|
const emit = defineEmits([
|
|
159
160
|
'update:modelValue',
|
|
@@ -1011,12 +1012,14 @@
|
|
|
1011
1012
|
isPreFilled.value = false
|
|
1012
1013
|
originalFormData.value = {}
|
|
1013
1014
|
valid.value = false;
|
|
1014
|
-
formMode.value = props.mode
|
|
1015
|
+
formMode.value = props.mode
|
|
1015
1016
|
formId.value = null
|
|
1016
|
-
emit('close',
|
|
1017
|
+
emit('close', dataChanged.value);
|
|
1018
|
+
dataChanged.value = false;
|
|
1017
1019
|
};
|
|
1018
1020
|
|
|
1019
1021
|
const handleUploadSuccess = () => {
|
|
1022
|
+
dataChanged.value = true;
|
|
1020
1023
|
fetchData();
|
|
1021
1024
|
};
|
|
1022
1025
|
// Initialize on mount
|
|
@@ -110,10 +110,28 @@
|
|
|
110
110
|
</template>
|
|
111
111
|
|
|
112
112
|
<script setup>
|
|
113
|
-
import { computed, inject } from 'vue'
|
|
113
|
+
import { computed, inject, onMounted, ref } from 'vue'
|
|
114
114
|
import { Breadcrumb, BarChart, BubbleChart, DonutChart, LineChart, TreemapChart } from '../../components/pgo'
|
|
115
115
|
import Card from '../../components/pgo/Card.vue'
|
|
116
116
|
|
|
117
|
+
// Mount charts only once the grid container has a real width.
|
|
118
|
+
// ResizeObserver fires after CSS layout (including drawer animations) settles,
|
|
119
|
+
// so ApexCharts always measures correct container dimensions on first mount.
|
|
120
|
+
const gridRef = ref(null)
|
|
121
|
+
const chartsReady = ref(false)
|
|
122
|
+
|
|
123
|
+
onMounted(() => {
|
|
124
|
+
let timer
|
|
125
|
+
const observer = new ResizeObserver(() => {
|
|
126
|
+
clearTimeout(timer)
|
|
127
|
+
timer = setTimeout(() => {
|
|
128
|
+
chartsReady.value = true
|
|
129
|
+
observer.disconnect()
|
|
130
|
+
}, 150)
|
|
131
|
+
})
|
|
132
|
+
if (gridRef.value) observer.observe(gridRef.value)
|
|
133
|
+
})
|
|
134
|
+
|
|
117
135
|
const { language } = inject('i18n')
|
|
118
136
|
|
|
119
137
|
const props = defineProps({
|
|
@@ -561,11 +561,14 @@ const fetchData = async (queryParams = {}) => {
|
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
563
|
|
|
564
|
-
const formClose = () => {
|
|
564
|
+
const formClose = (hasChanges = false) => {
|
|
565
565
|
showDynamicForm.value = false
|
|
566
566
|
editItemId.value = null
|
|
567
567
|
LForm.value = {}
|
|
568
568
|
formMode.value = ''
|
|
569
|
+
if (hasChanges) {
|
|
570
|
+
fetchData({ page: options.value.page, per_page: options.value.itemsPerPage })
|
|
571
|
+
}
|
|
569
572
|
}
|
|
570
573
|
// Handle options update from DataTable
|
|
571
574
|
const handleOptionsUpdate = (newOptions) => {
|
package/dist/Radio-ByEO2VYW.js
DELETED