|
|
@ -76,8 +76,8 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
import { getCurrentInstance, nextTick, onMounted, provide, ref, useAttrs, watch, watchEffect, onActivated } from 'vue'; |
|
|
|
import { $t, Tools, VueTools, eventBus } from '@/platform'; |
|
|
|
import { getCurrentInstance, nextTick, onMounted, provide, ref, useAttrs, watch, watchEffect } from 'vue'; |
|
|
|
import Body from './Body.vue'; |
|
|
|
import Editor from './extra/Editor.vue'; |
|
|
|
import CellEditor from './extra/inline-edit/CellEditor.vue'; |
|
|
@ -177,7 +177,7 @@ onMounted(async () => { |
|
|
|
tools.titleFM.handleColumnTitle(); |
|
|
|
} |
|
|
|
topRef.value?.handleQueryFormShowField(); |
|
|
|
if (props.autoFetchData && (!Tools.isEmpty(props.dataUrl) || !Tools.isEmpty(props.fetchDataUrl))) { |
|
|
|
if (!props.refreshAfterActive && props.autoFetchData && (!Tools.isEmpty(props.dataUrl) || !Tools.isEmpty(props.fetchDataUrl))) { |
|
|
|
await tools.reqApiFM.fetchData({ |
|
|
|
pagination: tools.table.store.pagination, |
|
|
|
}); |
|
|
@ -186,6 +186,14 @@ onMounted(async () => { |
|
|
|
} |
|
|
|
tools.opFM.setStripe(); |
|
|
|
}); |
|
|
|
// 组件被激活时 |
|
|
|
onActivated(() => { |
|
|
|
if (props.refreshAfterActive) { |
|
|
|
tools.reqApiFM.fetchData({ |
|
|
|
pagination: tools.table.store.pagination, |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
const getTableRef = () => { |
|
|
|
return tableRef.value; |
|
|
|