| 201 | * @Author: 白雾茫茫丶 |
| 202 | */ |
| 203 | export const isHttpLink = (link: string): boolean => { |
| 204 | const pattern = new RegExp('^(https?:\\/\\/)?' + // protocol |
| 205 | '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name |
| 206 | '((\\d{1,3}\\.){3}\\\d{1,3}))' + // OR ip (v4) address |
| 207 | '(\\:\\d+)?' + // port |
| 208 | '(\\/[-a-z\\d%_.~+]*)*' + // path |
| 209 | '(\\?[;&a-z\\d%_.~+=-]*)?' + // query string |
| 210 | '(\\#[-a-z\\d_]*)?$', 'i'); // fragment locator |
| 211 | return pattern.test(link); |
| 212 | } |
| 213 | |
| 214 | /** |
| 215 | * @description: 默认不显示的 column 项 |