bri-components 1.2.9 → 1.2.11
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/bri-components.min.js +7 -7
- package/package.json +1 -1
- package/src/components/controls/BriControlInput.vue +68 -4
- package/src/components/controls/base/BriUpload/BriUpload.vue +75 -192
- package/src/components/controls/base/BriUpload/BriUploadImage.vue +4 -3
- package/src/components/controls/base/BriUpload/uploadMixin.js +15 -21
- package/src/components/controls/base/DshCascader/DshCascader.vue +55 -97
- package/src/components/controls/base/DshCoordinates.vue +38 -57
- package/src/components/controls/base/DshInput.vue +1 -0
- package/src/components/controls/controlMixin.js +20 -15
- package/src/components/controls/senior/BriLabels.vue +9 -40
- package/src/components/controls/senior/selectDepartments.vue +11 -41
- package/src/components/controls/senior/selectUsers/selectUsers.vue +8 -38
- package/src/components/form/DshAdvSearchForm.vue +9 -9
- package/src/components/small/BriButton.vue +1 -1
- package/src/components/small/BriTooltip.vue +34 -41
- package/src/components/unit/DshUnit.vue +2 -1
- package/src/index.js +2 -0
- package/src/styles/common/control.less +4 -38
- package/src/styles/components/controls/BriControlInput.less +28 -1
- package/src/styles/components/controls/base/DshCascader/DshCascader.less +2 -3
- package/src/styles/components/controls/base/DshCoordinates.less +1 -5
- package/src/styles/components/controls/senior/BriLabels.less +1 -1
- package/src/styles/components/controls/senior/selectDepartments.less +1 -1
- package/src/styles/components/controls/senior/selectUsers/selectUsers.less +1 -1
- package/src/styles/components/index.less +2 -0
- package/src/styles/components/small/BriTooltip.less +2 -2
- package/src/styles/components/small/DshModal.less +1 -1
|
@@ -8,50 +8,22 @@
|
|
|
8
8
|
>
|
|
9
9
|
<div @click.stop="clickInput">
|
|
10
10
|
<slot>
|
|
11
|
-
<!--
|
|
12
|
-
<
|
|
11
|
+
<!-- 编辑 -->
|
|
12
|
+
<bri-control-input
|
|
13
13
|
v-if="canEdit"
|
|
14
14
|
:class="{
|
|
15
15
|
...commonClass,
|
|
16
16
|
'selectDepartments-edit': true
|
|
17
17
|
}"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
:list="curValList"
|
|
26
|
-
:propsObj="{
|
|
27
|
-
disabled: !finalCanEdit,
|
|
28
|
-
closable: true
|
|
29
|
-
}"
|
|
30
|
-
@delete="clickDeleteItem"
|
|
31
|
-
></dsh-tags>
|
|
32
|
-
</template>
|
|
33
|
-
<!-- 无值 -->
|
|
34
|
-
<template v-else>
|
|
35
|
-
{{ emptyShowVal }}
|
|
36
|
-
</template>
|
|
18
|
+
:canEdit="finalCanEdit"
|
|
19
|
+
:value="curValList"
|
|
20
|
+
:inputIcon="inputIcon"
|
|
21
|
+
:propsObj="selfPropsObj"
|
|
22
|
+
@deleteItem="clickDeleteItem"
|
|
23
|
+
@clear="clickClear"
|
|
24
|
+
></bri-control-input>
|
|
37
25
|
|
|
38
|
-
|
|
39
|
-
<template>
|
|
40
|
-
<Icon
|
|
41
|
-
v-if="!$isEmptyData(curValList) && selfPropsObj._clearable && isHover"
|
|
42
|
-
class="icon-close"
|
|
43
|
-
type="ios-close-circle"
|
|
44
|
-
@click.stop="clickClear"
|
|
45
|
-
/>
|
|
46
|
-
<Icon
|
|
47
|
-
v-else
|
|
48
|
-
class="icon-default"
|
|
49
|
-
:type="inputIcon"
|
|
50
|
-
/>
|
|
51
|
-
</template>
|
|
52
|
-
</div>
|
|
53
|
-
|
|
54
|
-
<!-- 查看模式 -->
|
|
26
|
+
<!-- 查看 -->
|
|
55
27
|
<div
|
|
56
28
|
v-else
|
|
57
29
|
:class="{
|
|
@@ -202,10 +174,8 @@
|
|
|
202
174
|
props: {},
|
|
203
175
|
data () {
|
|
204
176
|
return {
|
|
205
|
-
isHover: false,
|
|
206
|
-
|
|
207
|
-
newValList: [],
|
|
208
177
|
showModal: false,
|
|
178
|
+
newValList: [],
|
|
209
179
|
loading: false,
|
|
210
180
|
searchName: "", // 搜索名字
|
|
211
181
|
departmentList: [],
|
|
@@ -9,47 +9,19 @@
|
|
|
9
9
|
<div @click.stop="clickInput">
|
|
10
10
|
<slot>
|
|
11
11
|
<!-- 编辑 -->
|
|
12
|
-
<
|
|
12
|
+
<bri-control-input
|
|
13
13
|
v-if="canEdit"
|
|
14
14
|
:class="{
|
|
15
15
|
...commonClass,
|
|
16
16
|
'selectUsers-edit': true
|
|
17
17
|
}"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
:list="curValList"
|
|
26
|
-
:propsObj="{
|
|
27
|
-
disabled: !finalCanEdit,
|
|
28
|
-
closable: true
|
|
29
|
-
}"
|
|
30
|
-
@delete="clickDeleteItem"
|
|
31
|
-
></dsh-tags>
|
|
32
|
-
</template>
|
|
33
|
-
<!-- 无值 -->
|
|
34
|
-
<template v-else>
|
|
35
|
-
{{ emptyShowVal }}
|
|
36
|
-
</template>
|
|
37
|
-
|
|
38
|
-
<!-- 图标 -->
|
|
39
|
-
<template>
|
|
40
|
-
<Icon
|
|
41
|
-
v-if="!$isEmptyData(curValList) && selfPropsObj._clearable && isHover"
|
|
42
|
-
class="icon-close"
|
|
43
|
-
type="ios-close-circle"
|
|
44
|
-
@click.stop="clickClear"
|
|
45
|
-
/>
|
|
46
|
-
<Icon
|
|
47
|
-
v-else
|
|
48
|
-
class="icon-default"
|
|
49
|
-
:type="inputIcon"
|
|
50
|
-
/>
|
|
51
|
-
</template>
|
|
52
|
-
</div>
|
|
18
|
+
:canEdit="finalCanEdit"
|
|
19
|
+
:value="curValList"
|
|
20
|
+
:inputIcon="inputIcon"
|
|
21
|
+
:propsObj="selfPropsObj"
|
|
22
|
+
@clickDeleteItem="clickDeleteItem"
|
|
23
|
+
@clickClear="clickClear"
|
|
24
|
+
></bri-control-input>
|
|
53
25
|
|
|
54
26
|
<!-- 查看 -->
|
|
55
27
|
<div
|
|
@@ -219,8 +191,6 @@
|
|
|
219
191
|
props: {},
|
|
220
192
|
data () {
|
|
221
193
|
return {
|
|
222
|
-
isHover: false,
|
|
223
|
-
|
|
224
194
|
// 弹框
|
|
225
195
|
newValList: [],
|
|
226
196
|
showModal: false,
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<!-- 'and', 'or' 循环模式 -->
|
|
21
21
|
<div
|
|
22
22
|
v-if="['and', 'or'].includes(conditionItem.logic)"
|
|
23
|
-
:key="conditionItem._id"
|
|
23
|
+
:key="`${conditionItem._id}andor`"
|
|
24
24
|
class="DshAdvSearchForm-conditions-loop"
|
|
25
25
|
>
|
|
26
26
|
<dsh-advSearch-form
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
<!-- field 正常模式 -->
|
|
45
45
|
<dsh-formItem
|
|
46
46
|
v-else-if="['field', undefined].includes(conditionItem.logic)"
|
|
47
|
-
:key="conditionItem._id"
|
|
47
|
+
:key="`${conditionItem._id}field`"
|
|
48
48
|
class="DshAdvSearchForm-conditions-item"
|
|
49
49
|
:formData="conditionItem"
|
|
50
50
|
:formItem="conditionItem.formItem"
|
|
@@ -76,11 +76,11 @@
|
|
|
76
76
|
class="DshAdvSearchForm-conditions-item-control"
|
|
77
77
|
:value="conditionItem"
|
|
78
78
|
:propsObj="{
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
_name: `${conditionItem.formItem._name}的动态参数`,
|
|
80
|
+
_key: 'fieldParams',
|
|
81
|
+
_multiple: true,
|
|
82
|
+
_data: conditionItem.dynamicList
|
|
83
|
+
}"
|
|
84
84
|
@change="change(conditionItem, arguments)"
|
|
85
85
|
></dsh-select>
|
|
86
86
|
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
<!-- text 关键字的模式 -->
|
|
138
138
|
<div
|
|
139
139
|
v-else-if="['text'].includes(conditionItem.logic)"
|
|
140
|
-
:key="conditionItem._id"
|
|
140
|
+
:key="`${conditionItem._id}text`"
|
|
141
141
|
>
|
|
142
142
|
{{ conditionItem.logic }}模式暂未开发
|
|
143
143
|
</div>
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
<!-- native 以及以后可能增加的模式 -->
|
|
146
146
|
<div
|
|
147
147
|
v-else
|
|
148
|
-
:key="conditionItem._id"
|
|
148
|
+
:key="`${conditionItem._id}other`"
|
|
149
149
|
>
|
|
150
150
|
{{ conditionItem.logic }}模式是不用开发的
|
|
151
151
|
</div>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
:loading="selfPropsObj.loading"
|
|
9
9
|
:disabled="selfPropsObj.disabled"
|
|
10
10
|
:htmlType="selfPropsObj.htmlType"
|
|
11
|
-
:icon="selfPropsObj.icon || icon"
|
|
11
|
+
:icon="(selfPropsObj.customIcon || customIcon) ? undefined : (selfPropsObj.icon || icon)"
|
|
12
12
|
:customIcon="selfPropsObj.customIcon || customIcon"
|
|
13
13
|
:long="selfPropsObj.long"
|
|
14
14
|
:ghost="selfPropsObj.ghost"
|
|
@@ -2,18 +2,13 @@
|
|
|
2
2
|
<Tooltip
|
|
3
3
|
class="BriTooltip"
|
|
4
4
|
style="width: 100%;"
|
|
5
|
-
:disabled="disabled"
|
|
6
5
|
:content="content"
|
|
6
|
+
:disabled="toolTipDisabled"
|
|
7
7
|
:placement="placement"
|
|
8
|
-
:transfer="transfer"
|
|
9
8
|
:max-width="maxWidth"
|
|
9
|
+
:transfer="transfer"
|
|
10
10
|
>
|
|
11
|
-
<
|
|
12
|
-
ref="ellipsisContent"
|
|
13
|
-
class="ellipsisContent"
|
|
14
|
-
>
|
|
15
|
-
<slot></slot>
|
|
16
|
-
</div>
|
|
11
|
+
<slot></slot>
|
|
17
12
|
|
|
18
13
|
<slot
|
|
19
14
|
slot="content"
|
|
@@ -27,12 +22,6 @@
|
|
|
27
22
|
name: "BriTooltip",
|
|
28
23
|
props: {
|
|
29
24
|
content: String,
|
|
30
|
-
propsObj: {
|
|
31
|
-
type: Object,
|
|
32
|
-
default () {
|
|
33
|
-
return {};
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
25
|
placement: {
|
|
37
26
|
type: String,
|
|
38
27
|
default: "bottom"
|
|
@@ -44,44 +33,48 @@
|
|
|
44
33
|
transfer: {
|
|
45
34
|
type: Boolean,
|
|
46
35
|
default: false
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
defaultDisabled: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: true
|
|
47
41
|
}
|
|
48
42
|
},
|
|
49
43
|
data () {
|
|
50
44
|
return {
|
|
51
|
-
|
|
45
|
+
toolTipDisabled: true,
|
|
46
|
+
tmpToolTipDisabled: true
|
|
52
47
|
};
|
|
53
48
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
// 获取overflow:hidden元素的实际被撑开的宽度
|
|
58
|
-
let test = this.$refs.ellipsisContent;
|
|
59
|
-
if (test) {
|
|
60
|
-
let cp = test.cloneNode(true);
|
|
61
|
-
cp.style.cssText = "all: unset;position: absolute;opacity:0;";
|
|
62
|
-
test.parentElement.appendChild(cp);
|
|
63
|
-
let realWidth = cp.offsetWidth;
|
|
64
|
-
cp.remove();
|
|
65
|
-
this.disabled = realWidth <= test.offsetWidth;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
49
|
+
created () {
|
|
50
|
+
this.toolTipDisabled = this.defaultDisabled;
|
|
51
|
+
this.tmpToolTipDisabled = this.toolTipDisabled;
|
|
68
52
|
},
|
|
69
|
-
created () {},
|
|
70
53
|
mounted () {
|
|
71
|
-
this
|
|
72
|
-
this.computedDisable();
|
|
73
|
-
});
|
|
54
|
+
this.getToolTipDisabled("mouted");
|
|
74
55
|
},
|
|
75
56
|
updated () {
|
|
76
|
-
this
|
|
77
|
-
this.computedDisable();
|
|
78
|
-
});
|
|
57
|
+
this.getToolTipDisabled("updated");
|
|
79
58
|
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
this.$
|
|
83
|
-
|
|
84
|
-
|
|
59
|
+
methods: {
|
|
60
|
+
getToolTipDisabled (type) {
|
|
61
|
+
const isOverflow = this.$slots.default;
|
|
62
|
+
const toolTipDisabled = isOverflow[0]
|
|
63
|
+
? !(isOverflow[0].elm.scrollWidth > isOverflow[0].elm.clientWidth)
|
|
64
|
+
: this.toolTipDisabled;
|
|
65
|
+
|
|
66
|
+
if (toolTipDisabled !== this.toolTipDisabled) {
|
|
67
|
+
if (toolTipDisabled !== this.tmpToolTipDisabled) {
|
|
68
|
+
this.tmpToolTipDisabled = toolTipDisabled;
|
|
69
|
+
|
|
70
|
+
this.timer = setTimeout(() => {
|
|
71
|
+
this.toolTipDisabled = toolTipDisabled;
|
|
72
|
+
this.tmpToolTipDisabled = this.toolTipDisabled;
|
|
73
|
+
}, 2000);
|
|
74
|
+
}
|
|
75
|
+
} else {
|
|
76
|
+
clearTimeout(this.timer);
|
|
77
|
+
}
|
|
85
78
|
}
|
|
86
79
|
}
|
|
87
80
|
};
|
package/src/index.js
CHANGED
|
@@ -26,6 +26,7 @@ import DshFormItem from "./components/unit/DshFormItem.vue";
|
|
|
26
26
|
import DshUnit from "./components/unit/DshUnit.vue";
|
|
27
27
|
|
|
28
28
|
// controls
|
|
29
|
+
import BriControlInput from "./components/controls/BriControlInput.vue";
|
|
29
30
|
import DshInput from "./components/controls/base/DshInput.vue";
|
|
30
31
|
import DshNumber from "./components/controls/base/DshNumber/DshNumber.vue";
|
|
31
32
|
import DshSelect from "./components/controls/base/DshSelect.vue";
|
|
@@ -118,6 +119,7 @@ const map = {
|
|
|
118
119
|
DshUnit,
|
|
119
120
|
|
|
120
121
|
// controls
|
|
122
|
+
BriControlInput,
|
|
121
123
|
DshInput,
|
|
122
124
|
DshNumber,
|
|
123
125
|
DshSelect,
|
|
@@ -52,18 +52,16 @@
|
|
|
52
52
|
border: none;
|
|
53
53
|
background-color: transparent;
|
|
54
54
|
|
|
55
|
-
.
|
|
56
|
-
|
|
57
|
-
color: @placeholderColor;
|
|
55
|
+
.text {
|
|
56
|
+
.dsh-ellipsis();
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
.bri-control-unit {
|
|
61
60
|
border: none;
|
|
62
61
|
background-color: transparent;
|
|
63
62
|
|
|
64
|
-
.
|
|
65
|
-
|
|
66
|
-
color: @placeholderColor;
|
|
63
|
+
.text {
|
|
64
|
+
.dsh-ellipsis();
|
|
67
65
|
}
|
|
68
66
|
}
|
|
69
67
|
|
|
@@ -75,35 +73,3 @@
|
|
|
75
73
|
.bri-control-disabled-placeholder {
|
|
76
74
|
color: @textColor-disabled;
|
|
77
75
|
}
|
|
78
|
-
|
|
79
|
-
// 展示为tag标签公共样式
|
|
80
|
-
#bri-control-wrap () {
|
|
81
|
-
height: 32px;
|
|
82
|
-
padding: 4px 0 4px 7px;
|
|
83
|
-
line-height: 24px;
|
|
84
|
-
.dsh-flex-row-between-center();
|
|
85
|
-
|
|
86
|
-
.text {
|
|
87
|
-
.dsh-ellipsis();
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.overflow {
|
|
91
|
-
overflow: auto;
|
|
92
|
-
.bri-scrollbar3();
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.icon {
|
|
96
|
-
&-default {
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
&-close {
|
|
100
|
-
display: none;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&:hover {
|
|
105
|
-
.icon-close {
|
|
106
|
-
display: block;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
@@ -1,3 +1,30 @@
|
|
|
1
1
|
.BriControlInput {
|
|
2
|
-
|
|
2
|
+
height: 32px;
|
|
3
|
+
padding: 4px 0 4px 7px;
|
|
4
|
+
line-height: 24px;
|
|
5
|
+
.dsh-flex-row-between-center();
|
|
6
|
+
|
|
7
|
+
.text {
|
|
8
|
+
.dsh-ellipsis();
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.overflow {
|
|
12
|
+
overflow: auto;
|
|
13
|
+
.bri-scrollbar3();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.placeholder {
|
|
17
|
+
flex: 1;
|
|
18
|
+
min-width: 0px;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.icon {
|
|
23
|
+
&-default {
|
|
24
|
+
|
|
25
|
+
}
|
|
26
|
+
&-close {
|
|
27
|
+
|
|
28
|
+
}
|
|
29
|
+
}
|
|
3
30
|
}
|
|
@@ -7,14 +7,13 @@
|
|
|
7
7
|
width: 100%;
|
|
8
8
|
|
|
9
9
|
&-edit {
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
// 单选 -新模式
|
|
15
15
|
&-custom {
|
|
16
16
|
width: 100%;
|
|
17
|
-
#bri-control-wrap();
|
|
18
17
|
}
|
|
19
18
|
// 单选 -默认模式
|
|
20
19
|
&-single {
|
|
@@ -36,7 +35,7 @@
|
|
|
36
35
|
// 多选类型且独自一行时
|
|
37
36
|
&-row {
|
|
38
37
|
&-edit {
|
|
39
|
-
|
|
38
|
+
|
|
40
39
|
}
|
|
41
40
|
&-show {
|
|
42
41
|
height: auto;
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.ivu-tooltip-inner {
|
|
9
|
+
padding: 5px 8px;
|
|
9
10
|
border-radius: 4px;
|
|
10
11
|
background: rgba(0, 0, 0, 0.9);
|
|
11
|
-
color: rgba(255, 255, 255, 0.9);
|
|
12
12
|
font-size: 14px;
|
|
13
13
|
font-weight: 400;
|
|
14
|
-
|
|
14
|
+
color: rgba(255, 255, 255, 0.9);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.ivu-tooltip-rel {
|