|
@@ -25,6 +25,8 @@ interface UseCrudConfig {
|
|
|
isEdit?: boolean;
|
|
|
// 用于多选选中后添加进入,toDeleteIds中的key值。
|
|
|
multipleSelectKey?: string;
|
|
|
+ // todo 这个值是什么
|
|
|
+ pageStr?: string;
|
|
|
}
|
|
|
|
|
|
export const useCrud = (config?: UseCrudConfig) => {
|
|
@@ -61,7 +63,7 @@ export const useCrud = (config?: UseCrudConfig) => {
|
|
|
// 多选返回的数组,命名是因为后来增加了很多功能,现在这个数组里面的值是根据multipleSelectKey来决定
|
|
|
const toDeleteIds = ref<Array<string>>([]);
|
|
|
// 多选返回的数组,返回每一行的row数据
|
|
|
- const selectedRows = ref({});
|
|
|
+ const selectedRows = ref<any[]>([]);
|
|
|
const save = async (config?: UseCrudConfig) => {
|
|
|
try {
|
|
|
const path = config?.isEdit ? "/update" : "/add";
|