general-basic-form 1.0.20 → 1.0.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/README.md CHANGED
@@ -24,9 +24,12 @@
24
24
  size="small"
25
25
  ref="generalBasicForm"
26
26
  :labelWidth="formLabelWidth"
27
+ :formData: {
28
+ // 外部传入的表单数据,用于回填
29
+ }
27
30
  noUrlParameters
28
31
  />
29
-
32
+
30
33
  <style lang="scss" scoped>
31
34
  :deep {
32
35
  .el-form-item {
@@ -43,7 +46,7 @@
43
46
  if (valid) { ...}
44
47
  }
45
48
  );
46
-
49
+
47
50
  ![image-20211014191532067](https://raw.githubusercontent.com/Alan1034/PicturesServer/main/PicGo_imgs/202110141915657.png)
48
51
 
49
52
  数据示例:
@@ -88,6 +91,20 @@
88
91
  type: "date-picker",
89
92
  "value-format": "yyyyMMdd"
90
93
  },
94
+ {
95
+ label: "二次工艺成本价格(人民币分)",
96
+ prop: "spCost",
97
+ type: "input-number",
98
+ "controls-position": "right",
99
+ min: 0,
100
+ rules: [
101
+ {
102
+ required: true,
103
+ message: "请输入二次工艺成本价格",
104
+ trigger: "blur",
105
+ },
106
+ ],
107
+ },
91
108
  {
92
109
  label: "分类",
93
110
  prop: "分类",
@@ -159,9 +176,9 @@
159
176
  //分别支持input输入框,select单选框,date-picker日期选择器,cascader层级选择器 四种组件
160
177
 
161
178
  //date-picker可以传入'start-placeholder'和'end-placeholder',其他组件支持placeholder传入
162
-
179
+
163
180
  //rules为表单校验规则,每个组件都可以传入
164
-
181
+
165
182
  //input支持template,支持以下几个属性:
166
183
  //prefix 输入框头部内容,只对 type="text"(默认) 有效
167
184
  //suffix 输入框尾部内容,只对 type="text" 有效
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "general-basic-form",
3
- "version": "1.0.20",
3
+ "version": "1.0.24",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
@@ -1,7 +1,7 @@
1
1
  <!--
2
2
  * @Author: 陈德立*******419287484@qq.com
3
3
  * @Date: 2021-08-20 17:14:53
4
- * @LastEditTime: 2021-11-10 11:49:15
4
+ * @LastEditTime: 2021-11-23 17:49:55
5
5
  * @LastEditors: 陈德立*******419287484@qq.com
6
6
  * @Github: https://github.com/Alan1034
7
7
  * @Description:
@@ -90,6 +90,7 @@
90
90
  :min="item.min"
91
91
  :max="item.max"
92
92
  :controls-position="item['controls-position']"
93
+ :step-strictly="item['step-strictly']"
93
94
  />
94
95
  </el-form-item>
95
96
  <slot></slot>
@@ -156,7 +157,7 @@ export default {
156
157
  formData: {
157
158
  // 外部传入的表单数据,用于回填
158
159
  type: Object,
159
- default: {},
160
+ default: () => {},
160
161
  },
161
162
  },
162
163
  data() {
@@ -231,6 +232,9 @@ export default {
231
232
  query: { ...params },
232
233
  });
233
234
  }
235
+ this.queryParams = {
236
+ ...(this.noUrlParameters ? {} : this.$route?.query),
237
+ };
234
238
  this.handleQuery();
235
239
  },
236
240
  currentInputComponent() {
@@ -240,10 +244,8 @@ export default {
240
244
  };
241
245
  </script>
242
246
 
243
- <style lang="scss" scoped>
244
- :deep {
245
- .el-form-item {
246
- margin-bottom: 3px;
247
- }
247
+ <style scoped>
248
+ .el-form-item {
249
+ margin-bottom: 2px !important;
248
250
  }
249
251
  </style>