Options
All
  • Public
  • Public/Protected
  • All
Menu

Module vx-tools/joinUrlParams

常用工具函数

Index

Functions

Functions

joinUrlParams

  • joinUrlParams<T>(url: string, obj: T): string
  • 拼接路由参数

    example
     const parmas = {
       id: 1,
       name: 'Co'
     }
    
     const url = joinUrlParams('/users', params)
     // url = /users?id=1&name=Co
    

    Type parameters

    • T: {}

    Parameters

    • url: string
    • obj: T

      参数对象

    Returns string

Generated using TypeDoc