bri-components 1.2.60 → 1.2.62
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 +2 -2
- package/src/components/controls/DshControlInput.vue +6 -0
- package/src/components/controls/base/BriUpload/BriUpload.vue +1 -1
- package/src/components/controls/base/DshCascader/DshCascader.vue +26 -16
- package/src/components/controls/base/DshEditor.vue +5 -5
- package/src/components/controls/base/DshSelect/DshCheckbox.vue +21 -7
- package/src/components/controls/base/DshSelect/DshSelect.vue +20 -59
- package/src/components/controls/base/DshSwitch/DshSwitch.vue +43 -10
- package/src/components/controls/control.less +14 -3
- package/src/components/controls/mixins/cascaderMixin.js +12 -1
- package/src/components/controls/mixins/controlMixin.js +15 -1
- package/src/components/controls/mixins/selectMixin.js +7 -10
- package/src/components/controls/{base/DshSwitch → mixins}/switchMixin.js +12 -8
- package/src/components/list/DshBox/DshCrossTable.vue +17 -13
- package/src/components/small/BriTooltip.vue +1 -0
- package/src/components/small/DshModal.vue +1 -1
- package/src/components/small/DshTags.vue +39 -20
- package/src/components/unit/DshFormUnit.vue +113 -6
- package/src/styles/components/index.less +0 -1
- package/src/styles/components/list/DshBox/DshCrossTable.less +0 -5
- package/src/styles/reset-iview-other.less +16 -0
- package/src/styles/components/small/DshTags.less +0 -36
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bri-components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.62",
|
|
4
4
|
"author": "dengshanghui",
|
|
5
5
|
"description": "a component lib for vue project",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"ali-oss": "^6.13.1",
|
|
34
34
|
"axios": "^0.23.0",
|
|
35
|
-
"bri-datas": "^1.0.
|
|
35
|
+
"bri-datas": "^1.0.49",
|
|
36
36
|
"jshint": "^2.12.0",
|
|
37
37
|
"jsonlint": "^1.6.3",
|
|
38
38
|
"minio": "7.1.0",
|
|
@@ -81,26 +81,38 @@
|
|
|
81
81
|
class="DshCascaders-show"
|
|
82
82
|
>
|
|
83
83
|
<!-- 有值 -->
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
:content="showMulVal"
|
|
87
|
-
:transfer="true"
|
|
88
|
-
>
|
|
84
|
+
<template v-if="!$isEmptyData(curValList)">
|
|
85
|
+
<!-- 详情查看页 且单独充满行的 -->
|
|
89
86
|
<dsh-tags
|
|
87
|
+
v-if="isDetailShow && isHeightAuto"
|
|
90
88
|
:class="{
|
|
91
89
|
...commonClass,
|
|
92
|
-
'DshCascaders-show-
|
|
90
|
+
'DshCascaders-show-auto': true
|
|
93
91
|
}"
|
|
94
|
-
:list="
|
|
92
|
+
:list="curValObjList"
|
|
93
|
+
itemClass="DshCascaders-show-auto-tag"
|
|
95
94
|
></dsh-tags>
|
|
96
|
-
|
|
95
|
+
|
|
96
|
+
<bri-tooltip
|
|
97
|
+
v-else
|
|
98
|
+
:content="showMulVal"
|
|
99
|
+
:transfer="true"
|
|
100
|
+
>
|
|
101
|
+
<dsh-tags
|
|
102
|
+
:class="{
|
|
103
|
+
...commonClass,
|
|
104
|
+
'DshCascaders-show-ellipsis': true
|
|
105
|
+
}"
|
|
106
|
+
:list="curValObjList"
|
|
107
|
+
itemClass="DshCascaders-show-ellipsis-tag"
|
|
108
|
+
></dsh-tags>
|
|
109
|
+
</bri-tooltip>
|
|
110
|
+
</template>
|
|
97
111
|
|
|
98
112
|
<!-- 无值 -->
|
|
99
113
|
<div
|
|
100
114
|
v-else
|
|
101
|
-
:class="
|
|
102
|
-
...commonClass
|
|
103
|
-
}"
|
|
115
|
+
:class="commonClass"
|
|
104
116
|
>
|
|
105
117
|
{{ emptyShowVal }}
|
|
106
118
|
</div>
|
|
@@ -161,6 +173,8 @@
|
|
|
161
173
|
</script>
|
|
162
174
|
|
|
163
175
|
<style lang="less">
|
|
176
|
+
@import url("../../control.less");
|
|
177
|
+
|
|
164
178
|
.DshCascader {
|
|
165
179
|
&-show {
|
|
166
180
|
&-ellipsis {
|
|
@@ -171,10 +185,6 @@
|
|
|
171
185
|
|
|
172
186
|
// 多选
|
|
173
187
|
.DshCascaders {
|
|
174
|
-
|
|
175
|
-
&-ellipsis {
|
|
176
|
-
.dsh-ellipsis();
|
|
177
|
-
}
|
|
178
|
-
}
|
|
188
|
+
#control-select(cascader);
|
|
179
189
|
}
|
|
180
190
|
</style>
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
...commonClass,
|
|
8
8
|
'DshEditor-edit': true
|
|
9
9
|
}"
|
|
10
|
-
v-show="
|
|
10
|
+
v-show="showStatus === 'show'"
|
|
11
11
|
v-html="showVal"
|
|
12
12
|
@click="handleEdit"
|
|
13
13
|
></div>
|
|
14
14
|
|
|
15
15
|
<div
|
|
16
16
|
v-if="finalCanEdit"
|
|
17
|
-
v-show="
|
|
17
|
+
v-show="showStatus === 'edit'"
|
|
18
18
|
class="DshEditor-wrap"
|
|
19
19
|
>
|
|
20
20
|
<div
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
data () {
|
|
77
77
|
return {
|
|
78
78
|
editor: null,
|
|
79
|
-
|
|
79
|
+
showStatus: "show",
|
|
80
80
|
operationMap: {
|
|
81
81
|
canSave: {
|
|
82
82
|
name: "完成",
|
|
@@ -167,11 +167,11 @@
|
|
|
167
167
|
handleEdit () {
|
|
168
168
|
if (this.finalCanEdit) {
|
|
169
169
|
this.editor.txt.html(this.value[this.propsObj._key]);
|
|
170
|
-
this.
|
|
170
|
+
this.showStatus = "edit";
|
|
171
171
|
}
|
|
172
172
|
},
|
|
173
173
|
clickSave () {
|
|
174
|
-
this.
|
|
174
|
+
this.showStatus = "show";
|
|
175
175
|
},
|
|
176
176
|
// 插入代码
|
|
177
177
|
insertHTML (value) {
|
|
@@ -74,19 +74,33 @@
|
|
|
74
74
|
class="DshCheckbox-show"
|
|
75
75
|
>
|
|
76
76
|
<!-- 有值 -->
|
|
77
|
-
<
|
|
78
|
-
|
|
79
|
-
:content="showMulVal"
|
|
80
|
-
:transfer="true"
|
|
81
|
-
>
|
|
77
|
+
<template v-if="!$isEmptyData(curValList)">
|
|
78
|
+
<!-- 详情查看页 且单独充满行的 -->
|
|
82
79
|
<dsh-tags
|
|
80
|
+
v-if="isDetailShow && isHeightAuto"
|
|
83
81
|
:class="{
|
|
84
82
|
...commonClass,
|
|
85
|
-
'DshCheckbox-show-
|
|
83
|
+
'DshCheckbox-show-auto': true
|
|
86
84
|
}"
|
|
87
85
|
:list="curValObjList"
|
|
86
|
+
itemClass="DshCheckbox-show-auto-tag"
|
|
88
87
|
></dsh-tags>
|
|
89
|
-
|
|
88
|
+
|
|
89
|
+
<bri-tooltip
|
|
90
|
+
v-else
|
|
91
|
+
:content="showMulVal"
|
|
92
|
+
:transfer="true"
|
|
93
|
+
>
|
|
94
|
+
<dsh-tags
|
|
95
|
+
:class="{
|
|
96
|
+
...commonClass,
|
|
97
|
+
'DshCheckbox-show-ellipsis': true
|
|
98
|
+
}"
|
|
99
|
+
:list="curValObjList"
|
|
100
|
+
itemClass="DshCheckbox-show-tag"
|
|
101
|
+
></dsh-tags>
|
|
102
|
+
</bri-tooltip>
|
|
103
|
+
</template>
|
|
90
104
|
|
|
91
105
|
<!-- 无值 -->
|
|
92
106
|
<div
|
|
@@ -84,19 +84,32 @@
|
|
|
84
84
|
class="DshSelect-show"
|
|
85
85
|
>
|
|
86
86
|
<!-- 有值 -->
|
|
87
|
-
<
|
|
88
|
-
v-if="!$isEmptyData(curVal)"
|
|
89
|
-
:content="showVal"
|
|
90
|
-
:transfer="true"
|
|
91
|
-
>
|
|
87
|
+
<template v-if="!$isEmptyData(curVal)">
|
|
92
88
|
<dsh-tags
|
|
89
|
+
v-if="isDetailShow && isHeightAuto"
|
|
93
90
|
:class="{
|
|
94
91
|
...commonClass,
|
|
95
|
-
'DshSelect-show-
|
|
92
|
+
'DshSelect-show-auto': true
|
|
96
93
|
}"
|
|
97
94
|
:list="[curValObj]"
|
|
95
|
+
itemClass="DshSelect-show-auto-tag"
|
|
98
96
|
></dsh-tags>
|
|
99
|
-
|
|
97
|
+
|
|
98
|
+
<bri-tooltip
|
|
99
|
+
v-else
|
|
100
|
+
:content="showVal"
|
|
101
|
+
:transfer="true"
|
|
102
|
+
>
|
|
103
|
+
<dsh-tags
|
|
104
|
+
:class="{
|
|
105
|
+
...commonClass,
|
|
106
|
+
'DshSelect-show-ellipsis': true
|
|
107
|
+
}"
|
|
108
|
+
:list="[curValObj]"
|
|
109
|
+
itemClass="DshSelect-show-ellipsis-tag"
|
|
110
|
+
></dsh-tags>
|
|
111
|
+
</bri-tooltip>
|
|
112
|
+
</template>
|
|
100
113
|
|
|
101
114
|
<!-- 无值 -->
|
|
102
115
|
<div
|
|
@@ -155,57 +168,5 @@
|
|
|
155
168
|
|
|
156
169
|
.DshSelect {
|
|
157
170
|
#control-select(radio);
|
|
158
|
-
|
|
159
|
-
&-modal {
|
|
160
|
-
.ivu-modal-wrap {
|
|
161
|
-
display: flex;
|
|
162
|
-
align-items: center;
|
|
163
|
-
justify-content: center;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.ivu-modal {
|
|
167
|
-
width: 544px !important;
|
|
168
|
-
position: static;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.ivu-modal-content {
|
|
172
|
-
border-radius: 8px;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.ivu-modal-header {
|
|
176
|
-
border-bottom: none;
|
|
177
|
-
padding: 32px 32px 0;
|
|
178
|
-
|
|
179
|
-
.ivu-modal-header-inner {
|
|
180
|
-
font-size: 18px;
|
|
181
|
-
font-family: Microsoft YaHei-Semibold, Microsoft YaHei;
|
|
182
|
-
font-weight: 600;
|
|
183
|
-
color: #252F36;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.DshModal-close {
|
|
188
|
-
right: 30px !important;
|
|
189
|
-
top: 30px !important;
|
|
190
|
-
background: #F4F6F8;
|
|
191
|
-
border-radius: 4px 4px 4px 4px;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.ivu-modal-body {
|
|
195
|
-
padding: 24px 32px 32px;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
&-footer {
|
|
199
|
-
margin-top: 24px;
|
|
200
|
-
text-align: right;
|
|
201
|
-
|
|
202
|
-
.ivu-btn {
|
|
203
|
-
font-size: 16px;
|
|
204
|
-
font-family: Microsoft YaHei-Semibold, Microsoft YaHei;
|
|
205
|
-
font-weight: 600;
|
|
206
|
-
border-radius: 4px;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
171
|
}
|
|
211
172
|
</style>
|
|
@@ -25,15 +25,46 @@
|
|
|
25
25
|
</div>
|
|
26
26
|
|
|
27
27
|
<!-- 单选模式 查看 -->
|
|
28
|
-
<
|
|
28
|
+
<div
|
|
29
29
|
v-else-if="!multipleMode && !canEdit"
|
|
30
|
-
|
|
31
|
-
...commonClass
|
|
32
|
-
}"
|
|
33
|
-
:style="showStyle"
|
|
30
|
+
class="DshSwitch-show"
|
|
34
31
|
>
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
<!-- 有值 -->
|
|
33
|
+
<template v-if="!$isEmptyData(curVal)">
|
|
34
|
+
<dsh-tags
|
|
35
|
+
v-if="isDetailShow && isHeightAuto"
|
|
36
|
+
:class="{
|
|
37
|
+
...commonClass,
|
|
38
|
+
'DshSwitch-show-auto': true
|
|
39
|
+
}"
|
|
40
|
+
:list="[curValObj]"
|
|
41
|
+
itemClass="DshSwitch-show-auto-tag"
|
|
42
|
+
></dsh-tags>
|
|
43
|
+
|
|
44
|
+
<bri-tooltip
|
|
45
|
+
v-else
|
|
46
|
+
:content="showVal"
|
|
47
|
+
:transfer="true"
|
|
48
|
+
>
|
|
49
|
+
<dsh-tags
|
|
50
|
+
:class="{
|
|
51
|
+
...commonClass,
|
|
52
|
+
'DshSwitch-show-ellipsis': true
|
|
53
|
+
}"
|
|
54
|
+
:list="[curValObj]"
|
|
55
|
+
itemClass="DshSwitch-show-ellipsis-tag"
|
|
56
|
+
></dsh-tags>
|
|
57
|
+
</bri-tooltip>
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<!-- 无值 -->
|
|
61
|
+
<div
|
|
62
|
+
v-else
|
|
63
|
+
:class="commonClass"
|
|
64
|
+
>
|
|
65
|
+
{{ emptyShowVal }}
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
37
68
|
|
|
38
69
|
<!-- 多选模式 -->
|
|
39
70
|
<dsh-checkbox
|
|
@@ -46,7 +77,7 @@
|
|
|
46
77
|
</template>
|
|
47
78
|
|
|
48
79
|
<script>
|
|
49
|
-
import switchMixin from "
|
|
80
|
+
import switchMixin from "../../mixins/switchMixin.js";
|
|
50
81
|
|
|
51
82
|
export default {
|
|
52
83
|
name: "DshSwitch",
|
|
@@ -63,7 +94,7 @@
|
|
|
63
94
|
return {
|
|
64
95
|
_size: "default", // "default", "small", "large"
|
|
65
96
|
|
|
66
|
-
...this.
|
|
97
|
+
...this.basePropsObj
|
|
67
98
|
};
|
|
68
99
|
}
|
|
69
100
|
},
|
|
@@ -73,7 +104,9 @@
|
|
|
73
104
|
</script>
|
|
74
105
|
|
|
75
106
|
<style lang="less">
|
|
76
|
-
.
|
|
107
|
+
@import url("../../control.less");
|
|
77
108
|
|
|
109
|
+
.DshSwitch {
|
|
110
|
+
#control-select(switch);
|
|
78
111
|
}
|
|
79
112
|
</style>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#control-select(@control-type) {
|
|
1
|
+
#control-select (@control-type) {
|
|
2
2
|
&-flat {
|
|
3
3
|
width: 100%;
|
|
4
4
|
|
|
@@ -152,7 +152,6 @@
|
|
|
152
152
|
&.ivu-select-multiple {
|
|
153
153
|
.ivu-select-selection {
|
|
154
154
|
height: 32px;
|
|
155
|
-
.dsh-flex-row-between-center();
|
|
156
155
|
|
|
157
156
|
& > div {
|
|
158
157
|
.bri-scrollbar3();
|
|
@@ -161,7 +160,8 @@
|
|
|
161
160
|
word-break: keep-all;
|
|
162
161
|
white-space: nowrap;
|
|
163
162
|
overflow: auto;
|
|
164
|
-
|
|
163
|
+
overflow-y: hidden;
|
|
164
|
+
|
|
165
165
|
.ivu-tag {
|
|
166
166
|
margin: 2px 4px 0px 0px;
|
|
167
167
|
background-color: @borderColor;
|
|
@@ -187,8 +187,19 @@
|
|
|
187
187
|
|
|
188
188
|
// 查看
|
|
189
189
|
&-show {
|
|
190
|
+
&-auto {
|
|
191
|
+
&-tag {
|
|
192
|
+
height: auto!important;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
190
196
|
&-ellipsis {
|
|
197
|
+
margin: 2px 0px;
|
|
191
198
|
.dsh-ellipsis();
|
|
199
|
+
|
|
200
|
+
&-tag {
|
|
201
|
+
.dsh-ellipsis();
|
|
202
|
+
}
|
|
192
203
|
}
|
|
193
204
|
}
|
|
194
205
|
}
|
|
@@ -114,13 +114,24 @@ export default {
|
|
|
114
114
|
? this.emptyShowVal
|
|
115
115
|
: this.curValName;
|
|
116
116
|
},
|
|
117
|
+
curValObjList () {
|
|
118
|
+
return this.curValNameList.map((item, index) => {
|
|
119
|
+
return {
|
|
120
|
+
_key: index,
|
|
121
|
+
name: item,
|
|
122
|
+
style: {
|
|
123
|
+
...this.tagStyle
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
});
|
|
127
|
+
},
|
|
117
128
|
curValNameList () {
|
|
118
129
|
return this.curValList.map(item => this.transformFullName(item));
|
|
119
130
|
},
|
|
120
131
|
showMulVal () {
|
|
121
132
|
return this.$isEmptyData(this.curValList)
|
|
122
133
|
? this.emptyShowVal
|
|
123
|
-
: this.curValNameList.join("
|
|
134
|
+
: this.curValNameList.join("、");
|
|
124
135
|
}
|
|
125
136
|
},
|
|
126
137
|
created () { },
|
|
@@ -36,7 +36,21 @@ export default {
|
|
|
36
36
|
},
|
|
37
37
|
data () {
|
|
38
38
|
return {
|
|
39
|
-
showModal: false
|
|
39
|
+
showModal: false,
|
|
40
|
+
|
|
41
|
+
tagStyle: {
|
|
42
|
+
display: "inline-block",
|
|
43
|
+
"max-width": "100%",
|
|
44
|
+
height: "24px",
|
|
45
|
+
padding: "4px 8px",
|
|
46
|
+
margin: "2px 4px 2px 0px",
|
|
47
|
+
"border-radius": "4px",
|
|
48
|
+
"line-height": "16px",
|
|
49
|
+
"font-size": "12px",
|
|
50
|
+
|
|
51
|
+
backgroundColor: "#E5E5E5",
|
|
52
|
+
color: "rgb(0, 0, 0, 0.9)"
|
|
53
|
+
}
|
|
40
54
|
};
|
|
41
55
|
},
|
|
42
56
|
computed: {
|
|
@@ -46,7 +46,7 @@ export default {
|
|
|
46
46
|
curValObj () {
|
|
47
47
|
return this.getItemObj(this.curVal);
|
|
48
48
|
},
|
|
49
|
-
|
|
49
|
+
curValName: {
|
|
50
50
|
get () {
|
|
51
51
|
return this.curValObj
|
|
52
52
|
? this.curValObj.name || this.curValObj._name
|
|
@@ -61,19 +61,19 @@ export default {
|
|
|
61
61
|
showVal () {
|
|
62
62
|
return this.$isEmptyData(this.curVal)
|
|
63
63
|
? this.emptyShowVal
|
|
64
|
-
: this.
|
|
64
|
+
: this.curValName;
|
|
65
65
|
},
|
|
66
66
|
// 已选择项的对象列表
|
|
67
67
|
curValObjList () {
|
|
68
68
|
return this.curValList.map(key => this.getItemObj(key));
|
|
69
69
|
},
|
|
70
|
-
|
|
71
|
-
return this.curValObjList.map(item => item.name || item._name)
|
|
70
|
+
curValNameList () {
|
|
71
|
+
return this.curValObjList.map(item => item.name || item._name);
|
|
72
72
|
},
|
|
73
73
|
showMulVal () {
|
|
74
74
|
return this.$isEmptyData(this.curValList)
|
|
75
75
|
? this.emptyShowVal
|
|
76
|
-
: this.
|
|
76
|
+
: this.curValNameList.join("、");
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
created () {
|
|
@@ -136,11 +136,8 @@ export default {
|
|
|
136
136
|
// 每项的具体样式 -查看状态时用
|
|
137
137
|
getItemShowStyle (item) {
|
|
138
138
|
return {
|
|
139
|
-
...this.
|
|
140
|
-
|
|
141
|
-
"max-width": "100%",
|
|
142
|
-
padding: "0px 6px",
|
|
143
|
-
"border-radius": "4px"
|
|
139
|
+
...this.tagStyle,
|
|
140
|
+
...this.getItemColorStyle(item)
|
|
144
141
|
};
|
|
145
142
|
},
|
|
146
143
|
// 获取单选项的置灰状态
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import controlMixin from "
|
|
2
|
-
import DshCheckbox from "../DshSelect/DshCheckbox.vue";
|
|
1
|
+
import controlMixin from "./controlMixin.js";
|
|
2
|
+
import DshCheckbox from "../base/DshSelect/DshCheckbox.vue";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
mixins: [
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
return {};
|
|
14
14
|
},
|
|
15
15
|
computed: {
|
|
16
|
-
|
|
16
|
+
basePropsObj () {
|
|
17
17
|
return {
|
|
18
18
|
loading: false, // 是否为加载状态
|
|
19
19
|
_openColor: this.$appData.themeColor, // 打开时的背景色
|
|
@@ -50,16 +50,20 @@ export default {
|
|
|
50
50
|
showStyle () {
|
|
51
51
|
return !this.$isEmptyData(this.curVal)
|
|
52
52
|
? {
|
|
53
|
+
...this.tagStyle,
|
|
53
54
|
backgroundColor: this.curVal === true ? "#d3f3dc" : "#FDEDED",
|
|
54
|
-
color: this.curVal === true ? "#37C45E" : "#E83636"
|
|
55
|
-
display: "inline-block",
|
|
56
|
-
"max-width": "100%",
|
|
57
|
-
padding: "0px 6px",
|
|
58
|
-
"border-radius": "4px"
|
|
55
|
+
color: this.curVal === true ? "#37C45E" : "#E83636"
|
|
59
56
|
}
|
|
60
57
|
: {};
|
|
61
58
|
},
|
|
62
59
|
|
|
60
|
+
curValObj () {
|
|
61
|
+
return {
|
|
62
|
+
_key: "1",
|
|
63
|
+
name: this.showVal,
|
|
64
|
+
style: this.showStyle
|
|
65
|
+
};
|
|
66
|
+
},
|
|
63
67
|
showVal () {
|
|
64
68
|
return this.$isEmptyData(this.curVal)
|
|
65
69
|
? this.emptyShowVal
|
|
@@ -90,12 +90,15 @@
|
|
|
90
90
|
<td
|
|
91
91
|
class="DshCrossTable-col DshCrossTable-col-content"
|
|
92
92
|
:style="{
|
|
93
|
-
background: '#F7F9FD'
|
|
93
|
+
background: '#F7F9FD',
|
|
94
|
+
display: 'flex',
|
|
95
|
+
width: (propsObj.titleWidth ? propsObj.titleWidth : 160)+ 'px'
|
|
94
96
|
}"
|
|
95
97
|
>
|
|
96
98
|
<bri-tooltip
|
|
97
99
|
transfer
|
|
98
100
|
:content="colItem.title"
|
|
101
|
+
style="width: calc(100% - 16px)"
|
|
99
102
|
>
|
|
100
103
|
<div class="td-content dsh-ellipsis">
|
|
101
104
|
<slot
|
|
@@ -112,22 +115,23 @@
|
|
|
112
115
|
|
|
113
116
|
<template v-else>
|
|
114
117
|
{{ colItem.title }}
|
|
115
|
-
<Tooltip
|
|
116
|
-
v-if="colItem._comment"
|
|
117
|
-
:content="colItem._comment"
|
|
118
|
-
:transfer="true"
|
|
119
|
-
placement="top-start"
|
|
120
|
-
max-width="200"
|
|
121
|
-
>
|
|
122
|
-
<Icon
|
|
123
|
-
type="ios-help-circle-outline"
|
|
124
|
-
size="16"
|
|
125
|
-
/>
|
|
126
|
-
</Tooltip>
|
|
127
118
|
</template>
|
|
128
119
|
</slot>
|
|
129
120
|
</div>
|
|
130
121
|
</bri-tooltip>
|
|
122
|
+
<Tooltip
|
|
123
|
+
style="width:16px"
|
|
124
|
+
v-if="colItem._comment"
|
|
125
|
+
:content="colItem._comment"
|
|
126
|
+
:transfer="true"
|
|
127
|
+
placement="top-start"
|
|
128
|
+
max-width="200"
|
|
129
|
+
>
|
|
130
|
+
<Icon
|
|
131
|
+
type="ios-help-circle-outline"
|
|
132
|
+
size="16"
|
|
133
|
+
/>
|
|
134
|
+
</Tooltip>
|
|
131
135
|
</td>
|
|
132
136
|
</tr>
|
|
133
137
|
</table>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
ref="DshTags"
|
|
4
4
|
:class="{
|
|
5
5
|
'DshTags': true,
|
|
6
|
-
'DshTags-
|
|
6
|
+
'DshTags-auto': autoEllipsis
|
|
7
7
|
}"
|
|
8
8
|
>
|
|
9
9
|
<Tag
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
:key="tagIndex"
|
|
12
12
|
ref="tagItem"
|
|
13
13
|
:style="tagItem.style"
|
|
14
|
+
:class="itemClass || tagItem.class"
|
|
14
15
|
:disabled="getItemDisabled(tagItem)"
|
|
15
16
|
:name="tagIndex"
|
|
16
17
|
:type="propsObj.type"
|
|
@@ -51,8 +52,11 @@
|
|
|
51
52
|
placement="bottom"
|
|
52
53
|
popper-class="DshTags-poptip"
|
|
53
54
|
>
|
|
54
|
-
<dsh-icons :list="[
|
|
55
|
+
<dsh-icons :list="[{
|
|
56
|
+
customIcon: 'bico-gengduo'
|
|
57
|
+
}]" />
|
|
55
58
|
{{ subList.length }}项
|
|
59
|
+
|
|
56
60
|
<div slot="content">
|
|
57
61
|
<Tag
|
|
58
62
|
v-for="(tagItem, tagIndex) in subList"
|
|
@@ -100,6 +104,9 @@
|
|
|
100
104
|
return {};
|
|
101
105
|
}
|
|
102
106
|
},
|
|
107
|
+
itemClass: {
|
|
108
|
+
type: String
|
|
109
|
+
},
|
|
103
110
|
autoEllipsis: {
|
|
104
111
|
type: Boolean,
|
|
105
112
|
default: false
|
|
@@ -128,20 +135,13 @@
|
|
|
128
135
|
};
|
|
129
136
|
},
|
|
130
137
|
computed: {
|
|
131
|
-
moreOperation () {
|
|
132
|
-
return {
|
|
133
|
-
customIcon: "bico-gengduo"
|
|
134
|
-
};
|
|
135
|
-
},
|
|
136
138
|
computedList () {
|
|
137
139
|
return this.list.slice(0, this.maxTagCount);
|
|
138
140
|
},
|
|
139
141
|
subList () {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
return [];
|
|
144
|
-
}
|
|
142
|
+
return this.autoEllipsis && this.maxTagCount
|
|
143
|
+
? this.list.slice(this.maxTagCount)
|
|
144
|
+
: [];
|
|
145
145
|
}
|
|
146
146
|
},
|
|
147
147
|
created () {},
|
|
@@ -150,6 +150,14 @@
|
|
|
150
150
|
|
|
151
151
|
window.addEventListener("resize", this.callEliipsis, true);
|
|
152
152
|
},
|
|
153
|
+
destroyed () {
|
|
154
|
+
window.removeEventListener("resize", this.callEliipsis, true);
|
|
155
|
+
},
|
|
156
|
+
watch: {
|
|
157
|
+
list: function () {
|
|
158
|
+
this.callEliipsis();
|
|
159
|
+
}
|
|
160
|
+
},
|
|
153
161
|
methods: {
|
|
154
162
|
// 删除标签
|
|
155
163
|
deleteTag (event, item, index) {
|
|
@@ -194,14 +202,25 @@
|
|
|
194
202
|
}
|
|
195
203
|
}
|
|
196
204
|
}
|
|
197
|
-
},
|
|
198
|
-
watch: {
|
|
199
|
-
list: function () {
|
|
200
|
-
this.callEliipsis();
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
destroyed () {
|
|
204
|
-
window.removeEventListener("resize", this.callEliipsis, true);
|
|
205
205
|
}
|
|
206
206
|
};
|
|
207
207
|
</script>
|
|
208
|
+
|
|
209
|
+
<style lang="less">
|
|
210
|
+
.DshTags {
|
|
211
|
+
&-auto {
|
|
212
|
+
overflow: hidden;
|
|
213
|
+
width: 100%;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
&-poptip {
|
|
217
|
+
&-tag {
|
|
218
|
+
margin: 2px 0;
|
|
219
|
+
.dsh-flex-row-between-center();
|
|
220
|
+
}
|
|
221
|
+
.ivu-tag-text {
|
|
222
|
+
.dsh-ellipsis();
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
</style>
|
|
@@ -43,10 +43,7 @@
|
|
|
43
43
|
</slot>
|
|
44
44
|
|
|
45
45
|
<!-- label后可自定义内容 -->
|
|
46
|
-
<dsh-render
|
|
47
|
-
v-if="formItem._tipsRender"
|
|
48
|
-
:render="tipsRender(formItem, formData)"
|
|
49
|
-
></dsh-render>
|
|
46
|
+
<dsh-render :render="tipsRender(formItem, formData)"></dsh-render>
|
|
50
47
|
</span>
|
|
51
48
|
</bri-tooltip>
|
|
52
49
|
</span>
|
|
@@ -154,13 +151,95 @@
|
|
|
154
151
|
this.$emit("changeField", ...params);
|
|
155
152
|
},
|
|
156
153
|
tipsRender (formItem, formData) {
|
|
157
|
-
return formItem._tipsRender
|
|
154
|
+
return formItem._tipsRender
|
|
155
|
+
? formItem._tipsRender.call(this, formItem, formData)
|
|
156
|
+
: formItem._openTip
|
|
157
|
+
? (h) => {
|
|
158
|
+
return h("span", {}, [
|
|
159
|
+
h("Icon", {
|
|
160
|
+
props: {
|
|
161
|
+
type: "md-help-circle"
|
|
162
|
+
},
|
|
163
|
+
style: {
|
|
164
|
+
cursor: "pointer"
|
|
165
|
+
},
|
|
166
|
+
on: {
|
|
167
|
+
click: () => {
|
|
168
|
+
if (formItem._tipKind === "dynamic" && !formItem._tipContent) {
|
|
169
|
+
if (formItem._tipUrl) {
|
|
170
|
+
this.$https({
|
|
171
|
+
url: {
|
|
172
|
+
module: "customPage",
|
|
173
|
+
name: formItem._tipUrl
|
|
174
|
+
},
|
|
175
|
+
params: {
|
|
176
|
+
formData: formData,
|
|
177
|
+
propsObj: formItem
|
|
178
|
+
},
|
|
179
|
+
callback: res => {
|
|
180
|
+
this.showTipModal = true;
|
|
181
|
+
formItem._tipContent = res;
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
} else {
|
|
186
|
+
this.showTipModal = true;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}),
|
|
191
|
+
|
|
192
|
+
h("dsh-modal", {
|
|
193
|
+
props: {
|
|
194
|
+
value: this.showTipModal,
|
|
195
|
+
mode: "small",
|
|
196
|
+
propsObj: {
|
|
197
|
+
title: "温馨提示",
|
|
198
|
+
class: "DshFormUnit-modal",
|
|
199
|
+
showSlotClose: false,
|
|
200
|
+
maskClosable: true
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
on: {
|
|
204
|
+
input: bool => {
|
|
205
|
+
this.showTipModal = bool;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}, [
|
|
209
|
+
h("div", {
|
|
210
|
+
class: "wrap"
|
|
211
|
+
}, [
|
|
212
|
+
h("div", {
|
|
213
|
+
class: "wrap-content",
|
|
214
|
+
domProps: {
|
|
215
|
+
innerHTML: formItem._tipContent
|
|
216
|
+
}
|
|
217
|
+
}),
|
|
218
|
+
h("div", {
|
|
219
|
+
class: "wrap-btns"
|
|
220
|
+
}, [
|
|
221
|
+
h("Button", {
|
|
222
|
+
props: {
|
|
223
|
+
type: "primary"
|
|
224
|
+
},
|
|
225
|
+
on: {
|
|
226
|
+
click: () => {
|
|
227
|
+
this.showTipModal = false;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}, "我知道了")
|
|
231
|
+
])
|
|
232
|
+
])
|
|
233
|
+
])
|
|
234
|
+
]);
|
|
235
|
+
}
|
|
236
|
+
: undefined;
|
|
158
237
|
}
|
|
159
238
|
}
|
|
160
239
|
};
|
|
161
240
|
</script>
|
|
162
241
|
|
|
163
|
-
<style lang="less"
|
|
242
|
+
<style lang="less">
|
|
164
243
|
.DshFormUnit {
|
|
165
244
|
margin: 3px 6px; // 不可轻易改margin的左右值,上面style的width根据他calc
|
|
166
245
|
padding: 0px 10px 10px;
|
|
@@ -258,5 +337,33 @@
|
|
|
258
337
|
color: #E94829;
|
|
259
338
|
}
|
|
260
339
|
}
|
|
340
|
+
|
|
341
|
+
&-modal {
|
|
342
|
+
.wrap {
|
|
343
|
+
width: 100%;
|
|
344
|
+
height: 100%;
|
|
345
|
+
display: flex;
|
|
346
|
+
flex-direction: column;
|
|
347
|
+
|
|
348
|
+
&-content {
|
|
349
|
+
flex: 1;
|
|
350
|
+
min-height: 0px;
|
|
351
|
+
padding: 0px 12px;
|
|
352
|
+
overflow: auto;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
&-btns {
|
|
356
|
+
margin: 10px 0px;
|
|
357
|
+
text-align: right;
|
|
358
|
+
|
|
359
|
+
.ivu-btn {
|
|
360
|
+
font-size: 16px;
|
|
361
|
+
font-family: Microsoft YaHei-Semibold, Microsoft YaHei;
|
|
362
|
+
font-weight: 600;
|
|
363
|
+
border-radius: 4px;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
261
368
|
}
|
|
262
369
|
</style>
|
|
@@ -18,4 +18,20 @@
|
|
|
18
18
|
&-rel {
|
|
19
19
|
width: 100%;
|
|
20
20
|
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ivu-tag {
|
|
24
|
+
&-default {
|
|
25
|
+
border: none;
|
|
26
|
+
background-color: @borderColor;
|
|
27
|
+
color: @text-color;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ivu-tag-text {
|
|
31
|
+
color: inherit;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&[disabled] {
|
|
35
|
+
background-color: @border-disabled;
|
|
36
|
+
}
|
|
21
37
|
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
.DshTags {
|
|
2
|
-
&-autoEllipsis {
|
|
3
|
-
overflow: hidden;
|
|
4
|
-
width: 100%;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
&-poptip {
|
|
8
|
-
&-tag {
|
|
9
|
-
margin: 2px 0;
|
|
10
|
-
.dsh-flex-row-between-center();
|
|
11
|
-
}
|
|
12
|
-
.ivu-tag-text {
|
|
13
|
-
.dsh-ellipsis();
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.ivu-tag {
|
|
19
|
-
&-default {
|
|
20
|
-
border: none;
|
|
21
|
-
background-color: @borderColor;
|
|
22
|
-
color: @text-color;
|
|
23
|
-
}
|
|
24
|
-
&-size-medium {
|
|
25
|
-
height: 24px;
|
|
26
|
-
padding: 0 8px;
|
|
27
|
-
line-height: 26px;
|
|
28
|
-
}
|
|
29
|
-
&[disabled] {
|
|
30
|
-
background-color: @border-disabled;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.ivu-tag-text {
|
|
34
|
-
color: inherit;
|
|
35
|
-
}
|
|
36
|
-
}
|