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.
@@ -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
- <div
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
- disabled: false
45
+ toolTipDisabled: true,
46
+ tmpToolTipDisabled: true
52
47
  };
53
48
  },
54
- computed: {},
55
- methods: {
56
- computedDisable () {
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.$nextTick(() => {
72
- this.computedDisable();
73
- });
54
+ this.getToolTipDisabled("mouted");
74
55
  },
75
56
  updated () {
76
- this.$nextTick(() => {
77
- this.computedDisable();
78
- });
57
+ this.getToolTipDisabled("updated");
79
58
  },
80
- watch: {
81
- content () {
82
- this.$nextTick(() => {
83
- this.computedDisable();
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
  };
@@ -23,6 +23,7 @@
23
23
  size: 'default',
24
24
  inTable: true
25
25
  }"
26
+ :rowIndex="rowIndex"
26
27
  :parentData="parentData"
27
28
  @blur="blur"
28
29
  @change="change"
@@ -0,0 +1,3 @@
1
+ .BriControlInput {
2
+
3
+ }
@@ -90,9 +90,9 @@
90
90
 
91
91
  & > div {
92
92
  width: 100%;
93
+ height: 100%;
93
94
  word-break: keep-all;
94
95
  white-space: nowrap;
95
-
96
96
  overflow: auto;
97
97
  .bri-scrollbar3();
98
98
 
@@ -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
- .edit {
13
- &-message {
14
- position: absolute;
15
- color: red;
16
- font-size: 12px;
17
- bottom: -16px;
18
- left: 0px;
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
- &-text {
22
- font-size: @textSize;
23
- line-height: 18px;
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
- .show {
28
- &-name {
29
- text-align: right;
30
- .dsh-padding-top10();
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
- .BriFlatTable-main {
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
  }
@@ -59,6 +59,9 @@
59
59
  &-th {
60
60
  border-bottom: none !important;
61
61
  }
62
+ &-td {
63
+ position: relative;
64
+ }
62
65
 
63
66
  th.ve-table-fixed-right {
64
67
  box-shadow: -4px 0 6px -2px rgba(0, 0, 0, 0.1);
@@ -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
- padding: 5px 8px;
14
+ color: rgba(255, 255, 255, 0.9);
15
15
  }
16
16
 
17
17
  .ivu-tooltip-rel {