doway-coms 2.10.57 → 2.10.58
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 +29 -15
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,6 +446,7 @@ export default {
|
|
|
440
446
|
computedformStyle(){
|
|
441
447
|
let layoutFormStyle = {
|
|
442
448
|
display: 'flex',
|
|
449
|
+
columnGap: this.flexGap+ 'px',
|
|
443
450
|
flexFlow: 'row wrap',
|
|
444
451
|
justifyContent: 'flex-start',
|
|
445
452
|
padding: '5px 5px 0px 5px',
|
|
@@ -454,7 +461,7 @@ export default {
|
|
|
454
461
|
display: 'grid',
|
|
455
462
|
gridTemplateRows: `repeat(${maxRow}, auto)`,
|
|
456
463
|
gridTemplateColumns: `repeat(${maxCol}, 1fr)`,
|
|
457
|
-
|
|
464
|
+
columnGrap: this.flexGap + 'px'
|
|
458
465
|
}
|
|
459
466
|
}
|
|
460
467
|
//默认布局
|
|
@@ -479,6 +486,7 @@ export default {
|
|
|
479
486
|
filters: {},
|
|
480
487
|
data() {
|
|
481
488
|
return {
|
|
489
|
+
flexGap:10,
|
|
482
490
|
hiddenDetail: false,
|
|
483
491
|
moment,
|
|
484
492
|
editFormName: '',
|
|
@@ -591,19 +599,25 @@ export default {
|
|
|
591
599
|
activated() {},
|
|
592
600
|
methods: {
|
|
593
601
|
getFieldStyle(colInfo){
|
|
602
|
+
// console.debug('0 0 calc('+colInfo.colSpan*250+'px -'+(colInfo.colSpan-1)*this.flexGap +'px)')
|
|
594
603
|
let fieldStyle ={
|
|
595
|
-
width: colInfo.colSpan ? ('calc('+colInfo.colSpan*250+'px + '+(colInfo.colSpan-1)*16+'px)'): '250px',
|
|
596
|
-
flex: (colInfo.colSpan
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
604
|
+
// width: colInfo.colSpan ? ('calc('+colInfo.colSpan*250+'px + '+(colInfo.colSpan-1)*16+'px)'): '250px',
|
|
605
|
+
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',
|
|
606
|
+
|
|
607
|
+
// flexGrow: 0,
|
|
608
|
+
// flexShrink: 0,
|
|
609
|
+
// flexBasis: colInfo.colSpan? (colInfo.colSpan*250)+'px':'250px',
|
|
610
|
+
// flexGrow: '1',
|
|
611
|
+
// flexShrink: '1',
|
|
612
|
+
// flexBasis:'250px', //colInfo.colSpan ? ('calc('+colInfo.colSpan*250+'px + '+(colInfo.colSpan-1)*16+'px)'): '250px',
|
|
600
613
|
marginTop: '0px',
|
|
601
|
-
marginRight: '8px',
|
|
614
|
+
// marginRight: '8px',
|
|
602
615
|
marginBottom: '0px',
|
|
603
|
-
marginLeft: '8px',
|
|
604
|
-
padding: '2px 8px 2px 8px',
|
|
605
|
-
minWidth: '
|
|
606
|
-
borderRadius: '6px'
|
|
616
|
+
// marginLeft: '8px',
|
|
617
|
+
// padding: '2px 8px 2px 8px',
|
|
618
|
+
// minWidth: '250px',
|
|
619
|
+
borderRadius: '6px',
|
|
620
|
+
maxWidth:'100%'
|
|
607
621
|
}
|
|
608
622
|
if(this.layoutType==='grid'){
|
|
609
623
|
fieldStyle = {
|