(multLink, value)
| 155 | |
| 156 | }, |
| 157 | changeLinkTempalte(multLink, value) { |
| 158 | // 当绑定的组件列表改变的时候去修改列表内id对应的组件内容 |
| 159 | if (!(multLink && multLink.elementId)) return; |
| 160 | multLink.elementId.map(async item => { |
| 161 | const nowTemplate = this.findTemplateForId(item) |
| 162 | // 和组件联动 当改变tab的选项时 修改联动的组件的接口配置值 |
| 163 | // 需要定制一个规则, 当改变时若为get请求则改变type值为tab的value值 |
| 164 | // 当为post请求 则改变请求参数的type值 |
| 165 | // 如果为system模式 则获取dataOriginConfig中的值 |
| 166 | const { property } = nowTemplate |
| 167 | if (property == null) { |
| 168 | return |
| 169 | } |
| 170 | const { dataOriginConfig } = property |
| 171 | if (property.dataBindType.default === 'api') { |
| 172 | this.changeParams(property.method.default, property, property.params, multLink, value) // url为字符串 直接传递会导致修改不生效 |
| 173 | } |
| 174 | await this.initApi(nowTemplate) |
| 175 | }) |
| 176 | }, |
| 177 | changeParams(method, config, params, multLink, value) { |
| 178 | // 根据切换的值改变对应的params或者url |
| 179 | if (method === 'get') { |
nothing calls this directly
no outgoing calls
no test coverage detected