102102
103103 <div class =" table-box history-table-box" >
104104 <div class =" history-table-wrap" >
105- <el-table
105+ <ComplexTable
106106 :pagination-config =" paginationConfig"
107107 :data =" historyItems"
108108 v-loading =" historyLoading"
142142 {{ computeSize(row.contentSize) }}
143143 </template >
144144 </el-table-column >
145- <el-table-column :label =" $t('commons.table.operate')" min-width =" 110 " fixed =" right" >
145+ <el-table-column :label =" $t('commons.table.operate')" min-width =" 150 " fixed =" right" >
146146 <template #default =" { row } " >
147147 <el-button link type =" primary" @click.stop =" openHistoryRecord(row)" >
148148 {{ $t('commons.button.view') }}
152152 </el-button >
153153 </template >
154154 </el-table-column >
155- </el-table >
155+ </ComplexTable >
156156 </div >
157-
158- <el-pagination
159- v-model:current-page =" pagination.currentPage"
160- v-model:page-size =" pagination.pageSize"
161- :page-sizes =" [5, 10, 20, 50, 100, 200, 500]"
162- :size =" mobile || paginationConfig.small ? 'small' : 'default'"
163- :layout ="
164- mobile || paginationConfig.small
165- ? 'total, prev, pager, next'
166- : 'total, sizes, prev, pager, next, jumper'
167- "
168- :total =" pagination.total"
169- @current-change =" handlePageChange"
170- @size-change =" handleSizeChange"
171- />
172157 </div >
173158 </el-card >
174159
@@ -235,8 +220,8 @@ import { Setting } from '@/api/interface/setting';
235220import { loadMonacoLanguageSupport , setupMonacoEnvironment } from ' @/utils/monaco' ;
236221import { ElMessageBox , type FormInstance , type FormRules } from ' element-plus' ;
237222import { Languages } from ' @/global/mimetype' ;
238- import { GlobalStore } from ' @/store' ;
239223import i18n from ' @/lang' ;
224+ import ComplexTable from ' @/components/complex-table/index.vue' ;
240225
241226type MonacoEditorApi = typeof import (' monaco-editor/esm/vs/editor/editor.api' );
242227
@@ -258,10 +243,7 @@ const historySettingFormRef = ref<FormInstance>();
258243const scope = ref <' current' | ' all' >(' current' );
259244const operationFilter = ref (' ' );
260245const activeCollapse = ref ([]);
261- const globalStore = GlobalStore ();
262- const mobile = computed (() => {
263- return globalStore .isMobile ();
264- });
246+
265247const paginationConfig = reactive ({
266248 cacheSizeKey: ' file-history-page-size' ,
267249 currentPage: 1 ,
@@ -602,15 +584,6 @@ const handleScopeChange = async () => {
602584 await loadHistoryList (true );
603585};
604586
605- const handlePageChange = async (page : number ) => {
606- pagination .value .currentPage = page ;
607- await loadHistoryList ();
608- };
609-
610- const handleSizeChange = async () => {
611- await loadHistoryList (true );
612- };
613-
614587const handleClose = () => {
615588 drawerVisible .value = false ;
616589 disposeDiffEditor ();
0 commit comments