vue2-client 1.6.46 → 1.6.48

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/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
+ **1.6.47 -2023-07-13 @江超**
5
+ - 可以在查询配置中指定表单项的栅格了
6
+
4
7
  **1.6.44 - 1.6.46 -2023-07-13 @江超**
5
8
  - 修复单选框的校验问题
6
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.6.46",
3
+ "version": "1.6.48",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
@@ -26,8 +26,6 @@
26
26
  :form="form"
27
27
  :images="images"
28
28
  :service-name="serviceName"
29
- :xl="12"
30
- :xxl="8"
31
29
  mode="新增/修改"
32
30
  :get-data-params="getDataParams"
33
31
  />
@@ -16,8 +16,6 @@
16
16
  :form="form"
17
17
  :images="images"
18
18
  :service-name="serviceName"
19
- :xl="12"
20
- :xxl="8"
21
19
  mode="新增/修改"
22
20
  />
23
21
  </a-row>
@@ -2,8 +2,7 @@
2
2
  <!-- 输入框 -->
3
3
  <x-form-col
4
4
  v-if="attr.type === 'input'"
5
- :xl="xl"
6
- :xxl="xxl">
5
+ :flex="attr.flex">
7
6
  <a-form-model-item
8
7
  :ref="attr.model"
9
8
  :label="attr.name"
@@ -14,8 +13,7 @@
14
13
  <!-- 下拉框 -->
15
14
  <x-form-col
16
15
  v-else-if="attr.type === 'select'"
17
- :xl="xl"
18
- :xxl="xxl">
16
+ :flex="attr.flex">
19
17
  <a-form-model-item
20
18
  :ref="attr.model"
21
19
  :label="attr.name"
@@ -88,8 +86,7 @@
88
86
  <!-- 多选框 -->
89
87
  <x-form-col
90
88
  v-else-if="attr.type === 'checkbox'"
91
- :xl="xl"
92
- :xxl="xxl">
89
+ :flex="attr.flex">
93
90
  <a-form-model-item
94
91
  :ref="attr.model"
95
92
  :label="attr.name"
@@ -154,8 +151,7 @@
154
151
  <!-- 单选框 -->
155
152
  <x-form-col
156
153
  v-else-if="attr.type === 'radio'"
157
- :xl="xl"
158
- :xxl="xxl">
154
+ :flex="attr.flex">
159
155
  <a-form-model-item
160
156
  :ref="attr.model"
161
157
  :label="attr.name"
@@ -184,8 +180,7 @@
184
180
  <!-- 日期范围选择器 -->
185
181
  <x-form-col
186
182
  v-else-if="attr.type === 'rangePicker'"
187
- :xl="xl"
188
- :xxl="xxl">
183
+ :flex="attr.flex">
189
184
  <a-form-model-item :ref="attr.model" :label="attr.name" :prop="attr.model">
190
185
  <a-range-picker v-model="form[attr.model]" :disabled="disabled" :show-time="true" valueFormat="YYYY-MM-DD HH:mm:ss"/>
191
186
  </a-form-model-item>
@@ -193,8 +188,7 @@
193
188
  <!-- 月份选择器 -->
194
189
  <x-form-col
195
190
  v-else-if="attr.type === 'monthPicker'"
196
- :xl="xl"
197
- :xxl="xxl">
191
+ :flex="attr.flex">
198
192
  <a-form-model-item :ref="attr.model" :label="attr.name" :prop="attr.model">
199
193
  <a-month-picker v-model="form[attr.model]" :disabled="disabled" :show-time="true" valueFormat="YYYY-MM"/>
200
194
  </a-form-model-item>
@@ -202,8 +196,7 @@
202
196
  <!-- 年份选择器 -->
203
197
  <x-form-col
204
198
  v-else-if="attr.type === 'yearPicker'"
205
- :xl="xl"
206
- :xxl="xxl">
199
+ :flex="attr.flex">
207
200
  <a-form-model-item :ref="attr.model" :label="attr.name" :prop="attr.model">
208
201
  <a-date-picker
209
202
  v-model="form[attr.model]"
@@ -220,8 +213,7 @@
220
213
  <!-- 日期选择器 -->
221
214
  <x-form-col
222
215
  v-else-if="attr.type === 'datePicker'"
223
- :xl="xl"
224
- :xxl="xxl">
216
+ :flex="attr.flex">
225
217
  <a-form-model-item :ref="attr.model" :label="attr.name" :prop="attr.model">
226
218
  <a-date-picker
227
219
  v-model="form[attr.model]"
@@ -234,12 +226,14 @@
234
226
  <!-- 文本域 -->
235
227
  <x-form-col
236
228
  v-else-if="attr.type === 'textarea'"
237
- :lg="24"
238
- :md="24"
239
- :sm="24"
240
- :xl="24"
241
- :xs="24"
242
- :xxl="24">
229
+ :flex="{
230
+ xs: 24,
231
+ sm: 24,
232
+ md: 24,
233
+ lg: 24,
234
+ xl: 24,
235
+ xxl: 24
236
+ }">
243
237
  <a-form-model-item
244
238
  :ref="attr.model"
245
239
  :label="attr.name"
@@ -250,12 +244,14 @@
250
244
  <!-- 文件上传 -->
251
245
  <x-form-col
252
246
  v-else-if="attr.type === 'file' || attr.type === 'image'"
253
- :lg="24"
254
- :md="24"
255
- :sm="24"
256
- :xl="24"
257
- :xs="24"
258
- :xxl="24">
247
+ :flex="{
248
+ xs: 24,
249
+ sm: 24,
250
+ md: 24,
251
+ lg: 24,
252
+ xl: 24,
253
+ xxl: 24
254
+ }">
259
255
  <a-form-model-item :ref="attr.model" :label="attr.name" :prop="attr.model">
260
256
  <upload :files="files" :images="images" :model="attr" :service-name="serviceName" @setFiles="setFiles"></upload>
261
257
  </a-form-model-item>
@@ -263,8 +259,7 @@
263
259
  <!-- 省市区选择框 -->
264
260
  <x-form-col
265
261
  v-else-if="attr.type === 'citySelect'"
266
- :xl="xl"
267
- :xxl="xxl">
262
+ :flex="attr.flex">
268
263
  <a-form-model-item :ref="attr.model" :label="attr.name" :prop="attr.model">
269
264
  <citySelect v-model="form[attr.model]" ></citySelect>
270
265
  </a-form-model-item>
@@ -272,8 +267,7 @@
272
267
  <!-- 地点搜索框 -->
273
268
  <x-form-col
274
269
  v-else-if="attr.type === 'addressSearch'"
275
- :xl="xl"
276
- :xxl="xxl">
270
+ :flex="attr.flex">
277
271
  <a-form-model-item :ref="attr.model" :label="attr.name" :prop="attr.model">
278
272
  <address-search-combobox
279
273
  v-model="searchResult"
@@ -286,8 +280,7 @@
286
280
  <!-- 人员选择框 -->
287
281
  <x-form-col
288
282
  v-else-if="attr.type === 'personSetting'"
289
- :xl="xl"
290
- :xxl="xxl">
283
+ :flex="attr.flex">
291
284
  <a-form-model-item :ref="attr.model" :label="attr.name" :prop="attr.model">
292
285
  <PersonSetting v-model="form[attr.model]" ></PersonSetting>
293
286
  </a-form-model-item>
@@ -295,8 +288,7 @@
295
288
  <!-- 树形选择框 -->
296
289
  <x-form-col
297
290
  v-else-if="attr.type === 'treeSelect'"
298
- :xl="xl"
299
- :xxl="xxl">
291
+ :flex="attr.flex">
300
292
  <x-tree-select
301
293
  ref="xTreeSelect">
302
294
  </x-tree-select>
@@ -364,14 +356,6 @@ export default {
364
356
  return '查询'
365
357
  }
366
358
  },
367
- xl: {
368
- type: Number,
369
- default: undefined
370
- },
371
- xxl: {
372
- type: Number,
373
- default: undefined
374
- },
375
359
  files: {
376
360
  type: Array,
377
361
  default: () => {
@@ -418,6 +402,16 @@ export default {
418
402
  },
419
403
  methods: {
420
404
  init () {
405
+ if (this.mode === '新增/修改' && !this.attr.flex) {
406
+ this.attr.flex = {
407
+ xs: 24,
408
+ sm: 24,
409
+ md: 24,
410
+ lg: 12,
411
+ xl: 12,
412
+ xxl: 8
413
+ }
414
+ }
421
415
  if (this.attr.keyName && this.attr.keyName.indexOf('logic@') !== -1) {
422
416
  this.getData({}, res => {
423
417
  this.option = res
@@ -1,49 +1,38 @@
1
- <template>
2
- <a-col
3
- :xs="xs"
4
- :sm="sm"
5
- :md="md"
6
- :lg="lg"
7
- :xl="xl"
8
- :xxl="xxl" >
9
- <slot></slot>
10
- </a-col>
11
- </template>
12
-
13
- <script>
14
-
15
- export default {
16
- name: 'XFormCol',
17
- props: {
18
- xs: {
19
- type: Number,
20
- default: 24
21
- },
22
- sm: {
23
- type: Number,
24
- default: 24
25
- },
26
- md: {
27
- type: Number,
28
- default: 24
29
- },
30
- lg: {
31
- type: Number,
32
- default: 12
33
- },
34
- xl: {
35
- type: Number,
36
- default: 8
37
- },
38
- xxl: {
39
- type: Number,
40
- default: 6
41
- }
42
- },
43
- data () {
44
- return {
45
-
46
- }
47
- }
48
- }
49
- </script>
1
+ <template>
2
+ <a-col
3
+ :xs="flex.xs"
4
+ :sm="flex.sm"
5
+ :md="flex.md"
6
+ :lg="flex.lg"
7
+ :xl="flex.xl"
8
+ :xxl="flex.xxl" >
9
+ <slot></slot>
10
+ </a-col>
11
+ </template>
12
+
13
+ <script>
14
+
15
+ export default {
16
+ name: 'XFormCol',
17
+ props: {
18
+ flex: {
19
+ type: Object,
20
+ default: () => {
21
+ return {
22
+ xs: 24,
23
+ sm: 24,
24
+ md: 24,
25
+ lg: 12,
26
+ xl: 8,
27
+ xxl: 6
28
+ }
29
+ }
30
+ }
31
+ },
32
+ data () {
33
+ return {
34
+
35
+ }
36
+ }
37
+ }
38
+ </script>