feat: 补充新项目hx-op

This commit is contained in:
xuziqiang
2024-06-07 15:11:04 +08:00
parent a0f5c4de08
commit fc940e7241
64 changed files with 28632 additions and 7 deletions

View File

@@ -353,7 +353,7 @@
}
const tableChangeEvent = (pagination: Props, filters: [], sorter: any) => {
// console.log('params', pagination, filters, sorter);
console.log('params', pagination, filters, sorter);
if (sorter?.field) {
if (sorter.order) {
orderRef.value = {
@@ -383,7 +383,7 @@
if (pagination) {
const current = get(dataRef.value, props.pageField);
console.log(current);
function getTotal() {
let total = 0;
if (isFunction(getPageParams)) {
@@ -393,7 +393,6 @@
}
return total;
}
console.log('current', (current >= 0 ? current : 0) + props.pageFieldOffset);
return {
showQuickJumper: true,
@@ -406,13 +405,15 @@
},
...(pagination as Props),
total: getTotal(),
current: (current >= 0 ? current : 0) + props.pageFieldOffset, // 后端1 开始
current: (current >= 0 ? current : 1) + props.pageFieldOffset, // 后端1 开始
pageSize: get(dataRef.value, props.sizeField),
};
}
return false;
});
console.log(getPagination.value);
const getTableBindValues = computed(() => {
const { params, dynamicParams } = props;
return {

View File

@@ -1,5 +1,5 @@
export const tableConfig = {
pageField: 'data.pages', //当前页
pageField: 'data.current', //当前页
pageCount: 'data.pageCount', //当前页
sizeField: 'data.size', // 每页数量
listField: 'data.records', // 数据集合

View File

@@ -10,7 +10,7 @@
<ns-icon v-else name="headerLogin" class="headerLogin" style="width: auto; height: 48px" />
</div>
<div>
<component :is="headerSlot.component" v-bind="headerSlot.componentProps" />
<component v-if="headerSlot" :is="headerSlot.component" v-bind="headerSlot.componentProps" />
</div>
<div class="header-menu">
<a-menu style="width: 100%" mode="horizontal" :selectedKeys="initHeaderKey">