@@ -71,6 +71,14 @@ const handleParamsCreate = () => {
7171const handleParamsDel = (item : any ) => {
7272 advancedSetting .value = advancedSetting .value .filter ((ele ) => ele .id !== item .id )
7373}
74+ const currentPage = ref (1 )
75+ const advancedSettingPagination = computed (() => {
76+ return advancedSetting .value .slice (currentPage .value * 5 - 5 , currentPage .value * 5 )
77+ })
78+
79+ const handelCurrentChange = (val : any ) => {
80+ currentPage .value = val
81+ }
7482
7583const rules = {
7684 model_type: [
@@ -256,7 +264,7 @@ defineExpose({
256264 </div >
257265
258266 <div v-if =" configExpand" class =" params-table" >
259- <el-table :data =" advancedSetting " style =" width : 100% " >
267+ <el-table :data =" advancedSettingPagination " style =" width : 100% " >
260268 <el-table-column prop =" key" :label =" t('model.parameters')" width =" 280" />
261269 <el-table-column prop =" name" :label =" t('model.display_name')" width =" 280" />
262270 <el-table-column prop =" val" :label =" t('model.parameter_value')" />
@@ -281,6 +289,14 @@ defineExpose({
281289 </el-table-column >
282290 </el-table >
283291 </div >
292+ <div v-if =" advancedSetting.length > 5 && configExpand" class =" params-table_pagination" >
293+ <el-pagination
294+ @current-change =" handelCurrentChange"
295+ :default-page-size =" 5"
296+ layout =" prev, pager, next"
297+ :total =" advancedSetting.length"
298+ />
299+ </div >
284300 </div >
285301 <el-drawer
286302 v-model =" paramsFormDrawer"
@@ -330,7 +346,7 @@ defineExpose({
330346 margin : 0 auto ;
331347 padding-top : 24px ;
332348 overflow-y : auto ;
333- height : calc (100% - 180 px );
349+ height : calc (100% - 120 px );
334350
335351 .ed-form-item--default {
336352 margin-bottom : 16px ;
@@ -410,6 +426,26 @@ defineExpose({
410426 border : 1px solid #dee0e3 ;
411427 border-top : none ;
412428 border-bottom : none ;
429+ overflow-y : auto ;
430+ :deep(.ed-table .ed-table__cell ) {
431+ padding : 7px 0 ;
432+ }
433+
434+ :deep(.ed-table .cell ) {
435+ line-height : 24px ;
436+ }
437+ }
438+
439+ .params-table_pagination {
440+ margin-top : 8px ;
441+
442+ .ed-pagination {
443+ justify-content : flex-end ;
444+ }
445+
446+ :deep(.ed-pager li .number :hover ) {
447+ background-color : #1cba901a ;
448+ }
413449 }
414450
415451 .operation-column_text {
0 commit comments