@wordrhyme/auto-crud 1.23.2 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/index.cjs +357 -185
- package/dist/index.d.cts +24 -1
- package/dist/index.d.ts +24 -1
- package/dist/index.js +358 -186
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1211,6 +1211,12 @@ open({
|
|
|
1211
1211
|
|
|
1212
1212
|
## 🔄 批量操作
|
|
1213
1213
|
|
|
1214
|
+
在同一查询结果中,勾选记录后可以翻页继续选择。表头复选框只勾选或取消当前页,批量操作栏的“清空选择”会清空所有页。选中计数、批量更新、删除和导出都使用累计勾选的记录。重新加载已选记录时,批量操作使用最近加载的数据。
|
|
1215
|
+
|
|
1216
|
+
使用 `useAutoCrudResource` 时,更换列表路由、搜索词、筛选条件或 `query` 注入的条件(如搜索图片)会清空选择。翻页、调整每页数量和排序可以保留选择。新请求等待期间,表格继续显示上一份数据时会禁用勾选。单行删除成功后,表格会移除该记录的勾选,保留其他记录。
|
|
1217
|
+
|
|
1218
|
+
`AutoCrudTable` 使用 `resource.idKey`(默认 `id`)识别记录,显式传入的 `table.getRowId` 优先。独立使用 `AutoTable` 时,默认读取 `id`,也可以传入 `getRowId`。跨页选择要求主键在整个结果集中唯一。缺少主键的记录只在当前加载的数据中保留选择。手动分页时,可用 `pagePending` 标记加载中或占位的数据,待当前页响应到达后恢复勾选。
|
|
1219
|
+
|
|
1214
1220
|
### 批量更新
|
|
1215
1221
|
|
|
1216
1222
|
```typescript
|