vue2-client 1.9.69 → 1.9.70

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": "vue2-client",
3
- "version": "1.9.69",
3
+ "version": "1.9.70",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -20,11 +20,11 @@
20
20
  :setForm="setForm"
21
21
  @mounted="onItemMounted"
22
22
  />
23
- <div v-for="(groupItem, groupIndex) in groupJsonData" :key="'group-' + groupIndex">
23
+ <template v-for="(groupItem, groupIndex) in groupJsonData">
24
24
  <x-form-item
25
25
  v-for="(item, index) in groupItem.groupItems"
26
26
  :showLabel="!simpleMode"
27
- :key="index"
27
+ :key="`group-${groupIndex}-item-${index}`"
28
28
  :attr="item"
29
29
  :form="form"
30
30
  :service-name="serviceName"
@@ -32,21 +32,20 @@
32
32
  :env="env"
33
33
  :setForm="setForm"
34
34
  />
35
- </div>
36
- <div v-show="advanced">
37
- <x-form-item
38
- v-for="(item, index) in realJsonData.slice(7)"
39
- :showLabel="!simpleMode"
40
- :key="'advanced'+index"
41
- :attr="item"
42
- :form="form"
43
- :service-name="serviceName"
44
- :get-data-params="getDataParams"
45
- :env="env"
46
- :setForm="setForm"
47
- @mounted="onItemMounted"
48
- />
49
- </div>
35
+ </template>
36
+ <x-form-item
37
+ v-show="advanced"
38
+ v-for="(item, index) in realJsonData.slice(7)"
39
+ :showLabel="!simpleMode"
40
+ :key="'advanced'+index"
41
+ :attr="item"
42
+ :form="form"
43
+ :service-name="serviceName"
44
+ :get-data-params="getDataParams"
45
+ :env="env"
46
+ :setForm="setForm"
47
+ @mounted="onItemMounted"
48
+ />
50
49
  <a-col style="margin-left: auto">
51
50
  <span
52
51
  :style="advanced && { float: 'right', overflow: 'hidden' } || {} "
@@ -2,6 +2,7 @@
2
2
  <!-- 输入框 -->
3
3
  <x-form-col
4
4
  v-if="attr.type === 'input' && show"
5
+ :occupyCol="attr.occupyCol"
5
6
  :flex="attr.flex">
6
7
  <a-form-model-item
7
8
  :ref="attr.model"
@@ -447,6 +448,7 @@
447
448
  <!-- 地点搜索框 -->
448
449
  <x-form-col
449
450
  v-else-if="attr.type === 'addressSearch' && show"
451
+ :occupyCol="attr.occupyCol"
450
452
  :flex="attr.flex">
451
453
  <a-form-model-item
452
454
  :ref="attr.model"
@@ -943,34 +945,22 @@ export default {
943
945
  xxl: 24
944
946
  }
945
947
  } else {
946
- if (['input', 'addressSearch'] && this.attr.occupyCol) {
947
- // 如果是 input 看是否配置了 占用列配置
948
- this.attr.flex = {
949
- xs: 8 * this.attr.occupyCol,
950
- sm: 8 * this.attr.occupyCol,
951
- md: 8 * this.attr.occupyCol,
952
- lg: 8 * this.attr.occupyCol,
953
- xl: 8 * this.attr.occupyCol,
954
- xxl: 8 * this.attr.occupyCol
955
- }
956
- } else {
957
- // 新增修改表单 vertical 模式下默认为1列
958
- this.attr.flex = {
959
- xs: 24,
960
- sm: 24,
961
- md: 24,
962
- lg: 12,
963
- xl: 8,
964
- xxl: 8
965
- }
948
+ // 新增修改表单 vertical 模式下默认为1列
949
+ this.attr.flex = {
950
+ xs: 24,
951
+ sm: 12,
952
+ md: 12,
953
+ lg: 8,
954
+ xl: 6,
955
+ xxl: 6
966
956
  }
967
957
  }
968
958
  } else {
969
959
  this.attr.flex = {
970
960
  xs: 24,
971
961
  sm: 24,
972
- md: 24,
973
- lg: 8,
962
+ md: 8,
963
+ lg: 6,
974
964
  xl: 6,
975
965
  xxl: 6
976
966
  }
@@ -1,6 +1,5 @@
1
1
  <template>
2
- <a-col
3
- :style="computedStyles">
2
+ <a-col :style="computedStyles">
4
3
  <slot></slot>
5
4
  </a-col>
6
5
  </template>
@@ -38,6 +37,10 @@ export default {
38
37
  xxl: 6,
39
38
  }),
40
39
  },
40
+ occupyCol: {
41
+ type: Number,
42
+ default: 1
43
+ }
41
44
  },
42
45
  computed: {
43
46
  computedFlex () {
@@ -53,12 +56,14 @@ export default {
53
56
  return this.flex.xxl
54
57
  },
55
58
  computedStyles () {
56
- const flexValue = (this.computedFlex * 100) / 24
59
+ const realFlex = Math.min(this.computedFlex * this.occupyCol, 24)
60
+ const flexValue = (realFlex / 24) * 100
57
61
  return {
58
62
  flex: `0 0 ${flexValue}%`,
59
63
  maxWidth: `${flexValue}%`,
60
64
  }
61
65
  }
66
+
62
67
  },
63
68
  data () {
64
69
  return {
@@ -5,6 +5,11 @@ import { getConfigByNameAsync } from '@vue2-client/services/api/common'
5
5
  export default {
6
6
  name: 'Demo',
7
7
  components: { XFormGroup },
8
+ data () {
9
+ return {
10
+ visible: true
11
+ }
12
+ },
8
13
  created () {
9
14
  getConfigByNameAsync('addUserGeneralInfoFrom', 'af-revenue').then(res => {
10
15
  this.$refs.xFormGroupDemo.init({
@@ -26,7 +31,7 @@ export default {
26
31
 
27
32
  <template>
28
33
  <a-modal
29
- :visible="true"
34
+ v-model="visible"
30
35
  :bodyStyle="{height:'70vh'}"
31
36
  title="测试表单组"
32
37
  @ok="submitForm"
@@ -40,7 +40,7 @@ export default {
40
40
  data () {
41
41
  return {
42
42
  // 查询配置文件名
43
- queryParamsName: 'crud_dictionary_manage',
43
+ queryParamsName: 'ChargeQueryCRUD',
44
44
  // 查询配置左侧tree
45
45
  // xTreeConfigName: 'addressType',
46
46
  // 新增表单固定值
@@ -84,8 +84,9 @@ routerResource.example = {
84
84
  path: 'default',
85
85
  name: '示例页面',
86
86
  // component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
87
+ component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
87
88
  // component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
88
- component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
89
+ // component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
89
90
  // component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
90
91
  // component: () => import('@vue2-client/base-client/components/common/XReportGrid/XReportDemo.vue'),
91
92
  // component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),