fix: 修复管理端类型检查错误
- 为分页数据列表补充明确行类型 - 修正插件数组默认值解析的类型转换 - 删除 tinyflow 未使用辅助函数
This commit is contained in:
@@ -16,6 +16,8 @@ interface PageDataProps {
|
||||
requestClient?: any;
|
||||
}
|
||||
|
||||
type PageDataRow = Record<string, any>;
|
||||
|
||||
const props = withDefaults(defineProps<PageDataProps>(), {
|
||||
pageSize: 10,
|
||||
pageSizes: () => [10, 20, 50, 100],
|
||||
@@ -24,7 +26,7 @@ const props = withDefaults(defineProps<PageDataProps>(), {
|
||||
});
|
||||
|
||||
// 响应式数据
|
||||
const pageList = ref([]);
|
||||
const pageList = ref<PageDataRow[]>([]);
|
||||
const loading = ref(false);
|
||||
const queryParams = ref<Record<string, any>>({});
|
||||
|
||||
@@ -83,7 +85,7 @@ const patchRowById = (
|
||||
patch: Record<string, any>,
|
||||
): boolean => {
|
||||
const rowIndex = pageList.value.findIndex(
|
||||
(item: Record<string, any>) => String(item?.id ?? '') === String(id ?? ''),
|
||||
(item) => String(item?.id ?? '') === String(id ?? ''),
|
||||
);
|
||||
if (rowIndex === -1) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user