bri-components 1.1.0 → 1.1.2
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/lib/0.bri-components.min.js +1 -1
- package/lib/1.bri-components.min.js +1 -1
- package/lib/2.bri-components.min.js +1 -1
- package/lib/3.bri-components.min.js +1 -1
- package/lib/4.bri-components.min.js +1 -1
- package/lib/5.bri-components.min.js +1 -1
- package/lib/6.bri-components.min.js +1 -1
- package/lib/7.bri-components.min.js +1 -1
- package/lib/8.bri-components.min.js +1 -1
- package/lib/9.bri-components.min.js +1 -1
- package/lib/bri-components.min.js +6 -6
- package/package.json +1 -1
- package/src/components/controls/base/BriLabels.vue +154 -12
- package/src/components/controls/base/DshCascader.vue +1 -5
- package/src/components/controls/base/DshCoordinates.vue +89 -81
- package/src/components/controls/base/DshEditor.vue +23 -7
- package/src/components/controls/base/DshInput.vue +7 -0
- package/src/components/controls/base/controlShow.vue +5 -5
- package/src/components/controls/controlMap.js +2 -2
- package/src/components/controls/controlMixin.js +39 -25
- package/src/components/controls/senior/cascaderTable.vue +47 -41
- package/src/components/controls/senior/flatTable.vue +58 -53
- package/src/components/form/DshForm.vue +8 -17
- package/src/components/list/BriFlatTable.vue +15 -12
- package/src/components/list/BriTable.vue +11 -5
- package/src/components/list/DshBox/DshBox.vue +1 -1
- package/src/components/list/DshBox/DshCard.vue +1 -1
- package/src/components/list/DshBox/DshCrossTable.vue +1 -1
- package/src/components/list/DshBox/DshList.vue +3 -3
- package/src/components/list/DshBox/DshPanel.vue +1 -1
- package/src/components/list/DshBox/DshSingleData.vue +1 -8
- package/src/components/list/DshCascaderTable.vue +4 -4
- package/src/components/list/DshFlatTable.vue +1 -1
- package/src/components/list/ZTree.vue +1 -1
- package/src/components/list/easyTable/v-table/src/table.vue +3 -3
- package/src/components/list/evTable/EvTable.vue +1 -1
- package/src/components/other/BriTransfer.vue +1 -1
- package/src/components/other/ZGantt.vue +2 -2
- package/src/components/other/ZLoading.vue +32 -3
- package/src/components/small/BriDrawer.vue +132 -0
- package/src/components/small/DshButtons.vue +3 -3
- package/src/components/small/DshControlDefine.vue +2 -1
- package/src/components/small/DshDropdown.vue +1 -1
- package/src/components/small/DshModal.vue +25 -1
- package/src/components/small/DshTdRender.js +1 -1
- package/src/components/unit/DshFormItem.vue +40 -41
- package/src/components/unit/DshUnit.vue +15 -8
- package/src/components/unit/unitMixin.js +0 -8
- package/src/index.js +7 -4
- package/src/styles/common/box.less +29 -0
- package/src/styles/common/control.less +2 -0
- package/src/styles/components/controls/BriLabels.less +113 -3
- package/src/styles/components/controls/DshCascader.less +7 -3
- package/src/styles/components/controls/DshCoordinates.less +6 -1
- package/src/styles/components/controls/DshInput.less +6 -0
- package/src/styles/components/controls/DshLabels.less +3 -3
- package/src/styles/components/controls/controlShow.less +0 -2
- package/src/styles/components/index.less +2 -2
- package/src/styles/components/other/InfoCascader.less +4 -0
- package/src/styles/components/other/ZLoading.less +23 -7
- package/src/styles/components/small/BriDrawer.less +34 -0
- package/src/styles/components/small/DshControlDefine.less +15 -36
- package/src/styles/components/small/DshDropdown.less +11 -8
- package/src/styles/components/small/DshTitle.less +1 -4
- package/src/styles/components/unit/DshFormItem.less +7 -5
- package/src/styles/iconfont/iconfont.css +254 -0
- package/src/styles/iconfont/iconfont.eot +0 -0
- package/src/styles/iconfont/iconfont.js +1 -0
- package/src/styles/iconfont/iconfont.json +422 -0
- package/src/styles/iconfont/iconfont.svg +137 -0
- package/src/styles/iconfont/iconfont.ttf +0 -0
- package/src/styles/iconfont/iconfont.woff +0 -0
- package/src/styles/iconfont/iconfont.woff2 +0 -0
- package/src/styles/index.less +1 -0
- package/src/styles/plugin/iview.less +7 -2
- package/src/styles/reset.less +2 -2
- package/src/utils/table.js +3 -4
|
@@ -145,14 +145,14 @@
|
|
|
145
145
|
<!-- 普通单元格 -->
|
|
146
146
|
<td
|
|
147
147
|
v-else
|
|
148
|
-
:key="col._key"
|
|
148
|
+
:key="col._key + ''"
|
|
149
149
|
:style="getTdStyle(col, row)"
|
|
150
150
|
>
|
|
151
151
|
<dsh-unit
|
|
152
|
-
:
|
|
152
|
+
:isUnit="!canEdit"
|
|
153
|
+
:rowIndex="rowIndex"
|
|
153
154
|
:formData="row[col.nodeKey]"
|
|
154
155
|
:formItem="col"
|
|
155
|
-
:rowIndex="rowIndex"
|
|
156
156
|
@change="$dispatchEvent(operationMap.changeVal, col, row, arguments)"
|
|
157
157
|
></dsh-unit>
|
|
158
158
|
</td>
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
v-else
|
|
166
166
|
class="table-nodata"
|
|
167
167
|
>
|
|
168
|
-
<td :colspan="columns.length"
|
|
168
|
+
<td :colspan="columns.length">暂无内容……</td>
|
|
169
169
|
</tr>
|
|
170
170
|
</tbody>
|
|
171
171
|
</table>
|
|
@@ -992,7 +992,7 @@
|
|
|
992
992
|
hasFrozenColumn: false, // 是否拥有固定列(false时最后一列的右边border无边框)
|
|
993
993
|
hasFrozenRightColumn: false,
|
|
994
994
|
resizeTimer: null,
|
|
995
|
-
firstLoad: true, //
|
|
995
|
+
firstLoad: true, // 表格首次初始化加载,用于区分显示”数据加载中“还是”暂无内容“
|
|
996
996
|
tipContent: ""
|
|
997
997
|
};
|
|
998
998
|
},
|
|
@@ -1113,7 +1113,7 @@
|
|
|
1113
1113
|
// 没数据时的html
|
|
1114
1114
|
errorContent: {
|
|
1115
1115
|
type: String,
|
|
1116
|
-
default: "
|
|
1116
|
+
default: "暂无内容..."
|
|
1117
1117
|
},
|
|
1118
1118
|
// 没数据时内容区域高度
|
|
1119
1119
|
errorContentHeight: {
|
|
@@ -1488,7 +1488,7 @@
|
|
|
1488
1488
|
updateErrorContent () {
|
|
1489
1489
|
if (!this.firstLoad) {
|
|
1490
1490
|
if (!(this.internalTableData && this.internalTableData.length)) {
|
|
1491
|
-
this.tipContent = "
|
|
1491
|
+
this.tipContent = "暂无内容";
|
|
1492
1492
|
}
|
|
1493
1493
|
}
|
|
1494
1494
|
this.firstLoad = false;
|
|
@@ -110,14 +110,14 @@
|
|
|
110
110
|
<td
|
|
111
111
|
:colspan="timeData.length"
|
|
112
112
|
class="briGantt-table-td"
|
|
113
|
-
|
|
113
|
+
>暂无内容</td>
|
|
114
114
|
</tr>
|
|
115
115
|
<tbody v-if="type==='table'">
|
|
116
116
|
<tr v-if="computedData.length === 0">
|
|
117
117
|
<td
|
|
118
118
|
:colspan="timeData.length"
|
|
119
119
|
class="briGantt-table-td"
|
|
120
|
-
|
|
120
|
+
>暂无内容</td>
|
|
121
121
|
</tr>
|
|
122
122
|
<tr
|
|
123
123
|
class="briGantt-table-tr"
|
|
@@ -9,7 +9,13 @@
|
|
|
9
9
|
>
|
|
10
10
|
<div class="ZLoading-main">
|
|
11
11
|
<slot>
|
|
12
|
-
<
|
|
12
|
+
<div class="ZLoading-main-content">
|
|
13
|
+
<div class="ZLoading-main-loading" :style="getStyle">
|
|
14
|
+
</div>
|
|
15
|
+
<div v-if="showLoadingText" class="ZLoading-main-loadingText">
|
|
16
|
+
加载中...
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
13
19
|
</slot>
|
|
14
20
|
</div>
|
|
15
21
|
</div>
|
|
@@ -37,7 +43,12 @@
|
|
|
37
43
|
},
|
|
38
44
|
kongImg: {
|
|
39
45
|
type: String
|
|
40
|
-
}
|
|
46
|
+
},
|
|
47
|
+
mode: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: "large" // small middle
|
|
50
|
+
},
|
|
51
|
+
showLoadingText: Boolean
|
|
41
52
|
},
|
|
42
53
|
data () {
|
|
43
54
|
return {};
|
|
@@ -51,9 +62,27 @@
|
|
|
51
62
|
} else {
|
|
52
63
|
return undefined;
|
|
53
64
|
}
|
|
65
|
+
},
|
|
66
|
+
getStyle () {
|
|
67
|
+
let styleMap = {
|
|
68
|
+
large: {
|
|
69
|
+
width: "49px",
|
|
70
|
+
height: "49px"
|
|
71
|
+
},
|
|
72
|
+
middle: {
|
|
73
|
+
width: "35px",
|
|
74
|
+
height: "35px"
|
|
75
|
+
},
|
|
76
|
+
small: {
|
|
77
|
+
width: "16px",
|
|
78
|
+
height: "16px"
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
return styleMap[this.mode];
|
|
54
82
|
}
|
|
55
83
|
},
|
|
56
84
|
created () {},
|
|
57
|
-
methods: {
|
|
85
|
+
methods: {
|
|
86
|
+
}
|
|
58
87
|
};
|
|
59
88
|
</script>
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Drawer
|
|
3
|
+
class="BriDrawer"
|
|
4
|
+
v-model="showModal"
|
|
5
|
+
:title="selfPropsObj.title"
|
|
6
|
+
:width="selfPropsObj.width"
|
|
7
|
+
:height="selfPropsObj.height"
|
|
8
|
+
:closable="selfPropsObj.closable"
|
|
9
|
+
:mask-closable="selfPropsObj.maskClosable"
|
|
10
|
+
:mask="selfPropsObj.mask"
|
|
11
|
+
:mask-style="selfPropsObj.maskStyle"
|
|
12
|
+
:styles="selfPropsObj.styles"
|
|
13
|
+
:scrollable="selfPropsObj.scrollable"
|
|
14
|
+
:placement="selfPropsObj.placement"
|
|
15
|
+
:transfer="selfPropsObj.transfer"
|
|
16
|
+
:class-name="selfPropsObj.className"
|
|
17
|
+
:inner="selfPropsObj.inner"
|
|
18
|
+
:draggable="selfPropsObj.draggable"
|
|
19
|
+
:before-close="selfPropsObj.beforeClose"
|
|
20
|
+
:lock-scroll="selfPropsObj.lockScroll"
|
|
21
|
+
@on-close="close"
|
|
22
|
+
@on-visible-change="visibleChange"
|
|
23
|
+
@on-resize-width="resizeChange"
|
|
24
|
+
>
|
|
25
|
+
<div
|
|
26
|
+
slot="header"
|
|
27
|
+
class="BriDrawer-header"
|
|
28
|
+
>
|
|
29
|
+
<slot name="header">
|
|
30
|
+
{{ selfPropsObj.title }}
|
|
31
|
+
</slot>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<!-- 删除按钮 -->
|
|
35
|
+
<Icon
|
|
36
|
+
v-if="selfPropsObj.closable"
|
|
37
|
+
slot="close"
|
|
38
|
+
class="BriDrawer-close"
|
|
39
|
+
type="md-close"
|
|
40
|
+
size="20"
|
|
41
|
+
@click.stop="clickClose"
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
<slot
|
|
45
|
+
slot="trigger"
|
|
46
|
+
name="trigger"
|
|
47
|
+
></slot>
|
|
48
|
+
|
|
49
|
+
<div class="BriDrawer-main">
|
|
50
|
+
<div class="BriDrawer-body">
|
|
51
|
+
<slot></slot>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div
|
|
55
|
+
v-if="selfPropsObj.footer"
|
|
56
|
+
class="BriDrawer-footer"
|
|
57
|
+
>
|
|
58
|
+
<slot name="footer">
|
|
59
|
+
<dsh-buttons
|
|
60
|
+
:list="list"
|
|
61
|
+
@click="$dshEmit($event)"
|
|
62
|
+
></dsh-buttons>
|
|
63
|
+
</slot>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</Drawer>
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<script>
|
|
70
|
+
export default {
|
|
71
|
+
name: "BriDrawer",
|
|
72
|
+
props: {
|
|
73
|
+
value: Boolean,
|
|
74
|
+
propsObj: {
|
|
75
|
+
type: Object,
|
|
76
|
+
default () {
|
|
77
|
+
return {};
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
list: {
|
|
81
|
+
type: Array,
|
|
82
|
+
default () {
|
|
83
|
+
return [];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
model: {
|
|
88
|
+
prop: "value",
|
|
89
|
+
event: "input"
|
|
90
|
+
},
|
|
91
|
+
data () {
|
|
92
|
+
return {};
|
|
93
|
+
},
|
|
94
|
+
computed: {
|
|
95
|
+
showModal: {
|
|
96
|
+
get () {
|
|
97
|
+
return this.value;
|
|
98
|
+
},
|
|
99
|
+
set (bool) {
|
|
100
|
+
this.input(bool);
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
selfPropsObj () {
|
|
104
|
+
return {
|
|
105
|
+
width: 320,
|
|
106
|
+
closable: true,
|
|
107
|
+
transfer: true,
|
|
108
|
+
footer: true,
|
|
109
|
+
...this.propsObj
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
created () {},
|
|
114
|
+
methods: {
|
|
115
|
+
input (bool) {
|
|
116
|
+
this.$emit("input", bool);
|
|
117
|
+
},
|
|
118
|
+
clickClose () {
|
|
119
|
+
this.showModal = false;
|
|
120
|
+
},
|
|
121
|
+
close (...parmas) {
|
|
122
|
+
this.$emit("on-close", ...parmas);
|
|
123
|
+
},
|
|
124
|
+
resizeChange (...parmas) {
|
|
125
|
+
this.$emit("on-resize-change", ...parmas);
|
|
126
|
+
},
|
|
127
|
+
visibleChange (bool = false) {
|
|
128
|
+
this.$emit("on-visible-change", bool);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
</script>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
:key="operationItem.type"
|
|
15
15
|
:style="operationItem.style"
|
|
16
16
|
:class="[
|
|
17
|
-
index ? 'dsh-margin-
|
|
17
|
+
index ? 'dsh-margin-left8' : undefined,
|
|
18
18
|
!operationItem.customIcon && !operationItem.icon ? 'DshButtons-item' : undefined,
|
|
19
19
|
itemClass,
|
|
20
20
|
]"
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
:key="operationItem.type"
|
|
60
60
|
:style="operationItem.style"
|
|
61
61
|
:class="[
|
|
62
|
-
index ? 'dsh-margin-
|
|
62
|
+
index ? 'dsh-margin-left8' : undefined,
|
|
63
63
|
!operationItem.customIcon && !operationItem.icon ? 'DshButtons-item' : undefined,
|
|
64
64
|
itemClass,
|
|
65
65
|
]"
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
:key="operationItem.type"
|
|
83
83
|
:style="operationItem.style"
|
|
84
84
|
:class="[
|
|
85
|
-
index ? 'dsh-margin-
|
|
85
|
+
index ? 'dsh-margin-left8' : undefined,
|
|
86
86
|
!operationItem.customIcon && !operationItem.icon ? 'DshButtons-item' : undefined,
|
|
87
87
|
itemClass,
|
|
88
88
|
...(Array.isArray(operationItem.class) ? operationItem.class : [operationItem.class])
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
:class="{
|
|
4
4
|
'dsh-control-define': true,
|
|
5
5
|
'dsh-control-define-multiplerow': selfPropsObj._multiplerow,
|
|
6
|
-
'dsh-control-define-disabled':
|
|
6
|
+
'dsh-control-define-disabled': $isDisabled(canEdit, propsObj),
|
|
7
|
+
'dsh-control-define-show': !canEdit
|
|
7
8
|
}"
|
|
8
9
|
@click="clickInput"
|
|
9
10
|
>
|
|
@@ -164,7 +164,6 @@
|
|
|
164
164
|
&-small {
|
|
165
165
|
.ivu-modal-wrap {
|
|
166
166
|
.ivu-modal {
|
|
167
|
-
padding: 20px;
|
|
168
167
|
margin: auto;
|
|
169
168
|
position: absolute;
|
|
170
169
|
top: 0px;
|
|
@@ -216,6 +215,31 @@
|
|
|
216
215
|
height: 400px !important;
|
|
217
216
|
max-height: 100%;
|
|
218
217
|
max-width: 100%;
|
|
218
|
+
.ivu-modal-content{
|
|
219
|
+
.DshModal-close {
|
|
220
|
+
top: 20px;
|
|
221
|
+
right: 24px;
|
|
222
|
+
color: rgba(0,0,0,0.6);
|
|
223
|
+
font-size: 16px!important;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.ivu-modal-header {
|
|
227
|
+
width: 100%;
|
|
228
|
+
height: 44px;
|
|
229
|
+
padding: 20px 24px 0px 24px;
|
|
230
|
+
border-bottom: none;
|
|
231
|
+
&-inner {
|
|
232
|
+
color: rgba(0,0,0,0.9);
|
|
233
|
+
font-size: 16px;
|
|
234
|
+
font-weight: 500;
|
|
235
|
+
line-height: 24px;
|
|
236
|
+
height: 24px;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
.ivu-modal-body {
|
|
240
|
+
padding: 16px 24px 20px;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
219
243
|
}
|
|
220
244
|
}
|
|
221
245
|
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
:class="[
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
{
|
|
5
|
+
'DshFormItem': true,
|
|
6
|
+
'DshFormItem-required': formItem._required && canEdit,
|
|
7
|
+
'DshFormItem-line': formItem._line,
|
|
8
|
+
},
|
|
8
9
|
formControlClass,
|
|
10
|
+
formItem.formControlClass
|
|
9
11
|
]"
|
|
10
12
|
:style="{
|
|
11
13
|
width: `calc(${(formItem._br ? (formItem._span || 24)/24 : 1) * 100}% - 12px)`,
|
|
12
14
|
height: formItem._br || (formItem._span || 24) === 24 ? undefined : `${height}px`,
|
|
13
15
|
minHeight: `${46}px`,
|
|
14
|
-
alignItems: formItem._labelAlignItems || 'center',
|
|
15
16
|
...rowStyle
|
|
16
17
|
}"
|
|
17
18
|
>
|
|
@@ -19,11 +20,9 @@
|
|
|
19
20
|
<div
|
|
20
21
|
v-if="!formItem._noLabel"
|
|
21
22
|
class="DshFormItem-label"
|
|
22
|
-
:style="
|
|
23
|
-
selfLabelStyle,
|
|
24
|
-
{ justifyContent: formItem._labelAlign }
|
|
25
|
-
]"
|
|
23
|
+
:style="labelStyle"
|
|
26
24
|
>
|
|
25
|
+
<!-- 左 -->
|
|
27
26
|
<span
|
|
28
27
|
class="DshFormItem-label-left"
|
|
29
28
|
:style="labelLeftStyle"
|
|
@@ -32,13 +31,23 @@
|
|
|
32
31
|
:content="formItem._name"
|
|
33
32
|
transfer
|
|
34
33
|
>
|
|
35
|
-
<span class="
|
|
34
|
+
<span :class="{
|
|
35
|
+
'DshFormItem-label-name': true,
|
|
36
|
+
'dsh-ellipsis': true,
|
|
37
|
+
'DshFormItem-label-name-edit': canEdit,
|
|
38
|
+
'DshFormItem-label-name-show': !canEdit
|
|
39
|
+
}">
|
|
36
40
|
<slot name="label">
|
|
37
41
|
{{ formItem._name }}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
|
|
43
|
+
<!-- 有更新标记-->
|
|
44
|
+
<span
|
|
45
|
+
v-if="changedFields.includes(formItem._key)"
|
|
46
|
+
class="DshFormItem-label-name-sign"
|
|
47
|
+
>!有更新</span>
|
|
41
48
|
</slot>
|
|
49
|
+
|
|
50
|
+
<!-- label后可自定义内容 -->
|
|
42
51
|
<dsh-render
|
|
43
52
|
v-if="formItem._tipsRender"
|
|
44
53
|
:render="tipsRender(formItem,formData)"
|
|
@@ -47,8 +56,9 @@
|
|
|
47
56
|
</Ctooltip>
|
|
48
57
|
</span>
|
|
49
58
|
|
|
59
|
+
<!-- 右 -->
|
|
50
60
|
<span
|
|
51
|
-
v-if="canEdit
|
|
61
|
+
v-if="canEdit"
|
|
52
62
|
class="DshFormItem-label-right"
|
|
53
63
|
>
|
|
54
64
|
<slot name="extra">
|
|
@@ -66,12 +76,7 @@
|
|
|
66
76
|
</div>
|
|
67
77
|
|
|
68
78
|
<!-- 控件 -->
|
|
69
|
-
<div
|
|
70
|
-
class="DshFormItem-control"
|
|
71
|
-
:style="{
|
|
72
|
-
justifyContent: formItem._controlAlign
|
|
73
|
-
}"
|
|
74
|
-
>
|
|
79
|
+
<div class="DshFormItem-control">
|
|
75
80
|
<!-- 控件位置放置的dom -->
|
|
76
81
|
<slot name="control"></slot>
|
|
77
82
|
|
|
@@ -100,9 +105,20 @@
|
|
|
100
105
|
|
|
101
106
|
export default {
|
|
102
107
|
name: "DshFormItem",
|
|
103
|
-
mixins: [
|
|
108
|
+
mixins: [
|
|
109
|
+
unitMixin
|
|
110
|
+
],
|
|
104
111
|
props: {
|
|
105
|
-
|
|
112
|
+
canEdit: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
default: true
|
|
115
|
+
},
|
|
116
|
+
changedFields: {
|
|
117
|
+
type: Array,
|
|
118
|
+
default () {
|
|
119
|
+
return [];
|
|
120
|
+
}
|
|
121
|
+
},
|
|
106
122
|
|
|
107
123
|
// 实际最精确值是74px(label:30px, control:32px, 上下padding各: 6px,因为ivu-form-item-content里line-height: 32px导致有问题,故先76px
|
|
108
124
|
height: {
|
|
@@ -121,29 +137,12 @@
|
|
|
121
137
|
return {};
|
|
122
138
|
}
|
|
123
139
|
},
|
|
124
|
-
|
|
125
|
-
labelWidth: [String, Number],
|
|
126
140
|
formControlClass: String
|
|
127
141
|
},
|
|
128
142
|
data () {
|
|
129
|
-
return {
|
|
130
|
-
showTipModal: false
|
|
131
|
-
};
|
|
132
|
-
},
|
|
133
|
-
computed: {
|
|
134
|
-
selfLabelStyle () {
|
|
135
|
-
return {
|
|
136
|
-
width: this.labelWidth + "px",
|
|
137
|
-
...this.labelStyle
|
|
138
|
-
// marginRight: "20px"
|
|
139
|
-
};
|
|
140
|
-
},
|
|
141
|
-
labelLeftStyle () {
|
|
142
|
-
return {
|
|
143
|
-
minWidth: this.labelWidth + "px"
|
|
144
|
-
};
|
|
145
|
-
}
|
|
143
|
+
return {};
|
|
146
144
|
},
|
|
145
|
+
computed: {},
|
|
147
146
|
created () {},
|
|
148
147
|
methods: {
|
|
149
148
|
// 校验方法 -供外部使用
|
|
@@ -16,15 +16,14 @@
|
|
|
16
16
|
<template v-else>
|
|
17
17
|
<component
|
|
18
18
|
:is="componentNameMap[formItem._type]"
|
|
19
|
-
:canEdit="canEdit"
|
|
20
19
|
:isUnit="isUnit"
|
|
21
|
-
:parentData="parentData"
|
|
22
20
|
:value="formData"
|
|
23
21
|
:propsObj="{
|
|
24
22
|
...formItem,
|
|
25
23
|
size: 'default',
|
|
26
24
|
inTable: true
|
|
27
25
|
}"
|
|
26
|
+
:parentData="parentData"
|
|
28
27
|
@blur="blur"
|
|
29
28
|
@change="change"
|
|
30
29
|
></component>
|
|
@@ -37,11 +36,22 @@
|
|
|
37
36
|
|
|
38
37
|
export default {
|
|
39
38
|
name: "DshUnit",
|
|
40
|
-
mixins: [
|
|
39
|
+
mixins: [
|
|
40
|
+
unitMixin
|
|
41
|
+
],
|
|
41
42
|
props: {
|
|
43
|
+
isUnit: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: true
|
|
46
|
+
},
|
|
42
47
|
indexStr: String,
|
|
43
48
|
rowIndex: Number,
|
|
44
|
-
parentData:
|
|
49
|
+
parentData: {
|
|
50
|
+
type: Array,
|
|
51
|
+
default () {
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
}
|
|
45
55
|
},
|
|
46
56
|
data () {
|
|
47
57
|
return {};
|
|
@@ -52,16 +62,13 @@
|
|
|
52
62
|
};
|
|
53
63
|
</script>
|
|
54
64
|
|
|
55
|
-
<style lang="less" scoped>
|
|
56
|
-
.DshUnit {}
|
|
57
|
-
</style>
|
|
58
65
|
<style lang="less">
|
|
59
66
|
.DshUnit {
|
|
60
67
|
.ivu-input {
|
|
61
68
|
font-size: 12px;
|
|
62
69
|
}
|
|
63
70
|
|
|
64
|
-
.DshLabels-searchResult{
|
|
71
|
+
.DshLabels-searchResult {
|
|
65
72
|
position:absolute;
|
|
66
73
|
top: 32px !important;
|
|
67
74
|
left:0;
|
|
@@ -3,10 +3,6 @@ import { componentNameMap, registerComponents } from "../controls/controlMap.js"
|
|
|
3
3
|
export default {
|
|
4
4
|
components: registerComponents(),
|
|
5
5
|
props: {
|
|
6
|
-
canEdit: {
|
|
7
|
-
type: Boolean,
|
|
8
|
-
default: true
|
|
9
|
-
},
|
|
10
6
|
formData: Object,
|
|
11
7
|
formItem: {
|
|
12
8
|
type: Object,
|
|
@@ -19,10 +15,6 @@ export default {
|
|
|
19
15
|
default () {
|
|
20
16
|
return [];
|
|
21
17
|
}
|
|
22
|
-
},
|
|
23
|
-
isUnit: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
default: false
|
|
26
18
|
}
|
|
27
19
|
},
|
|
28
20
|
data () {
|
package/src/index.js
CHANGED
|
@@ -8,8 +8,8 @@ import { VeTable, VeLocale } from "vue-easytable";
|
|
|
8
8
|
import CN from "vue-easytable/libs/locale/lang/zh-CN.js";
|
|
9
9
|
|
|
10
10
|
// list
|
|
11
|
-
import { VTable } from "./components/list/easyTable/index.js";
|
|
12
|
-
import EvTable from "./components/list/evTable/EvTable.vue"; // 大表格
|
|
11
|
+
// import { VTable } from "./components/list/easyTable/index.js";
|
|
12
|
+
// import EvTable from "./components/list/evTable/EvTable.vue"; // 大表格
|
|
13
13
|
import DshBox from "./components/list/DshBox/DshBox.vue";
|
|
14
14
|
import DshTable from "./components/list/DshBox/DshTable.vue";
|
|
15
15
|
import DshList from "./components/list/DshBox/DshList.vue";
|
|
@@ -52,6 +52,7 @@ import BriTransfer from "./components/other/BriTransfer.vue";
|
|
|
52
52
|
|
|
53
53
|
// small
|
|
54
54
|
import DshModal from "./components/small/DshModal.vue";
|
|
55
|
+
import BriDrawer from "./components/small/BriDrawer.vue";
|
|
55
56
|
import DshDropdown from "./components/small/DshDropdown.vue";
|
|
56
57
|
import DshRender from "./components/small/render.js";
|
|
57
58
|
import DshTdRender from "./components/small/DshTdRender.js";
|
|
@@ -104,8 +105,8 @@ const map = {
|
|
|
104
105
|
DshDraggable,
|
|
105
106
|
DshCropper,
|
|
106
107
|
|
|
107
|
-
VTable,
|
|
108
|
-
EvTable,
|
|
108
|
+
// VTable,
|
|
109
|
+
// EvTable,
|
|
109
110
|
DshBox,
|
|
110
111
|
DshTable,
|
|
111
112
|
DshList,
|
|
@@ -142,6 +143,7 @@ const map = {
|
|
|
142
143
|
BriTransfer,
|
|
143
144
|
|
|
144
145
|
DshModal,
|
|
146
|
+
BriDrawer,
|
|
145
147
|
DshDropdown,
|
|
146
148
|
DshRender,
|
|
147
149
|
DshTdRender,
|
|
@@ -232,6 +234,7 @@ export {
|
|
|
232
234
|
BriTransfer,
|
|
233
235
|
|
|
234
236
|
DshModal,
|
|
237
|
+
BriDrawer,
|
|
235
238
|
DshDropdown,
|
|
236
239
|
DshRender,
|
|
237
240
|
DshTdRender,
|