props-convert.ts 258 字节
import { Route } from "vue-router";

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