@ddwl/ddwl-ui 1.4.7 → 1.4.9

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddwl/ddwl-ui",
3
- "version": "1.4.7",
3
+ "version": "1.4.9",
4
4
  "private": false,
5
5
  "main": "dist/index.common.js",
6
6
  "style": "dist/index.css",
@@ -168,7 +168,7 @@ export default {
168
168
  */
169
169
  async reset() {
170
170
  this.form = cloneDeep(this.initForm)
171
- const params = cloneDeep(this.form)
171
+ const params = cloneDeep(this.initForm)
172
172
  this.$emit('search', params)
173
173
  if (this.searchData) {
174
174
  this.resetLoading = true
@@ -256,17 +256,14 @@ export default {
256
256
  async getData(params) {
257
257
  const defaultParams =
258
258
  typeof this.requestConfig.params === 'function'
259
- ? this.requestConfig.params(this.form)
259
+ ? this.requestConfig.params({ ...params, ...this.form })
260
260
  : {
261
+ ...params,
261
262
  ...this.form,
262
263
  ...this.requestConfig.params
263
264
  }
264
- params = {
265
- ...params,
266
- ...defaultParams
267
- }
268
- this.$emit('get-data', params)
269
- const { data } = await this.requestConfig.api(params)
265
+ this.$emit('get-data', defaultParams)
266
+ const { data } = await this.requestConfig.api(defaultParams)
270
267
  this.total = data.total
271
268
  let listData = data.list || []
272
269
  if (this.requestConfig.props) {