refactor: refs #8113 fine tunning processData
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
7fdcb1eace
commit
f32c08bd1d
|
@ -76,7 +76,7 @@ const props = defineProps({
|
|||
},
|
||||
mapKey: {
|
||||
type: String,
|
||||
default: 'id',
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['onFetch', 'onPaginate', 'onChange']);
|
||||
|
|
|
@ -290,7 +290,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
|||
}
|
||||
|
||||
if (!map && !append) store.data = data;
|
||||
else if (!map && append) store.data.push(...data);
|
||||
else if (!map && append) for (const row of data) store.data.push(row);
|
||||
else
|
||||
data.forEach((row) => {
|
||||
const key = row[store.mapKey];
|
||||
|
|
Loading…
Reference in New Issue