@tagplus/components 4.7.1 → 4.7.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/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "email": "bruno@tagplus.com.br"
9
9
  }
10
10
  ],
11
- "version": "4.7.1",
11
+ "version": "4.7.2",
12
12
  "main": "./dist/tp.common.js",
13
13
  "directories": {
14
14
  "lib": "src/lib"
@@ -28,8 +28,8 @@
28
28
  </el-row>
29
29
  <div
30
30
  v-else
31
- :class="closed ? 'c-pointer' : ''"
32
- @click="closed = false"
31
+ class="c-pointer"
32
+ @click="onClick"
33
33
  >
34
34
  <el-row
35
35
  :id="`${_id}`"
@@ -50,13 +50,14 @@
50
50
 
51
51
  <!-- Close/Open Btn -->
52
52
  <el-col :span="3" class="flexContent justify-content-end">
53
- <em :class="closed ? 'fa fa-plus' : 'fa fa-minus'" class="tp-close-button" @click.stop="closed = !closed" />
53
+ <em :class="closed ? 'fa fa-plus' : 'fa fa-minus'" class="tp-close-button" />
54
54
  </el-col>
55
55
 
56
56
  <!-- Texto -->
57
57
  <el-col :class="'tp-text ' + (closed ? 'tp-vanish' : '' )" :span="24">
58
58
  <div
59
59
  :id="`${_id}-text`"
60
+ data-tp-tip-content
60
61
  style="margin:15px; margin-left:0px"
61
62
  v-html="text"
62
63
  />
@@ -120,6 +121,21 @@ export default {
120
121
 
121
122
  return classes
122
123
  }
124
+ },
125
+
126
+ methods: {
127
+ onClick (evt) {
128
+ // Permite clicar em link sem fechar Tip
129
+ const isLink = evt.target?.nodeName === 'A'
130
+ // Permite copiar texto sem fechar Tip
131
+ const isContent = evt.target?.closest('[data-tp-tip-content]')
132
+
133
+ if (isLink || isContent) {
134
+ return
135
+ }
136
+
137
+ this.closed = !this.closed
138
+ }
123
139
  }
124
140
  }
125
141
  </script>
@@ -182,7 +198,6 @@ export default {
182
198
 
183
199
  .tp-close-button {
184
200
  padding: 10px;
185
- cursor: pointer;
186
201
  }
187
202
 
188
203
  .tp-title {