@tagplus/components 2.0.7 → 2.0.9
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 +1 -1
- 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/components/Tip/Tip.vue +0 -62
- package/src/mixins/floatFormatter.js +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-row
|
|
3
|
-
v-if="!title"
|
|
4
3
|
:id="`${_id}`"
|
|
5
4
|
type="flex"
|
|
6
5
|
align="middle"
|
|
@@ -26,33 +25,6 @@
|
|
|
26
25
|
/>
|
|
27
26
|
</el-col>
|
|
28
27
|
</el-row>
|
|
29
|
-
<el-row
|
|
30
|
-
v-else
|
|
31
|
-
:id="`${_id}`"
|
|
32
|
-
type="flex"
|
|
33
|
-
align="middle"
|
|
34
|
-
justify="space-between"
|
|
35
|
-
:class="tptipclasses">
|
|
36
|
-
<el-col
|
|
37
|
-
:span="17"
|
|
38
|
-
>
|
|
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>
|
|
56
28
|
</template>
|
|
57
29
|
|
|
58
30
|
<script>
|
|
@@ -71,23 +43,12 @@ export default {
|
|
|
71
43
|
default: ''
|
|
72
44
|
},
|
|
73
45
|
|
|
74
|
-
title: {
|
|
75
|
-
type: String,
|
|
76
|
-
default: ''
|
|
77
|
-
},
|
|
78
|
-
|
|
79
46
|
type: {
|
|
80
47
|
type: String,
|
|
81
48
|
default: 'default'
|
|
82
49
|
}
|
|
83
50
|
},
|
|
84
51
|
|
|
85
|
-
data () {
|
|
86
|
-
return {
|
|
87
|
-
closed: true
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
|
|
91
52
|
computed: {
|
|
92
53
|
_id () {
|
|
93
54
|
return this.id || this.$options.name
|
|
@@ -175,27 +136,4 @@ export default {
|
|
|
175
136
|
color: #08a19e;
|
|
176
137
|
}
|
|
177
138
|
}
|
|
178
|
-
|
|
179
|
-
.tp-close-button {
|
|
180
|
-
padding: 10px;
|
|
181
|
-
cursor: pointer;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.tp-title {
|
|
185
|
-
font-size: 16px;
|
|
186
|
-
padding-left: 16px;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.tp-text {
|
|
190
|
-
height: auto;
|
|
191
|
-
transition: 0.4s opacity ease-out;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.tp-vanish {
|
|
195
|
-
position: absolute;
|
|
196
|
-
max-height:0;
|
|
197
|
-
transform: scale(0);
|
|
198
|
-
opacity:0;
|
|
199
|
-
transition: 0s opacity linear;
|
|
200
|
-
}
|
|
201
139
|
</style>
|
|
@@ -10,6 +10,13 @@ export default {
|
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
|
|
13
|
+
props: {
|
|
14
|
+
allowEmpty: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
|
|
13
20
|
computed: {
|
|
14
21
|
locale () {
|
|
15
22
|
return this.t('locale')
|
|
@@ -20,6 +27,7 @@ export default {
|
|
|
20
27
|
value: {
|
|
21
28
|
immediate: true,
|
|
22
29
|
handler (newValue, oldValue) {
|
|
30
|
+
if (newValue === '' && this.allowEmpty) { this.formattedValue = ''; return }
|
|
23
31
|
this.formattedValue = formatMoney(newValue, true, this.locale)
|
|
24
32
|
}
|
|
25
33
|
}
|