vue2-client 1.9.147 → 1.9.149
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
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: 'Demo',
|
|
7
7
|
components: { XAddNativeForm },
|
|
8
8
|
mounted () {
|
|
9
|
-
getConfigByNameAsync('
|
|
9
|
+
getConfigByNameAsync('formtestForm', 'af-system').then(res => {
|
|
10
10
|
console.log('===res', res)
|
|
11
11
|
this.$refs.xAddFrom.init(res)
|
|
12
12
|
})
|
|
@@ -353,8 +353,8 @@
|
|
|
353
353
|
<a-date-picker
|
|
354
354
|
@change="attr.dataChangeFunc && debouncedDataChangeFunc()"
|
|
355
355
|
v-if="mode === '新增/修改'"
|
|
356
|
+
:disabled="disabled || readOnly"
|
|
356
357
|
v-model="form[attr.model]"
|
|
357
|
-
:disabled="disabled"
|
|
358
358
|
:show-time="true"
|
|
359
359
|
style="width: 100%;"
|
|
360
360
|
:valueFormat="formatType|| 'YYYY-MM-DD HH:mm:ss'"/>
|
|
@@ -398,7 +398,7 @@
|
|
|
398
398
|
v-else
|
|
399
399
|
@change="attr.dataChangeFunc && debouncedDataChangeFunc()"
|
|
400
400
|
v-model="form[attr.model]"
|
|
401
|
-
:disabled="disabled"
|
|
401
|
+
:disabled="disabled || readOnly"
|
|
402
402
|
:show-time="true"
|
|
403
403
|
:valueFormat="formatType || 'YYYY-MM'"
|
|
404
404
|
style="width: 100%;"
|
|
@@ -426,7 +426,7 @@
|
|
|
426
426
|
v-else
|
|
427
427
|
@change="attr.dataChangeFunc && debouncedDataChangeFunc()"
|
|
428
428
|
v-model="form[attr.model]"
|
|
429
|
-
:disabled="disabled"
|
|
429
|
+
:disabled="disabled || readOnly"
|
|
430
430
|
format="YYYY"
|
|
431
431
|
:valueFormat="formatType || 'YYYY'"
|
|
432
432
|
mode="year"
|
|
@@ -473,7 +473,7 @@
|
|
|
473
473
|
v-else
|
|
474
474
|
@change="attr.dataChangeFunc && debouncedDataChangeFunc()"
|
|
475
475
|
v-model="form[attr.model]"
|
|
476
|
-
:disabled="disabled"
|
|
476
|
+
:disabled="disabled || readOnly"
|
|
477
477
|
style="width: 100%;"
|
|
478
478
|
:showToday="true"
|
|
479
479
|
:show-time="{ defaultValue: moment('00:00:00', 'HH:mm:ss') }"
|
|
@@ -481,15 +481,8 @@
|
|
|
481
481
|
</a-form-model-item>
|
|
482
482
|
</x-form-col>
|
|
483
483
|
<!-- 文本域 -->
|
|
484
|
-
<
|
|
485
|
-
|
|
486
|
-
:style="layout === 'inline'?{width:'calc(100% - 60px)'}:{}"
|
|
487
|
-
:xs="24"
|
|
488
|
-
:sm="24"
|
|
489
|
-
:md="24"
|
|
490
|
-
:lg="24"
|
|
491
|
-
:xl="24"
|
|
492
|
-
:xxl="24">
|
|
484
|
+
<x-form-col v-else-if="attr.type === 'textarea' && show" :flex="attr.flex" :fullWidth="layout === 'inline'">
|
|
485
|
+
<!-- :style="layout === 'inline'?{width:'calc(100% - 60px)'}:{}"-->
|
|
493
486
|
<a-form-model-item
|
|
494
487
|
:labelCol="layout === 'inline'?{span:2}:undefined"
|
|
495
488
|
:wrapperCol="layout === 'inline'?{span:22}:undefined"
|
|
@@ -503,17 +496,9 @@
|
|
|
503
496
|
:placeholder="attr.placeholder ? attr.placeholder : '请输入'+attr.name.replace(/\s*/g, '')"
|
|
504
497
|
:rows="4"/>
|
|
505
498
|
</a-form-model-item>
|
|
506
|
-
</
|
|
499
|
+
</x-form-col>
|
|
507
500
|
<!-- 文件上传 -->
|
|
508
|
-
<
|
|
509
|
-
v-else-if="(attr.type === 'file' || attr.type === 'image') && show"
|
|
510
|
-
:style="layout === 'inline'?{width:'calc(100% - 60px)'}:{}"
|
|
511
|
-
:xs="24"
|
|
512
|
-
:sm="24"
|
|
513
|
-
:md="24"
|
|
514
|
-
:lg="24"
|
|
515
|
-
:xl="24"
|
|
516
|
-
:xxl="24">
|
|
501
|
+
<x-form-col v-else-if="(attr.type === 'file' || attr.type === 'image') && show" :flex="attr.flex" :fullWidth="layout === 'inline'">
|
|
517
502
|
<a-form-model-item
|
|
518
503
|
:labelCol="layout === 'inline'?{span:2}:undefined"
|
|
519
504
|
:wrapperCol="layout === 'inline'?{span:22}:undefined"
|
|
@@ -528,7 +513,7 @@
|
|
|
528
513
|
:service-name="serviceName"
|
|
529
514
|
@setFiles="setFiles"></upload>
|
|
530
515
|
</a-form-model-item>
|
|
531
|
-
</
|
|
516
|
+
</x-form-col>
|
|
532
517
|
<!-- 省市区选择框 -->
|
|
533
518
|
<x-form-col
|
|
534
519
|
v-else-if="attr.type === 'citySelect' && show"
|
|
@@ -1160,7 +1145,7 @@ export default {
|
|
|
1160
1145
|
init () {
|
|
1161
1146
|
if (!this.attr.flex) {
|
|
1162
1147
|
if (this.mode === '新增/修改') {
|
|
1163
|
-
if (['horizontal', 'vertical'].includes(this.layout)) {
|
|
1148
|
+
if (['horizontal', 'vertical'].includes(this.layout) || ['textarea', 'file', 'image'].includes(this.attr.type)) {
|
|
1164
1149
|
// 新增修改表单 horizontal 模式下默认为一行
|
|
1165
1150
|
this.attr.flex = {
|
|
1166
1151
|
xs: 24,
|
|
@@ -1175,7 +1160,7 @@ export default {
|
|
|
1175
1160
|
this.attr.flex = {
|
|
1176
1161
|
xs: 24,
|
|
1177
1162
|
sm: 12,
|
|
1178
|
-
md:
|
|
1163
|
+
md: 8,
|
|
1179
1164
|
lg: 8,
|
|
1180
1165
|
xl: 6,
|
|
1181
1166
|
xxl: 6
|
|
@@ -40,6 +40,10 @@ export default {
|
|
|
40
40
|
occupyCol: {
|
|
41
41
|
type: Number,
|
|
42
42
|
default: 1
|
|
43
|
+
},
|
|
44
|
+
fullWidth: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false
|
|
43
47
|
}
|
|
44
48
|
},
|
|
45
49
|
computed: {
|
|
@@ -58,6 +62,13 @@ export default {
|
|
|
58
62
|
computedStyles () {
|
|
59
63
|
const realFlex = Math.min(this.computedFlex * this.occupyCol, 24)
|
|
60
64
|
const flexValue = (realFlex / 24) * 100
|
|
65
|
+
|
|
66
|
+
if (this.fullWidth) {
|
|
67
|
+
return {
|
|
68
|
+
flex: `0 0 calc(${flexValue}% - 60px)`,
|
|
69
|
+
maxWidth: `${flexValue}%`,
|
|
70
|
+
}
|
|
71
|
+
}
|
|
61
72
|
return {
|
|
62
73
|
flex: `0 0 ${flexValue}%`,
|
|
63
74
|
maxWidth: `${flexValue}%`,
|
|
@@ -83,11 +83,11 @@ routerResource.example = {
|
|
|
83
83
|
{
|
|
84
84
|
path: 'default',
|
|
85
85
|
name: '示例页面',
|
|
86
|
-
|
|
86
|
+
component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
|
|
87
87
|
// component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
|
|
88
88
|
// component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
|
|
89
89
|
// component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
|
|
90
|
-
component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
|
|
90
|
+
// component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
|
|
91
91
|
// component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
|
|
92
92
|
// component: () => import('@vue2-client/base-client/components/common/XReportGrid/XReportDemo.vue'),
|
|
93
93
|
// component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
|