meixioacomponent 0.2.3 → 0.2.4

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": "meixioacomponent",
3
- "version": "0.2.03",
3
+ "version": "0.2.04",
4
4
  "private": false,
5
5
  "author": "YuRi",
6
6
  "main": "lib/meixioacomponent.umd.min.js",
@@ -120,6 +120,11 @@ export default {
120
120
  type: Object,
121
121
  require: true,
122
122
  },
123
+
124
+ rowNumber: {
125
+ type: Number,
126
+ default: null,
127
+ },
123
128
  },
124
129
  components: {
125
130
  baseAreaVue,
@@ -160,6 +165,11 @@ export default {
160
165
  ];
161
166
  }
162
167
 
168
+ if (this.$props.rowNumber) {
169
+ this.chunkLength = this.$props.rowNumber;
170
+ return;
171
+ }
172
+
163
173
  let width = this.$refs.proFormWrap.clientWidth;
164
174
  if (this.$props.formType != "default") {
165
175
  this.chunkLength = 1;
@@ -169,24 +179,29 @@ export default {
169
179
  this.chunkLength = 2;
170
180
  return;
171
181
  }
172
-
173
182
  this.chunkLength = 3;
174
183
  },
175
184
  formItemConfirm(params) {
176
- // element 验证单条表单修改
177
- const rulesItem = this.$props.rules[params.config.key];
178
- if (rulesItem) {
179
- this.$refs.form.validateField([`${params.config.key}`], (errorMsg) => {
180
- //console.log(errorMsg);
181
- if (!errorMsg) {
182
- params.this.handleConfirm();
183
- this.$emit("formItemConfirm", params.config);
184
- }
185
- });
186
- } else {
187
- params.this.handleConfirm();
188
- this.$emit("formItemConfirm", params.config);
185
+ if (this.$props.rules) {
186
+ // element 验证单条表单修改
187
+ const rulesItem = this.$props.rules[params.config.key];
188
+ if (rulesItem) {
189
+ this.$refs.form.validateField(
190
+ [`${params.config.key}`],
191
+ (errorMsg) => {
192
+ //console.log(errorMsg);
193
+ if (!errorMsg) {
194
+ params.this.handleConfirm();
195
+ this.$emit("formItemConfirm", params.config);
196
+ return;
197
+ }
198
+ }
199
+ );
200
+ }
201
+ return;
189
202
  }
203
+ params.this.handleConfirm();
204
+ this.$emit("formItemConfirm", params.config);
190
205
  },
191
206
  setFormData() {
192
207
  this.formdata = {};
@@ -174,7 +174,7 @@
174
174
  <el-button
175
175
  type="info"
176
176
  size="small"
177
- icon="el-meixicomponenticon-close"
177
+ icon="el-icon-close"
178
178
  class="dropdown-button"
179
179
  @click="handleClick('edit')"
180
180
  plain
@@ -9,6 +9,7 @@
9
9
  :rules="rules"
10
10
  :footer="false"
11
11
  :formList="formList"
12
+ :rowNumber="rowNumber"
12
13
  :labelWidth="labelWidth"
13
14
  @formItemConfirm="formItemConfirm"
14
15
  ></pro_formVue> </template
@@ -44,6 +45,10 @@ export default {
44
45
  rules: {
45
46
  type: Object,
46
47
  },
48
+ rowNumber: {
49
+ type: Number,
50
+ default: null,
51
+ },
47
52
  },
48
53
  computed: {
49
54
  iconClass() {