import { ComponentObjectPropsOptions } from "@vue/runtime-core";

export const propsConvert: (route: ComponentObjectPropsOptions) => any = (route: ComponentObjectPropsOptions) => {
  if (route.params && Object.keys(route.params).length === 0 && route.query && Object.keys(route.query).length > 0) {
    return { params: route.query };
  }
  return route.query;
};
