我是靠谱客的博主 无辜钢笔,这篇文章主要介绍Vue封装组件-面板3-LjPanel3效果图: 使用:LjPanel3,现在分享给大家,希望可以做个参考。

效果图:

 使用:

复制代码
1
2
3
4
5
6
7
8
9
<LjPanel3 width="300px" bgColor="rgba(2, 2, 2, 0.418)" :showBtnClose="true" @closeBtn="closeBtn" height_content="800px" > 内容</LjPanel3 >

LjPanel3

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!--LjPanel3--> <template> <div class="LjPanel3" :style="{ width: width, backgroundColor: bgColor }"> <span class="btnClose" v-if="showBtnClose" @click="closeBtn">x</span> <div class="content" :style="{ height: height_content }"> <el-scrollbar style="height: 100%"> <slot></slot> </el-scrollbar> </div> </div> </template> <script> export default { name: "LjPanel3", components: {}, props: { width: { type: String, default: "100%", }, bgColor: { type: String, default: "rgba(2, 2, 2, 0.418)", }, showBtnClose: { type: Boolean, default: true, }, //设置此属性,让滚动条生效 height_content: { type: String, default: "", }, }, data() { return {}; }, computed: {}, created() {}, mounted() {}, filters: {}, methods: { closeBtn() { this.$emit("closeBtn"); }, }, watch: {}, }; </script> <style lang="scss" scoped> .LjPanel3 { position: relative; color: white; font-size: 18px; .btnClose { position: absolute; right: 10px; top: 10px; color: white; z-index: 9999; &:hover { cursor: pointer; color: rgb(185, 185, 185); } } .content { min-height: 35px; min-width: 50px; padding: 10px; ::v-deep .el-scrollbar__wrap { overflow-x: hidden; } } } </style>

最后

以上就是无辜钢笔最近收集整理的关于Vue封装组件-面板3-LjPanel3效果图: 使用:LjPanel3的全部内容,更多相关Vue封装组件-面板3-LjPanel3效果图内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(84)

评论列表共有 0 条评论

立即
投稿
返回
顶部