@jx3box/jx3box-common-ui 9.3.3 → 9.3.5
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 +2 -2
- package/src/SuspendCommon.vue +42 -4
- package/src/author/AuthorMedals.vue +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jx3box/jx3box-common-ui",
|
|
3
|
-
"version": "9.3.
|
|
3
|
+
"version": "9.3.5",
|
|
4
4
|
"description": "JX3BOX UI",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -70,4 +70,4 @@
|
|
|
70
70
|
"type": "git",
|
|
71
71
|
"url": "git+https://github.com/JX3BOX/jx3box-common-ui.git"
|
|
72
72
|
}
|
|
73
|
-
}
|
|
73
|
+
}
|
package/src/SuspendCommon.vue
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: zhusha
|
|
3
3
|
* @Date: 2025-05-13 10:00:27
|
|
4
4
|
* @LastEditors: zhusha
|
|
5
|
-
* @LastEditTime: 2025-05-20
|
|
5
|
+
* @LastEditTime: 2025-05-20 17:53:49
|
|
6
6
|
* @Description: 悬浮窗组件
|
|
7
7
|
* 关于搜索跳转的问题:如果项目需要跳转微信原生界面,需要引入微信sdk,并使用微信提供的api进行跳转
|
|
8
8
|
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script> 版本可根据需要查询微信官方文档
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
</div>
|
|
36
36
|
</div>
|
|
37
37
|
<!-- 样式分类(icon&more) -->
|
|
38
|
-
<div class="m-icon-box" v-if="btnConfig.showIcon">
|
|
38
|
+
<div class="m-icon-box" v-if="btnConfig.showIcon && !btnConfig.showHome">
|
|
39
39
|
<div class="m-btn-box">
|
|
40
40
|
<!-- 搜索按钮-->
|
|
41
41
|
<div v-if="btnConfig.showSearch" class="u-icon-d" @click="search">
|
|
@@ -63,6 +63,19 @@
|
|
|
63
63
|
<img class="u-icon" src="../assets/img/suspend/more.svg" svg-inline /> 更多
|
|
64
64
|
</div>
|
|
65
65
|
</div>
|
|
66
|
+
<!-- 横向固定内容区域 -->
|
|
67
|
+
<div class="m-pin-box" v-if="btnConfig.showPin && !btnConfig.showHome && !btnConfig.showIcon">
|
|
68
|
+
<div class="u-item" v-for="(item, index) in fixList" :key="'fix' + index">
|
|
69
|
+
<div class="u-text-r" v-if="item.type == 'text'">
|
|
70
|
+
{{ item.title.match(/[\u3400-\u9FFF\uF900-\uFAFF]/)?.[0] || '固' }}
|
|
71
|
+
</div>
|
|
72
|
+
<img :src="item.imgUrl" class="u-icon" v-else>
|
|
73
|
+
</div>
|
|
74
|
+
<!-- 不足三个时显示空位,只在编辑界面显示 -->
|
|
75
|
+
<div class="u-item" v-for="(item, index) in (3 - fixList.length)" :key="'fix_no' + index">
|
|
76
|
+
<img src="../assets/img/suspend/circle.svg" svg-inline class="u-icon">
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
66
79
|
<!-- 抽屉弹出层,支持默认样式和自定义插槽样式 -->
|
|
67
80
|
<el-drawer :title="drawerConfig.drawerTitle" :visible.sync="drawer" :direction="drawerConfig.direction"
|
|
68
81
|
:with-header="false" custom-class="u-drawer" :modal-append-to-body="false" append-to-body class="p-drawer">
|
|
@@ -192,7 +205,7 @@
|
|
|
192
205
|
<div class="u-text-r" v-if="item.type == 'text'">
|
|
193
206
|
{{ item.title.match(/[\u3400-\u9FFF\uF900-\uFAFF]/)?.[0] || '固' }}
|
|
194
207
|
</div>
|
|
195
|
-
<img src="
|
|
208
|
+
<img :src="item.imgUrl" class="u-icon" v-else>
|
|
196
209
|
<div class="u-text">{{ item.title }}</div>
|
|
197
210
|
<div class="u-slash" v-if="fixIsEdit" @click="cancelFix(item)">
|
|
198
211
|
<img src="../assets/img/suspend/pin_slash_touchbar_24.svg" svg-inline />
|
|
@@ -300,8 +313,9 @@ export default {
|
|
|
300
313
|
computed: {
|
|
301
314
|
btnConfig() {
|
|
302
315
|
const defaultConfig = {
|
|
303
|
-
showHome: false, //是否显示home区域,和Icon
|
|
316
|
+
showHome: false, //是否显示home区域,和Icon区域二选一,home区域优先级高于icon区域
|
|
304
317
|
showIcon: true, //是否显示icon区域,此处为false后,则下列配置无效
|
|
318
|
+
showPin: true, //是否显示横向固定区域,需要home和icon都是false才有效
|
|
305
319
|
showSearch: true, //是否显示搜索图标
|
|
306
320
|
showFixed: true, //是否显示固定图标
|
|
307
321
|
showCollect: true, //是否显示收藏图标
|
|
@@ -635,11 +649,35 @@ html {
|
|
|
635
649
|
.bold(700);
|
|
636
650
|
|
|
637
651
|
.m-home-box,
|
|
652
|
+
.m-pin-box,
|
|
638
653
|
.m-icon-box {
|
|
639
654
|
.flex;
|
|
640
655
|
.flex(o);
|
|
641
656
|
}
|
|
642
657
|
|
|
658
|
+
.m-pin-box {
|
|
659
|
+
gap: 1.125rem;
|
|
660
|
+
|
|
661
|
+
.u-item {
|
|
662
|
+
.flex;
|
|
663
|
+
.flex(o);
|
|
664
|
+
|
|
665
|
+
img {
|
|
666
|
+
.size(1.5rem);
|
|
667
|
+
.r(50%);
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.u-text-r {
|
|
671
|
+
.size(1.5rem);
|
|
672
|
+
.r(50%);
|
|
673
|
+
background-color: #D9D9D9;
|
|
674
|
+
.flex;
|
|
675
|
+
.flex(o);
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
}
|
|
680
|
+
|
|
643
681
|
.m-btn-box {
|
|
644
682
|
.flex;
|
|
645
683
|
align-items: center;
|