xianniu-ui 0.3.23 → 0.3.24
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/lib/xianniu-ui.common.js +29 -36
- package/lib/xianniu-ui.umd.js +29 -36
- package/lib/xianniu-ui.umd.min.js +3 -3
- package/package.json +1 -1
- package/packages/search/main.vue +9 -15
package/package.json
CHANGED
package/packages/search/main.vue
CHANGED
|
@@ -158,9 +158,6 @@ export default {
|
|
|
158
158
|
return val && typeof val === "function";
|
|
159
159
|
};
|
|
160
160
|
},
|
|
161
|
-
_formData() {
|
|
162
|
-
return this.formData;
|
|
163
|
-
},
|
|
164
161
|
toggle() {
|
|
165
162
|
return this.isColl ? "el-icon-arrow-up" : "el-icon-arrow-down";
|
|
166
163
|
},
|
|
@@ -212,14 +209,15 @@ export default {
|
|
|
212
209
|
watch: {
|
|
213
210
|
formData: {
|
|
214
211
|
handler(n) {
|
|
215
|
-
n&&n.length&&this.init();
|
|
212
|
+
n && n.length && this.init();
|
|
216
213
|
},
|
|
217
|
-
immediate:true
|
|
214
|
+
immediate: true,
|
|
215
|
+
deep: true,
|
|
218
216
|
},
|
|
219
217
|
},
|
|
220
218
|
methods: {
|
|
221
219
|
init() {
|
|
222
|
-
this.form.value = []
|
|
220
|
+
this.form.value = [];
|
|
223
221
|
for (let i = 0, formData = this.formData; i < formData.length; i++) {
|
|
224
222
|
const item = formData[i];
|
|
225
223
|
item.isShow = i > 3 && this.showColl ? false : true;
|
|
@@ -232,8 +230,8 @@ export default {
|
|
|
232
230
|
},
|
|
233
231
|
onSearch() {
|
|
234
232
|
const formValue = {};
|
|
235
|
-
if (this.
|
|
236
|
-
for (let i = 0, formData = this.
|
|
233
|
+
if (this.form.value) {
|
|
234
|
+
for (let i = 0, formData = this.form.value; i < formData.length; i++) {
|
|
237
235
|
const item = formData[i];
|
|
238
236
|
const index = i;
|
|
239
237
|
const key = item.prop;
|
|
@@ -256,13 +254,9 @@ export default {
|
|
|
256
254
|
this.$emit("on-search", formValue);
|
|
257
255
|
},
|
|
258
256
|
onReset() {
|
|
259
|
-
this.form.value
|
|
260
|
-
for (let i = 0, formData = this.formData; i < formData.length; i++) {
|
|
257
|
+
for (let i = 0, formData = this.form.value; i < formData.length; i++) {
|
|
261
258
|
const item = formData[i];
|
|
262
|
-
|
|
263
|
-
key: item.prop,
|
|
264
|
-
modelVal: "",
|
|
265
|
-
});
|
|
259
|
+
item.modelVal = "";
|
|
266
260
|
}
|
|
267
261
|
this.$emit("on-reset");
|
|
268
262
|
this.$emit("on-search", {});
|
|
@@ -278,7 +272,7 @@ export default {
|
|
|
278
272
|
},
|
|
279
273
|
setData(key, data) {
|
|
280
274
|
const row =
|
|
281
|
-
this.
|
|
275
|
+
this.form.value && this.form.value.find((item) => item.label === key);
|
|
282
276
|
this.$set(row, "data", data);
|
|
283
277
|
},
|
|
284
278
|
},
|