@ddwl/ddwl-ui 1.4.3 → 1.4.5
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/dist/index.common.js +103 -97
- package/dist/index.umd.js +103 -97
- package/dist/index.umd.min.js +3 -3
- package/package.json +1 -1
- package/src/packages/search-form/index.vue +6 -4
- package/src/packages/table/index.vue +7 -4
package/package.json
CHANGED
|
@@ -151,11 +151,12 @@ export default {
|
|
|
151
151
|
* @description: 查询
|
|
152
152
|
*/
|
|
153
153
|
async search() {
|
|
154
|
-
this
|
|
154
|
+
const params = cloneDeep(this.form)
|
|
155
|
+
this.$emit('search', params)
|
|
155
156
|
if (this.searchData) {
|
|
156
157
|
try {
|
|
157
158
|
this.searchLoading = true
|
|
158
|
-
await this.searchData({ pageNum: 1 },
|
|
159
|
+
await this.searchData({ pageNum: 1 }, params)
|
|
159
160
|
this.searchLoading = false
|
|
160
161
|
} catch (e) {
|
|
161
162
|
this.searchLoading = false
|
|
@@ -167,10 +168,11 @@ export default {
|
|
|
167
168
|
*/
|
|
168
169
|
async reset() {
|
|
169
170
|
this.form = cloneDeep(this.initForm)
|
|
170
|
-
this
|
|
171
|
+
const params = cloneDeep(this.form)
|
|
172
|
+
this.$emit('search', params)
|
|
171
173
|
if (this.searchData) {
|
|
172
174
|
this.resetLoading = true
|
|
173
|
-
await this.searchData({ pageNum: 1 },
|
|
175
|
+
await this.searchData({ pageNum: 1 }, params)
|
|
174
176
|
this.resetLoading = false
|
|
175
177
|
}
|
|
176
178
|
},
|
|
@@ -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
|
},
|
|
@@ -256,10 +257,12 @@ export default {
|
|
|
256
257
|
typeof this.requestConfig.params === 'function'
|
|
257
258
|
? this.requestConfig.params(this.form)
|
|
258
259
|
: this.requestConfig.params
|
|
259
|
-
|
|
260
|
-
...
|
|
261
|
-
...
|
|
262
|
-
}
|
|
260
|
+
params = {
|
|
261
|
+
...params,
|
|
262
|
+
...defaultParams
|
|
263
|
+
}
|
|
264
|
+
this.$emit('get-data', params)
|
|
265
|
+
const { data } = await this.requestConfig.api(params)
|
|
263
266
|
this.total = data.total
|
|
264
267
|
let listData = data.list || []
|
|
265
268
|
if (this.requestConfig.props) {
|