The documentation is a work in progress, and English edition is just an empty shell for now. I will translate it when Chinese edition has done.
- isExternalLink(href)
- checkLinkPath(path)
- shortenPath(path, ext?)
- baseUrl
- publicPath
- indexPath
- cdnUrl
- homePath
isExternalLink(href)
v1.2.2 +
- 参数:
href: string:链接地址。
- 返回值:
boolean
判断链接地址是否为外部链接。
checkLinkPath(path)
v1.2.0 +
- 参数:
path: string:文件路径。
- 返回值:
string
检查文件路径是否符合要求。
shortenPath(path, ext?)
v1.2.0 +
- 参数:
path: string:文件路径。ext = 'md':index.的扩展名。
- 返回值:
string
缩短文件路径。
baseUrl
v1.2.0 +
- 类型:
string
URL 前缀。如果生产环境下的 cdnUrl 不为空,它就是 cdnUrl,否则为 publicPath。
publicPath
v1.2.0 +
- 类型:
string
URL 前缀。
indexPath
v1.2.0 +
- 类型:
string
index.html 路径。
cdnUrl
v1.2.0 +
- 类型:
string
CDN 前缀。
homePath
v1.2.0 +
- 类型:
string
主页路径。
disableCDN()
v1.2.1 +
- 参数:无
- 返回值:无
禁用 CDN。
enableCDN()
v1.2.1 +
- 参数:无
- 返回值:无
启用 CDN。
addBaseUrl(path)
v1.2.0 +
- 参数:
path: string:文件路径。
- 返回值:
string
为文件路径添加 URL 前缀。
cleanBaseUrl(path)
v1.2.0 +
- 参数:
path: string:文件路径。
- 返回值:
string
清除文件路径中的 URL 前缀。
buildHash(hashPath)
v1.2.0 +
- 参数:
hashPath: THashPath:Hash 路径对象。
- 返回值:
string
根据 Hash 路径对象构建 Hash 地址。
buildQueryContent(content, isFull?)
v1.2.0 +
- 参数:
content: string:content参数值。isFull = false:是否为完整 Hash 地址。
- 返回值:
string
构建包含 content 参数的 URL 查询字符串。
buildQueryFlagUrl(flag, text)
v1.2.0 +
- 参数:
flag: enums.EFlag:Flag 类型。text: string:Flag 值。
- 返回值:
string
构建查询 Flag 的 Hash 地址。
parseHash(hash, isShort?)
v1.2.0 +
- 参数:
hash: string:Hash 字符串。isShort = false:是否缩短地址。
- 返回值:
THashPath
解析 Hash 字符串为 Hash 路径对象。
changeAnchor(anchor)
v1.2.0 +
- 参数:
anchor: string:Hash 锚点。
- 返回值:无
更改 URL Hash 锚点。
changeQueryContent(content)
v1.2.0 +
- 参数:
content: string:content参数值。
- 返回值:无
更改 URL 查询字符串。
parseRoute(route)
v1.2.0 +
- 参数:
route: Route:vue-router 的路由对象。
- 返回值:
THashPath
解析 vue-router 的路由对象为 Hash 路径对象。
parseQuery(queryStr)
v1.2.0 +
- 参数:
queryStr: string:URL 查询字符串。
- 返回值:
TQuery
解析 URL 查询字符串为查询对象。
formatQuery(query)
v1.2.0 +
- 参数:
query: TQuery:查询对象。
- 返回值:
string
格式化查询对象为 URL 查询字符串。
returnHome()
v1.2.0 +
- 参数:无
- 返回值:无
返回主页。

- This page is open source, improve it