@ddwl/ddwl-ui 1.4.4 → 1.4.6

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.4",
3
+ "version": "1.4.6",
4
4
  "private": false,
5
5
  "main": "dist/index.common.js",
6
6
  "style": "dist/index.css",
@@ -221,6 +221,7 @@ export default {
221
221
  !this.staticPaging &&
222
222
  (this.requestConfig.autoRequest || this.requestConfig.autoRequest === undefined)
223
223
  ) {
224
+ this.$emit('search', this.form)
224
225
  this.search()
225
226
  }
226
227
  },
@@ -255,11 +256,16 @@ export default {
255
256
  const defaultParams =
256
257
  typeof this.requestConfig.params === 'function'
257
258
  ? this.requestConfig.params(this.form)
258
- : this.requestConfig.params
259
- const { data } = await this.requestConfig.api({
260
- ...defaultParams,
261
- ...params
262
- })
259
+ : {
260
+ ...this.form,
261
+ ...this.requestConfig.params
262
+ }
263
+ params = {
264
+ ...params,
265
+ ...defaultParams
266
+ }
267
+ this.$emit('get-data', params)
268
+ const { data } = await this.requestConfig.api(params)
263
269
  this.total = data.total
264
270
  let listData = data.list || []
265
271
  if (this.requestConfig.props) {