imatrix-ui 0.2.42-up → 0.2.44-test

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.
@@ -111,11 +111,23 @@ export default {
111
111
  let src
112
112
  let params = ''
113
113
  if (tag.routeQuery) {
114
+ const orgParams = []
115
+ const orgPath = tag.routeQuery['src']
116
+ if (orgPath && orgPath.indexOf('?') > 0) {
117
+ const orgParamsStr = orgPath.substring(orgPath.indexOf('?') + 1)
118
+ const orgParamsArr = orgParamsStr.split('&')
119
+ orgParamsArr.forEach(item => {
120
+ orgParams.push(item.substring(0, item.indexOf('=')))
121
+ })
122
+ }
114
123
  for (const key in tag.routeQuery) {
115
124
  if (key === 'src') {
116
125
  src = tag.routeQuery[key]
117
126
  } else {
118
- params += key + '=' + tag.routeQuery[key] + '&'
127
+ if (orgParams.indexOf(key) < 0) {
128
+ // 表示原参数中没有该参数,则拼接该参数
129
+ params += key + '=' + tag.routeQuery[key] + '&'
130
+ }
119
131
  }
120
132
  }
121
133
  }