This commit is contained in:
parent
69a32231e2
commit
9ebb7b85b2
|
@ -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 () => {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue