feat: refs #6919 add oneRecord opt
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2025-01-08 10:55:38 +01:00
parent 69a32231e2
commit 9ebb7b85b2
2 changed files with 1 additions and 1 deletions

View File

@ -31,6 +31,7 @@ const searchRightDataKey = computed(() => {
const arrayData = useArrayData(props.dataKey, { const arrayData = useArrayData(props.dataKey, {
url: props.url, url: props.url,
filter: props.filter, filter: props.filter,
oneRecord: true,
}); });
onBeforeMount(async () => { onBeforeMount(async () => {

View File

@ -35,7 +35,6 @@ onBeforeMount(async () => {
if (props.idInWhere) arrayData.store.filter.where = { id: route.params.id }; if (props.idInWhere) arrayData.store.filter.where = { id: route.params.id };
else if (!regex.test(props.url)) else if (!regex.test(props.url))
arrayData.store.url = `${props.url}/${route.params.id}`; arrayData.store.url = `${props.url}/${route.params.id}`;
console.log('fetching data', arrayData.store.url, route.params.id);
await arrayData.fetch({ append: false, updateRouter: false }); await arrayData.fetch({ append: false, updateRouter: false });
} catch { } catch {
const { matched: matches } = router.currentRoute.value; const { matched: matches } = router.currentRoute.value;