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 +1 -1
- package/src/base-client/components/common/XForm/XForm.vue +16 -17
- package/src/base-client/components/common/XForm/XFormItem.vue +12 -22
- package/src/base-client/components/common/XFormCol/XFormCol.vue +8 -3
- package/src/base-client/components/common/XFormGroup/demo.vue +6 -1
- package/src/base-client/components/common/XFormTable/demo.vue +1 -1
- package/src/router/async/router.map.js +2 -1
package/package.json
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
:setForm="setForm"
|
|
21
21
|
@mounted="onItemMounted"
|
|
22
22
|
/>
|
|
23
|
-
<
|
|
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
|
-
</
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
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:
|
|
973
|
-
lg:
|
|
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
|
|
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
|
-
|
|
34
|
+
v-model="visible"
|
|
30
35
|
:bodyStyle="{height:'70vh'}"
|
|
31
36
|
title="测试表单组"
|
|
32
37
|
@ok="submitForm"
|
|
@@ -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'),
|