@cloudbase/lowcode-builder 1.8.18 → 1.8.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +0,0 @@
1
- // 处理url链接,加入params参数
2
- export function urlJoinParams(url, params) {
3
- if (!url || !params || typeof params !== 'object') {
4
- return url
5
- }
6
- const separate = url.indexOf('?') === -1 ? '?' : '&'
7
- const tempStr = Object.keys(params)
8
- .map(key => {
9
- let value = params[key]
10
- if (typeof value === 'object') {
11
- value = JSON.stringify(value)
12
- }
13
- if (value != undefined) {
14
- return `${key}=${encodeURIComponent(value)}`
15
- }
16
- return ''
17
- })
18
- .filter(value => value)
19
- .join('&')
20
- return `${url}${separate}${tempStr}`
21
- }