changes
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<TimeOption
|
||||
v-if="timeopt"
|
||||
v-bind="{
|
||||
pagename: vpagename,
|
||||
api: api,
|
||||
@@ -16,20 +17,18 @@
|
||||
@manual-refresh="manualRefresh"
|
||||
@refresh-data="refreshData"
|
||||
@import="openImportModal"
|
||||
class="mb-3"
|
||||
v-if="timeopt"
|
||||
></TimeOption>
|
||||
/>
|
||||
<DataTable
|
||||
v-if="pagedata"
|
||||
v-bind="{ pagename: vpagename }"
|
||||
@edit="edit"
|
||||
@insert="insert"
|
||||
@dataevent="dataEvent"
|
||||
v-if="pagedata"
|
||||
/>
|
||||
<Modal
|
||||
@close="showmodal = undefined"
|
||||
v-bind="showmodal"
|
||||
v-if="showmodal"
|
||||
v-bind="showmodal"
|
||||
@close="showmodal = undefined"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -38,6 +37,7 @@ import TimeOption from "~/components/datatable/TimeOption";
|
||||
import { useStore } from "~/stores/index";
|
||||
// [FIX] Thêm onActivated, onDeactivated để xử lý KeepAlive
|
||||
import { ref, watch, onBeforeUnmount, onActivated, onDeactivated } from "vue";
|
||||
import DataTable from "~/components/datatable/DataTable.vue";
|
||||
|
||||
const emit = defineEmits(["modalevent", "dataevent", "dataUpdated"]);
|
||||
const store = useStore();
|
||||
@@ -408,7 +408,7 @@ const getApi = async () => {
|
||||
pagedata.value = $setpage(vpagename, row, obj);
|
||||
const copy = $clone(pagedata.value);
|
||||
copy.data = data;
|
||||
copy.update = { data: data };
|
||||
copy.update = { data };
|
||||
store.commit(vpagename, copy);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user