doway-coms 2.10.57 → 2.10.59
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/packages/BaseForm/src/index.vue +32 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :style="computedformStyle" class="form-container">
|
|
3
|
-
<a-button
|
|
3
|
+
<a-button v-if="showFold===true"
|
|
4
4
|
class="collapse-btn"
|
|
5
5
|
type="link"
|
|
6
6
|
@click="hiddenDetail = !hiddenDetail"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
:style="getFieldStyle(col)"
|
|
13
13
|
v-for="(col,colIndex) in internalComputedHiddenCols"
|
|
14
14
|
:key="col.field"
|
|
15
|
-
v-show="hiddenDetail ?
|
|
15
|
+
v-show="hiddenDetail ? col.foldVisible===true : true"
|
|
16
16
|
>
|
|
17
17
|
<!-- 文本框输入控件 -->
|
|
18
18
|
<BaseInput
|
|
@@ -326,10 +326,10 @@
|
|
|
326
326
|
/>
|
|
327
327
|
</div>
|
|
328
328
|
<template v-if="layoutType==='default'">
|
|
329
|
+
<!-- <div class="d-form-item-ghost"></div>
|
|
329
330
|
<div class="d-form-item-ghost"></div>
|
|
330
331
|
<div class="d-form-item-ghost"></div>
|
|
331
|
-
<div class="d-form-item-ghost"></div>
|
|
332
|
-
<div class="d-form-item-ghost"></div>
|
|
332
|
+
<div class="d-form-item-ghost"></div> -->
|
|
333
333
|
</template>
|
|
334
334
|
</div>
|
|
335
335
|
</template>
|
|
@@ -374,6 +374,12 @@ export default {
|
|
|
374
374
|
},
|
|
375
375
|
name: 'BaseForm',
|
|
376
376
|
props: {
|
|
377
|
+
showFold:{
|
|
378
|
+
type: Boolean,
|
|
379
|
+
default: function () {
|
|
380
|
+
return false
|
|
381
|
+
},
|
|
382
|
+
},
|
|
377
383
|
layoutType: {
|
|
378
384
|
// 布局方式。默认布局是flex自动换行布局,grid网格固定布局
|
|
379
385
|
type: String,
|
|
@@ -440,10 +446,13 @@ export default {
|
|
|
440
446
|
computedformStyle(){
|
|
441
447
|
let layoutFormStyle = {
|
|
442
448
|
display: 'flex',
|
|
449
|
+
columnGap: this.flexGap+ 'px',
|
|
450
|
+
rowGap:'7px',
|
|
443
451
|
flexFlow: 'row wrap',
|
|
444
452
|
justifyContent: 'flex-start',
|
|
445
453
|
padding: '5px 5px 0px 5px',
|
|
446
|
-
overflowY: 'auto'
|
|
454
|
+
overflowY: 'auto',
|
|
455
|
+
paddingBottom:'7px'
|
|
447
456
|
}
|
|
448
457
|
|
|
449
458
|
if(this.layoutType==='grid'){
|
|
@@ -454,7 +463,7 @@ export default {
|
|
|
454
463
|
display: 'grid',
|
|
455
464
|
gridTemplateRows: `repeat(${maxRow}, auto)`,
|
|
456
465
|
gridTemplateColumns: `repeat(${maxCol}, 1fr)`,
|
|
457
|
-
|
|
466
|
+
columnGrap: this.flexGap + 'px'
|
|
458
467
|
}
|
|
459
468
|
}
|
|
460
469
|
//默认布局
|
|
@@ -479,6 +488,7 @@ export default {
|
|
|
479
488
|
filters: {},
|
|
480
489
|
data() {
|
|
481
490
|
return {
|
|
491
|
+
flexGap:10,
|
|
482
492
|
hiddenDetail: false,
|
|
483
493
|
moment,
|
|
484
494
|
editFormName: '',
|
|
@@ -591,19 +601,25 @@ export default {
|
|
|
591
601
|
activated() {},
|
|
592
602
|
methods: {
|
|
593
603
|
getFieldStyle(colInfo){
|
|
604
|
+
// console.debug('0 0 calc('+colInfo.colSpan*250+'px -'+(colInfo.colSpan-1)*this.flexGap +'px)')
|
|
594
605
|
let fieldStyle ={
|
|
595
|
-
width: colInfo.colSpan ? ('calc('+colInfo.colSpan*250+'px + '+(colInfo.colSpan-1)*16+'px)'): '250px',
|
|
596
|
-
flex: (colInfo.colSpan
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
606
|
+
// width: colInfo.colSpan ? ('calc('+colInfo.colSpan*250+'px + '+(colInfo.colSpan-1)*16+'px)'): '250px',
|
|
607
|
+
flex: '0 0 ' + (colInfo.width && colInfo.width>200?colInfo.width:250)+'px', //colInfo.colSpan ? '0 0 '+(colInfo.colSpan*250+(colInfo.colSpan-1)*this.flexGap)+'px': '0 0 250px',
|
|
608
|
+
|
|
609
|
+
// flexGrow: 0,
|
|
610
|
+
// flexShrink: 0,
|
|
611
|
+
// flexBasis: colInfo.colSpan? (colInfo.colSpan*250)+'px':'250px',
|
|
612
|
+
// flexGrow: '1',
|
|
613
|
+
// flexShrink: '1',
|
|
614
|
+
// flexBasis:'250px', //colInfo.colSpan ? ('calc('+colInfo.colSpan*250+'px + '+(colInfo.colSpan-1)*16+'px)'): '250px',
|
|
600
615
|
marginTop: '0px',
|
|
601
|
-
marginRight: '8px',
|
|
616
|
+
// marginRight: '8px',
|
|
602
617
|
marginBottom: '0px',
|
|
603
|
-
marginLeft: '8px',
|
|
604
|
-
padding: '2px 8px 2px 8px',
|
|
605
|
-
minWidth: '
|
|
606
|
-
borderRadius: '6px'
|
|
618
|
+
// marginLeft: '8px',
|
|
619
|
+
// padding: '2px 8px 2px 8px',
|
|
620
|
+
// minWidth: '250px',
|
|
621
|
+
borderRadius: '6px',
|
|
622
|
+
maxWidth:'100%'
|
|
607
623
|
}
|
|
608
624
|
if(this.layoutType==='grid'){
|
|
609
625
|
fieldStyle = {
|