mirror of
https://github.com/jeecgboot/jeecg-boot.git
synced 2025-08-29 09:30:20 +00:00
Compare commits
6 Commits
d97e56b2f0
...
69fca254f0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
69fca254f0 | ||
![]() |
b3de596199 | ||
![]() |
f46273d15e | ||
![]() |
0fe258dbc2 | ||
![]() |
de7f23c555 | ||
![]() |
444c7140f6 |
@@ -25,6 +25,7 @@ module.exports = defineConfig({
|
||||
'plugin:jest/recommended',
|
||||
],
|
||||
rules: {
|
||||
'prettier/prettier': 'off', // 彻底关闭 prettier 校验规则
|
||||
'vue/script-setup-uses-vars': 'error',
|
||||
'@typescript-eslint/ban-ts-ignore': 'off',
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
@@ -67,8 +68,8 @@ module.exports = defineConfig({
|
||||
{
|
||||
html: {
|
||||
void: 'always',
|
||||
normal: 'never',
|
||||
component: 'always',
|
||||
normal: 'any',
|
||||
component: 'any',
|
||||
},
|
||||
svg: 'always',
|
||||
math: 'always',
|
||||
|
@@ -15,6 +15,6 @@ module.exports = {
|
||||
requirePragma: false,
|
||||
proseWrap: 'never',
|
||||
htmlWhitespaceSensitivity: 'strict',
|
||||
endOfLine: 'auto',
|
||||
endOfLine: 'auto', // 自动处理换行符(LF/CRLF)
|
||||
rangeStart: 0,
|
||||
};
|
||||
|
@@ -7,12 +7,12 @@
|
||||
<template v-else>
|
||||
<Tooltip v-if="action.tooltip" v-bind="getTooltip(action.tooltip)">
|
||||
<PopConfirmButton v-bind="action">
|
||||
<Icon :icon="action.icon" :class="{ 'mr-1': !!action.label }" v-if="action.icon" />
|
||||
<Icon :icon="action.icon" :class="{ 'mr-1': !!action.label }" v-if="action.icon" :color="action.iconColor"/>
|
||||
<template v-if="action.label">{{ action.label }}</template>
|
||||
</PopConfirmButton>
|
||||
</Tooltip>
|
||||
<PopConfirmButton v-else v-bind="action">
|
||||
<Icon :icon="action.icon" :class="{ 'mr-1': !!action.label }" v-if="action.icon" />
|
||||
<Icon :icon="action.icon" :class="{ 'mr-1': !!action.label }" v-if="action.icon" :color="action.iconColor"/>
|
||||
<template v-if="action.label">{{ action.label }}</template>
|
||||
</PopConfirmButton>
|
||||
</template>
|
||||
|
@@ -16,7 +16,10 @@ interface ListPageOptions {
|
||||
// 样式作用域范围
|
||||
designScope?: string;
|
||||
// 【必填】表格参数配置
|
||||
tableProps: TableProps;
|
||||
tableProps: TableProps & {
|
||||
// 添加 defSort 类型定义
|
||||
defSort?: DefSort;
|
||||
};
|
||||
// 是否分页
|
||||
pagination?: boolean;
|
||||
// 导出配置
|
||||
@@ -46,6 +49,11 @@ interface IDoRequestOptions {
|
||||
clearSelection?: boolean;
|
||||
}
|
||||
|
||||
interface DefSort {
|
||||
column: string;
|
||||
order: 'asc' | 'desc';
|
||||
}
|
||||
|
||||
/**
|
||||
* listPage页面公共方法
|
||||
*
|
||||
@@ -85,8 +93,17 @@ export function useListPage(options: ListPageOptions) {
|
||||
//update-end-author:taoyan date:20220507 for: erp代码生成 子表 导出报错,原因未知-
|
||||
|
||||
//update-begin-author:liusq date:20230410 for:[/issues/409]导出功能没有按排序结果导出,设置导出默认排序,创建时间倒序
|
||||
if(!paramsForm?.column){
|
||||
Object.assign(paramsForm,{column:'createTime',order:'desc'});
|
||||
// 获取表格的默认排序
|
||||
const { defSort } = options?.tableProps ?? {};
|
||||
if (defSort && !paramsForm?.column) {
|
||||
// 使用类型断言确保 defSort 类型正确
|
||||
Object.assign(paramsForm, {
|
||||
column: (defSort as DefSort).column,
|
||||
order: (defSort as DefSort).order,
|
||||
});
|
||||
} else if (!paramsForm?.column) {
|
||||
// 如果没有默认排序,则使用创建时间倒序
|
||||
Object.assign(paramsForm, { column: 'createTime', order: 'desc' });
|
||||
}
|
||||
//update-begin-author:liusq date:20230410 for: [/issues/409]导出功能没有按排序结果导出,设置导出默认排序,创建时间倒序
|
||||
|
||||
|
Reference in New Issue
Block a user