appsnbcbweicheng 1.2.24 → 1.2.26
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 +1 -1
- package/public/ExpandText.vue +83 -0
- package/readme.md +2 -0
- package/public/EventInterpretation.vue +0 -1026
- package/public/FundInterpretation.vue +0 -765
- package/public/FundManagerInterpretation.vue +0 -759
- package/public/InstitutionViewpoint.vue +0 -731
- package/public/InstitutionViewpointCreate.vue +0 -612
- package/public/MonthlyAssetSectorEventInterpretation.vue +0 -637
- package/public/ShelfRules.vue +0 -400
package/package.json
CHANGED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="expand-text">
|
|
3
|
+
<div ref="text" :class="['text-content', { clamp: !expanded }]">
|
|
4
|
+
{{ text }}
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<span v-if="showToggle" class="toggle-btn" @click="toggle">
|
|
8
|
+
{{ expanded ? "收起" : "展开" }}
|
|
9
|
+
</span>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
export default {
|
|
15
|
+
name: "ExpandText",
|
|
16
|
+
|
|
17
|
+
props: {
|
|
18
|
+
text: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: ""
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
data() {
|
|
25
|
+
return {
|
|
26
|
+
expanded: false,
|
|
27
|
+
showToggle: false
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
mounted() {
|
|
32
|
+
this.checkOverflow()
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
watch: {
|
|
36
|
+
text() {
|
|
37
|
+
this.$nextTick(() => {
|
|
38
|
+
this.checkOverflow()
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
methods: {
|
|
44
|
+
checkOverflow() {
|
|
45
|
+
const el = this.$refs.text
|
|
46
|
+
|
|
47
|
+
if (!el) return
|
|
48
|
+
|
|
49
|
+
this.showToggle = el.scrollHeight > el.clientHeight
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
toggle() {
|
|
53
|
+
this.expanded = !this.expanded
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<style scoped>
|
|
60
|
+
.expand-text {
|
|
61
|
+
position: relative;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.text-content {
|
|
65
|
+
word-break: break-word;
|
|
66
|
+
line-height: 20px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* 三行限制 */
|
|
70
|
+
.clamp {
|
|
71
|
+
display: -webkit-box;
|
|
72
|
+
-webkit-line-clamp: 3;
|
|
73
|
+
-webkit-box-orient: vertical;
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.toggle-btn {
|
|
78
|
+
color: #409eff;
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
font-size: 12px;
|
|
81
|
+
margin-left: 6px;
|
|
82
|
+
}
|
|
83
|
+
</style>
|