@tagplus/components 4.7.3 → 4.7.4
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/dist/tp.common.js +1 -1
- package/dist/tp.common.js.map +1 -1
- package/dist/tp.css +11 -11
- package/dist/tp.umd.js +1 -1
- package/dist/tp.umd.js.map +1 -1
- package/dist/tp.umd.min.js +1 -1
- package/dist/tp.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/scss/_helpers.scss +0 -12
- package/src/components/Tip/Tip.vue +26 -55
- package/src/utils/currency.js +7 -1
package/package.json
CHANGED
|
@@ -92,27 +92,15 @@
|
|
|
92
92
|
display: block;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
.flexContent {
|
|
96
|
-
display: flex;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
95
|
.justify-between {
|
|
100
96
|
justify-content: space-between;
|
|
101
97
|
}
|
|
102
98
|
|
|
103
|
-
.justify-content-end {
|
|
104
|
-
justify-content: end;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
99
|
.text-helper-info {
|
|
108
100
|
font-size: 13px;
|
|
109
101
|
color: #565b66;
|
|
110
102
|
}
|
|
111
103
|
|
|
112
|
-
.c-pointer {
|
|
113
|
-
cursor: pointer;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
104
|
.no-font-weight {
|
|
117
105
|
font-weight: initial !important;
|
|
118
106
|
}
|
|
@@ -26,44 +26,33 @@
|
|
|
26
26
|
/>
|
|
27
27
|
</el-col>
|
|
28
28
|
</el-row>
|
|
29
|
-
<
|
|
29
|
+
<el-row
|
|
30
30
|
v-else
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
justify="space-between"
|
|
39
|
-
:class="tptipclasses"
|
|
31
|
+
:id="`${_id}`"
|
|
32
|
+
type="flex"
|
|
33
|
+
align="middle"
|
|
34
|
+
justify="space-between"
|
|
35
|
+
:class="tptipclasses">
|
|
36
|
+
<el-col
|
|
37
|
+
:span="17"
|
|
40
38
|
>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
<div
|
|
59
|
-
:id="`${_id}-text`"
|
|
60
|
-
data-tp-tip-content
|
|
61
|
-
style="margin:15px; margin-left:0px"
|
|
62
|
-
v-html="text"
|
|
63
|
-
/>
|
|
64
|
-
</el-col>
|
|
65
|
-
</el-row>
|
|
66
|
-
</div>
|
|
39
|
+
<el-row align="middle" type="flex" style="min-width:25px; margin:15px; padding: auto">
|
|
40
|
+
<em class="far fa-lightbulb-on" />
|
|
41
|
+
<b class="tp-title">{{ title }}</b>
|
|
42
|
+
</el-row>
|
|
43
|
+
</el-col>
|
|
44
|
+
<el-col :span="3" class="flexContent justify-content-end">
|
|
45
|
+
<em class="fa fa-ellipsis-h tp-close-button" @click="closed = !closed" />
|
|
46
|
+
</el-col>
|
|
47
|
+
|
|
48
|
+
<el-col :class="'tp-text ' + (closed ? 'tp-vanish' : '' )" :span="24">
|
|
49
|
+
<div
|
|
50
|
+
:id="`${_id}-text`"
|
|
51
|
+
style="margin:15px; margin-left:0px"
|
|
52
|
+
v-html="text"
|
|
53
|
+
/>
|
|
54
|
+
</el-col>
|
|
55
|
+
</el-row>
|
|
67
56
|
</template>
|
|
68
57
|
|
|
69
58
|
<script>
|
|
@@ -121,21 +110,6 @@ export default {
|
|
|
121
110
|
|
|
122
111
|
return classes
|
|
123
112
|
}
|
|
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
|
-
}
|
|
139
113
|
}
|
|
140
114
|
}
|
|
141
115
|
</script>
|
|
@@ -157,10 +131,6 @@ export default {
|
|
|
157
131
|
color: #586d93;
|
|
158
132
|
}
|
|
159
133
|
|
|
160
|
-
[data-tp-tip-content] {
|
|
161
|
-
cursor: initial
|
|
162
|
-
}
|
|
163
|
-
|
|
164
134
|
.info-text {
|
|
165
135
|
font-size: 12px;
|
|
166
136
|
font-stretch: normal;
|
|
@@ -202,6 +172,7 @@ export default {
|
|
|
202
172
|
|
|
203
173
|
.tp-close-button {
|
|
204
174
|
padding: 10px;
|
|
175
|
+
cursor: pointer;
|
|
205
176
|
}
|
|
206
177
|
|
|
207
178
|
.tp-title {
|
package/src/utils/currency.js
CHANGED
|
@@ -38,7 +38,7 @@ function unformat (input, precision = defaults.precision) {
|
|
|
38
38
|
* @returns
|
|
39
39
|
*/
|
|
40
40
|
function formatMoney (input, toString = false, locale = defaults, customPrecision = false) {
|
|
41
|
-
let inputString = (`${input}`)
|
|
41
|
+
let inputString = removeSecondSeparator(`${input}`)
|
|
42
42
|
|
|
43
43
|
// Impede de digitar . ou , porque o formatador já adiciona
|
|
44
44
|
if ((inputString.slice(-1).match(/[.,]/))) {
|
|
@@ -90,6 +90,12 @@ function completeZeros (customPrecision, input, locale) {
|
|
|
90
90
|
return input
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
// Impede que seja adicionado um segundo separadador apos o ponto ou a virgula
|
|
94
|
+
function removeSecondSeparator (input) {
|
|
95
|
+
// Identifica a segunda vírgula ou ponto e remove
|
|
96
|
+
return input.replace(/([.,])([^.,]*?)([.,])/, '$1$2')
|
|
97
|
+
}
|
|
98
|
+
|
|
93
99
|
function onlyNumbers (input) {
|
|
94
100
|
return toStr(input).replace(/\D+/g, '') || '0'
|
|
95
101
|
}
|