import { ref } from "vue";
import { useAppStoreHook } from "/@/store/modules/app";

export function useParams() {
  const { searchParams = {} } = useAppStoreHook();
  //查询参数
  const basicParams = ref<Record<string, any>>(
    searchParams.basic ? searchParams.basic : {}
  );

  function changeBasicParams(newParams: any = {}) {
    basicParams.value = newParams;
  }

  function getBasicParams() {
    return basicParams.value;
  }

  return {
    changeBasicParams,
    getBasicParams
  };
}
