@tagplus/components 2.0.4 → 2.0.6
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 +3 -2
- 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 +62 -0
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-row
|
|
3
|
+
v-if="!title"
|
|
3
4
|
:id="`${_id}`"
|
|
4
5
|
type="flex"
|
|
5
6
|
align="middle"
|
|
@@ -25,6 +26,33 @@
|
|
|
25
26
|
/>
|
|
26
27
|
</el-col>
|
|
27
28
|
</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>
|
|
28
56
|
</template>
|
|
29
57
|
|
|
30
58
|
<script>
|
|
@@ -43,12 +71,23 @@ export default {
|
|
|
43
71
|
default: ''
|
|
44
72
|
},
|
|
45
73
|
|
|
74
|
+
title: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: ''
|
|
77
|
+
},
|
|
78
|
+
|
|
46
79
|
type: {
|
|
47
80
|
type: String,
|
|
48
81
|
default: 'default'
|
|
49
82
|
}
|
|
50
83
|
},
|
|
51
84
|
|
|
85
|
+
data () {
|
|
86
|
+
return {
|
|
87
|
+
closed: false
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
|
|
52
91
|
computed: {
|
|
53
92
|
_id () {
|
|
54
93
|
return this.id || this.$options.name
|
|
@@ -136,4 +175,27 @@ export default {
|
|
|
136
175
|
color: #08a19e;
|
|
137
176
|
}
|
|
138
177
|
}
|
|
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
|
+
}
|
|
139
201
|
</style>
|