bri-components 1.2.8 → 1.2.10
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/bri-components.min.js +7 -7
- package/package.json +1 -1
- package/src/components/controls/BriControlInput.vue +23 -0
- package/src/components/controls/base/BriInputs.vue +1 -0
- package/src/components/controls/base/DshCascader/DshCascader.vue +6 -1
- package/src/components/controls/base/DshCheckbox.vue +15 -1
- package/src/components/controls/base/DshCoordinates.vue +163 -147
- package/src/components/controls/base/DshInput.vue +1 -0
- package/src/components/controls/base/DshSelect.vue +21 -4
- package/src/components/controls/controlMixin.js +1 -0
- package/src/components/list/BriFlatTable.vue +9 -4
- package/src/components/list/DshBox/DshTable.vue +0 -1
- package/src/components/small/BriTooltip.vue +34 -41
- package/src/components/unit/DshUnit.vue +1 -0
- package/src/styles/components/controls/BriControlInput.less +3 -0
- package/src/styles/components/controls/base/DshCheckbox.less +1 -1
- package/src/styles/components/controls/base/DshCoordinates.less +38 -17
- package/src/styles/components/list/BriFlatTable.less +57 -1
- package/src/styles/components/list/BriTable.less +3 -0
- package/src/styles/components/small/BriTooltip.less +2 -2
|
@@ -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
|
};
|
|
@@ -2,32 +2,46 @@
|
|
|
2
2
|
width: 100%;
|
|
3
3
|
|
|
4
4
|
&-edit {
|
|
5
|
-
#bri-control-wrap
|
|
5
|
+
#bri-control-wrap();
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&-show {
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&-unit {
|
|
13
|
+
|
|
6
14
|
}
|
|
7
15
|
|
|
8
16
|
&-modal {
|
|
9
17
|
&-header {
|
|
10
18
|
padding: 5px 0px;
|
|
11
19
|
|
|
12
|
-
.
|
|
13
|
-
&-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
.header {
|
|
21
|
+
&-edit {
|
|
22
|
+
&-message {
|
|
23
|
+
position: absolute;
|
|
24
|
+
color: red;
|
|
25
|
+
font-size: 12px;
|
|
26
|
+
bottom: -16px;
|
|
27
|
+
left: 0px;
|
|
28
|
+
}
|
|
20
29
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
30
|
+
&-text {
|
|
31
|
+
font-size: @textSize;
|
|
32
|
+
line-height: 18px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&-row {
|
|
36
|
+
margin-top: 5px;
|
|
37
|
+
}
|
|
24
38
|
}
|
|
25
|
-
}
|
|
26
39
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
40
|
+
&-show {
|
|
41
|
+
&-text {
|
|
42
|
+
text-align: right;
|
|
43
|
+
.dsh-padding-top10();
|
|
44
|
+
}
|
|
31
45
|
}
|
|
32
46
|
}
|
|
33
47
|
}
|
|
@@ -36,6 +50,13 @@
|
|
|
36
50
|
width: 100%;
|
|
37
51
|
height: 100%;
|
|
38
52
|
}
|
|
53
|
+
|
|
54
|
+
&-lnglat {
|
|
55
|
+
padding: 5px 10px;
|
|
56
|
+
background:#fff;
|
|
57
|
+
display: none;
|
|
58
|
+
position:absolute;
|
|
59
|
+
}
|
|
39
60
|
|
|
40
61
|
.ivu-modal-content {
|
|
41
62
|
overflow: hidden;
|
|
@@ -1,7 +1,63 @@
|
|
|
1
1
|
.BriFlatTable {
|
|
2
|
-
|
|
2
|
+
&-main {
|
|
3
3
|
height: auto;
|
|
4
|
+
|
|
5
|
+
.table {
|
|
6
|
+
width: 100%;
|
|
7
|
+
border-spacing: 0;
|
|
8
|
+
border-collapse: collapse;
|
|
9
|
+
border-color: #E5E5E5;
|
|
10
|
+
background-color: #fff;
|
|
11
|
+
|
|
12
|
+
&-head {
|
|
13
|
+
background-color: #f0f0f0;
|
|
14
|
+
color: #666;
|
|
15
|
+
|
|
16
|
+
&-description {
|
|
17
|
+
color: #828499;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&-row {
|
|
22
|
+
height: 50px;
|
|
23
|
+
|
|
24
|
+
&:hover {
|
|
25
|
+
.table-row-td-add {
|
|
26
|
+
display: inline-block;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&-td {
|
|
31
|
+
position: relative;
|
|
32
|
+
|
|
33
|
+
.td-inner {
|
|
34
|
+
&-compare {
|
|
35
|
+
width: 100%;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&-tip {
|
|
40
|
+
padding: 2px 5px 0px 10px;
|
|
41
|
+
font-size: 12px;
|
|
42
|
+
line-height: 1;
|
|
43
|
+
color: #ed4014;
|
|
44
|
+
position: absolute;
|
|
45
|
+
top: calc(100% - 18px);
|
|
46
|
+
left: 20px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&-add {
|
|
50
|
+
line-height: 20px;
|
|
51
|
+
position: absolute;
|
|
52
|
+
bottom: 0px;
|
|
53
|
+
right: 0px;
|
|
54
|
+
display: none;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
4
59
|
}
|
|
60
|
+
|
|
5
61
|
&-create {
|
|
6
62
|
margin-top: 8px;
|
|
7
63
|
}
|
|
@@ -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 {
|