mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-30 23:49:10 +08:00
fix: 分页排序样式调整 (#1821)
This commit is contained in:
parent
a031d3ba41
commit
b83147220a
@ -192,6 +192,8 @@ const paginationConfig = reactive({
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
orderBy: 'created_at',
|
||||
order: 'null',
|
||||
});
|
||||
const searchName = ref();
|
||||
const dialogUpgradeRef = ref();
|
||||
@ -246,13 +248,15 @@ const dialogReNameRef = ref();
|
||||
|
||||
const search = async (column?: any) => {
|
||||
let filterItem = props.filters ? props.filters : '';
|
||||
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
|
||||
paginationConfig.order = column?.order ? column.order : paginationConfig.order;
|
||||
let params = {
|
||||
name: searchName.value,
|
||||
page: paginationConfig.currentPage,
|
||||
pageSize: paginationConfig.pageSize,
|
||||
filters: filterItem,
|
||||
orderBy: column?.order ? column.prop : 'created_at',
|
||||
order: column?.order ? column.order : 'null',
|
||||
orderBy: paginationConfig.orderBy,
|
||||
order: paginationConfig.order,
|
||||
};
|
||||
loading.value = true;
|
||||
loadStats();
|
||||
|
@ -186,6 +186,8 @@ const paginationConfig = reactive({
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
orderBy: 'created_at',
|
||||
order: 'null',
|
||||
});
|
||||
const searchName = ref();
|
||||
|
||||
@ -205,12 +207,14 @@ const weekOptions = [
|
||||
];
|
||||
|
||||
const search = async (column?: any) => {
|
||||
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
|
||||
paginationConfig.order = column?.order ? column.order : paginationConfig.order;
|
||||
let params = {
|
||||
info: searchName.value,
|
||||
page: paginationConfig.currentPage,
|
||||
pageSize: paginationConfig.pageSize,
|
||||
orderBy: column?.order ? column.prop : 'created_at',
|
||||
order: column?.order ? column.order : 'null',
|
||||
orderBy: paginationConfig.orderBy,
|
||||
order: paginationConfig.order,
|
||||
};
|
||||
loading.value = true;
|
||||
await getCronjobPage(params)
|
||||
|
@ -254,6 +254,8 @@ const paginationConfig = reactive({
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
from: 'local',
|
||||
orderBy: 'created_at',
|
||||
order: 'null',
|
||||
});
|
||||
const searchName = ref();
|
||||
|
||||
@ -302,13 +304,15 @@ const onSetting = async () => {
|
||||
};
|
||||
|
||||
const search = async (column?: any) => {
|
||||
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
|
||||
paginationConfig.order = column?.order ? column.order : paginationConfig.order;
|
||||
let params = {
|
||||
page: paginationConfig.currentPage,
|
||||
pageSize: paginationConfig.pageSize,
|
||||
info: searchName.value,
|
||||
from: paginationConfig.from,
|
||||
orderBy: column?.order ? column.prop : 'created_at',
|
||||
order: column?.order ? column.order : 'null',
|
||||
orderBy: paginationConfig.orderBy,
|
||||
order: paginationConfig.order,
|
||||
};
|
||||
const res = await searchMysqlDBs(params);
|
||||
data.value = res.data.items || [];
|
||||
|
@ -109,17 +109,21 @@ const paginationConfig = reactive({
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
orderBy: 'created_at',
|
||||
order: 'null',
|
||||
});
|
||||
const searchName = ref();
|
||||
|
||||
const search = async (column?: any) => {
|
||||
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
|
||||
paginationConfig.order = column?.order ? column.order : paginationConfig.order;
|
||||
let params = {
|
||||
page: paginationConfig.currentPage,
|
||||
pageSize: paginationConfig.pageSize,
|
||||
info: searchName.value,
|
||||
type: 'mysql',
|
||||
orderBy: column?.order ? column.prop : 'created_at',
|
||||
order: column?.order ? column.order : 'null',
|
||||
orderBy: paginationConfig.orderBy,
|
||||
order: paginationConfig.order,
|
||||
};
|
||||
const res = await searchRemoteDBs(params);
|
||||
data.value = res.data.items || [];
|
||||
|
Loading…
Reference in New Issue
Block a user