@jx3box/jx3box-ui 2.3.24 → 2.3.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-ui",
3
- "version": "2.3.24",
3
+ "version": "2.3.26",
4
4
  "description": "JX3BOX Vue3 UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -13,13 +13,14 @@
13
13
  </i>
14
14
  </span>
15
15
  <ul class="u-menu u-pop-content">
16
- <template v-for="item in userPanel">
17
- <li :key="item.label" v-if="item.remark == 'auth' ? !isAuth : true">
16
+ <template v-for="item in userPanel" :key="item.label">
17
+ <li>
18
18
  <a :href="item.link" :target="item.target || '_self'" class="u-menu-item" @click="onClick(item)">
19
- <img :src="resolveImg(item.icon)" class="u-menu-icon" :alt="item.icon" />
20
- {{ getPanelLabel(item) }}
19
+ <span class="u-menu-icon-wrap">
20
+ <img :src="resolveImg(item.icon)" class="u-menu-icon" :alt="item.icon" />
21
+ </span>
22
+ <span class="u-menu-label">{{ getPanelLabel(item) }}</span>
21
23
  <span v-if="showPop && isFeaturePanelItem(item)" class="u-new">New!</span>
22
- <span v-if="item.remark == 'auth' && !isAuth" class="u-new">New!</span>
23
24
  </a>
24
25
  <a
25
26
  v-if="isFeaturePanelItem(item) && hasAccountReadyIssue"
@@ -27,8 +28,10 @@
27
28
  class="u-menu-item u-menu-item--account-ready"
28
29
  @click.prevent="openAccountReady"
29
30
  >
30
- <img :src="resolveImg(item.icon)" class="u-menu-icon" :alt="item.icon" />
31
- 资料完善
31
+ <span class="u-menu-icon-wrap">
32
+ <img :src="resolveImg(item.icon)" class="u-menu-icon" :alt="item.icon" />
33
+ </span>
34
+ <span class="u-menu-label">资料完善</span>
32
35
  <span class="u-new u-new--important">重要</span>
33
36
  </a>
34
37
  </li>
@@ -37,8 +40,10 @@
37
40
  <hr v-if="adminPanel.length" />
38
41
  <li v-for="item in adminPanel" :key="item.label">
39
42
  <a :href="item.link" :target="item.target || '_self'" class="u-menu-item">
40
- <img :src="resolveImg(item.icon)" class="u-menu-icon" :alt="item.icon" />
41
- {{ getPanelLabel(item) }}
43
+ <span class="u-menu-icon-wrap">
44
+ <img :src="resolveImg(item.icon)" class="u-menu-icon" :alt="item.icon" />
45
+ </span>
46
+ <span class="u-menu-label">{{ getPanelLabel(item) }}</span>
42
47
  </a>
43
48
  </li>
44
49
  </template>
@@ -49,7 +54,6 @@
49
54
  <script>
50
55
  import { getMenu } from "../../service/header";
51
56
  import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
52
- import User from "@jx3box/jx3box-common/js/user";
53
57
  import i18nMixin from "../../i18n/mixin";
54
58
  import { getConfig } from "../../service/cms";
55
59
  // import manageIcon from "@/assets/img/components/common/header/manage.svg";
@@ -109,7 +113,7 @@ export default {
109
113
  computed: {
110
114
  userPanel: function () {
111
115
  return this.panel.filter((item) => {
112
- return !item.onlyAdmin;
116
+ return !item.onlyAdmin && item.remark !== "auth";
113
117
  });
114
118
  },
115
119
  adminPanel: function () {
@@ -117,9 +121,6 @@ export default {
117
121
  return item.onlyAdmin;
118
122
  });
119
123
  },
120
- isAuth() {
121
- return User.isPhoneMember();
122
- },
123
124
  hasAccountReadyIssue() {
124
125
  return this.accountReadyIncomplete;
125
126
  },
@@ -220,29 +221,95 @@ export default {
220
221
  align-items: center;
221
222
  }
222
223
  .u-menu {
224
+ width: 272px;
225
+ box-sizing: border-box;
226
+ right: -10px;
227
+ top: calc(100% + 8px);
228
+ margin: 0;
229
+ padding: 8px;
230
+ border: 1px solid rgba(31, 35, 41, 0.1);
231
+ border-radius: 12px;
232
+ background: rgba(255, 255, 255, 0.98);
233
+ box-shadow: 0 12px 36px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.08);
234
+ backdrop-filter: blur(12px);
235
+ -webkit-backdrop-filter: blur(12px);
236
+
237
+ &:before {
238
+ right: 16px;
239
+ top: -14px;
240
+ border-width: 7px;
241
+ border-bottom-color: rgba(31, 35, 41, 0.1);
242
+ }
243
+
244
+ &:after {
245
+ right: 17px;
246
+ top: -12px;
247
+ border-width: 6px;
248
+ border-bottom-color: #fff;
249
+ }
250
+
251
+ li {
252
+ margin: 0;
253
+ }
254
+
223
255
  .u-menu-item {
224
256
  .flex;
225
257
  align-items: center;
226
- gap: 4px;
258
+ gap: 10px;
259
+ min-height: 44px;
260
+ box-sizing: border-box;
261
+ padding: 8px 10px;
262
+ border-radius: 8px;
263
+ color: #303133;
264
+ font-size: 14px;
265
+ line-height: 20px;
266
+ text-decoration: none;
267
+ transition: background-color 0.16s ease, color 0.16s ease;
227
268
 
228
269
  &:hover {
229
- .u-menu-icon {
230
- filter: invert(100%) sepia(0%) saturate(5658%) hue-rotate(215deg) brightness(114%) contrast(106%);
270
+ color: #4338ca;
271
+ background: #f4f3ff;
272
+
273
+ .u-menu-icon-wrap {
274
+ background: #e8e7ff;
231
275
  }
232
- .u-new {
233
- color: #fff;
276
+
277
+ .u-menu-icon {
278
+ opacity: 0.9;
234
279
  }
235
280
  }
236
281
  }
282
+
283
+ .u-menu-icon-wrap {
284
+ .flex;
285
+ align-items: center;
286
+ justify-content: center;
287
+ width: 30px;
288
+ height: 30px;
289
+ flex: 0 0 30px;
290
+ border-radius: 8px;
291
+ background: #f3f4f6;
292
+ transition: background-color 0.16s ease;
293
+ }
294
+
237
295
  .u-menu-icon {
238
- width: 16px;
239
- height: 16px;
296
+ width: 18px;
297
+ height: 18px;
298
+ opacity: 0.72;
299
+ }
300
+
301
+ .u-menu-label {
302
+ flex: 1;
303
+ min-width: 0;
304
+ font-weight: 500;
305
+ letter-spacing: 0.01em;
240
306
  }
241
307
  }
242
308
 
243
309
  hr {
244
310
  border: 0;
245
- border-top: 1px solid #eee;
311
+ border-top: 1px solid #eef0f3;
312
+ margin: 6px 4px;
246
313
  }
247
314
 
248
315
  .u-icon-msg {
@@ -265,19 +332,38 @@ export default {
265
332
  }
266
333
 
267
334
  .u-new {
268
- font-size: 12px;
335
+ flex: 0 0 auto;
336
+ box-sizing: border-box;
337
+ min-width: 38px;
269
338
  margin-left: 4px;
270
- background-color: @v4primary-dark;
271
- color: #fff;
272
- padding: 0px 6px;
339
+ padding: 2px 7px;
340
+ border: 1px solid #d9d6fe;
341
+ border-radius: 999px;
342
+ background: #eeedff;
343
+ color: #4f46e5;
344
+ font-size: 11px;
345
+ font-weight: 700;
346
+ line-height: 16px;
347
+ text-align: center;
273
348
  }
274
349
 
275
350
  .u-new--important {
276
- background-color: #f56c6c;
351
+ border-color: #ffd1d1;
352
+ background: #fff0f0;
353
+ color: #e5484d;
277
354
  }
278
355
 
279
356
  .u-menu-item--account-ready {
280
- color: #f56c6c;
357
+ color: #303133;
358
+
359
+ &:hover {
360
+ color: #d9363e;
361
+ background: #fff5f5;
362
+
363
+ .u-menu-icon-wrap {
364
+ background: #ffe8e8;
365
+ }
366
+ }
281
367
  }
282
368
  }
283
369
  </style>
@@ -0,0 +1,16 @@
1
+ import ManagePanelStage from "./ManagePanelStage.vue";
2
+
3
+ export default {
4
+ title: "Layout/CommonHeader/ManagePanel",
5
+ component: ManagePanelStage,
6
+ parameters: {
7
+ layout: "fullscreen",
8
+ },
9
+ };
10
+
11
+ export const Refined = {
12
+ render: () => ({
13
+ components: { ManagePanelStage },
14
+ template: "<ManagePanelStage />",
15
+ }),
16
+ };
@@ -0,0 +1,135 @@
1
+ <template>
2
+ <div class="manage-preview">
3
+ <div class="manage-preview__header">
4
+ <div class="manage-preview__brand">JX3BOX</div>
5
+ <div class="manage-preview__tools">
6
+ <span class="manage-preview__tool">◯</span>
7
+ <span class="manage-preview__tool">◇</span>
8
+ <span class="manage-preview__tool">♢</span>
9
+ <Manage
10
+ ref="manage"
11
+ :header-config-loaded="false"
12
+ :account-ready-incomplete="true"
13
+ :account-ready-issues="['contact']"
14
+ />
15
+ <span class="manage-preview__tool">文</span>
16
+ <span class="manage-preview__avatar">侠</span>
17
+ </div>
18
+ </div>
19
+ <main class="manage-preview__body">
20
+ <div class="manage-preview__eyebrow">COMMON HEADER</div>
21
+ <h1>公共头扩展菜单</h1>
22
+ <p>重新梳理信息密度、状态层级与悬浮反馈后的实际组件预览。</p>
23
+ </main>
24
+ </div>
25
+ </template>
26
+
27
+ <script>
28
+ import Manage from "../../header/manage.vue";
29
+
30
+ export default {
31
+ name: "ManagePanelStage",
32
+ components: { Manage },
33
+ mounted() {
34
+ this.$refs.manage.panel = [
35
+ {
36
+ key: "featureUpdate",
37
+ label: "功能更新",
38
+ link: "javascript:;",
39
+ icon: "feature.svg",
40
+ remark: "feature",
41
+ meta: "storybook-preview",
42
+ },
43
+ ];
44
+ this.$refs.manage.showPop = true;
45
+ },
46
+ };
47
+ </script>
48
+
49
+ <style lang="less">
50
+ .manage-preview {
51
+ min-height: 100vh;
52
+ background:
53
+ radial-gradient(circle at 72% 8%, rgba(79, 70, 229, 0.09), transparent 26rem),
54
+ #f5f7fa;
55
+ }
56
+
57
+ .manage-preview__header {
58
+ height: 64px;
59
+ display: flex;
60
+ align-items: center;
61
+ justify-content: space-between;
62
+ box-sizing: border-box;
63
+ padding: 0 32px;
64
+ color: #fff;
65
+ background: #202124;
66
+ box-shadow: 0 4px 18px rgba(15, 23, 42, 0.2);
67
+ }
68
+
69
+ .manage-preview__brand {
70
+ font-size: 14px;
71
+ font-weight: 800;
72
+ letter-spacing: 0.12em;
73
+ }
74
+
75
+ .manage-preview__tools {
76
+ height: 100%;
77
+ display: flex;
78
+ align-items: center;
79
+ gap: 8px;
80
+ }
81
+
82
+ .manage-preview__tool {
83
+ width: 38px;
84
+ height: 38px;
85
+ display: flex;
86
+ align-items: center;
87
+ justify-content: center;
88
+ color: rgba(255, 255, 255, 0.88);
89
+ font-size: 19px;
90
+ }
91
+
92
+ .manage-preview__avatar {
93
+ width: 34px;
94
+ height: 34px;
95
+ display: flex;
96
+ align-items: center;
97
+ justify-content: center;
98
+ margin-left: 4px;
99
+ border: 2px solid rgba(255, 255, 255, 0.75);
100
+ border-radius: 50%;
101
+ color: #7c2d12;
102
+ background: #fef3c7;
103
+ font-size: 13px;
104
+ font-weight: 700;
105
+ }
106
+
107
+ .manage-preview .c-header-manage .u-pop-content {
108
+ visibility: visible;
109
+ opacity: 1;
110
+ }
111
+
112
+ .manage-preview__body {
113
+ padding: 112px 9vw;
114
+ }
115
+
116
+ .manage-preview__eyebrow {
117
+ color: #4f46e5;
118
+ font-size: 12px;
119
+ font-weight: 800;
120
+ letter-spacing: 0.14em;
121
+ }
122
+
123
+ .manage-preview__body h1 {
124
+ margin: 12px 0 0;
125
+ color: #111827;
126
+ font-size: 34px;
127
+ line-height: 1.2;
128
+ }
129
+
130
+ .manage-preview__body p {
131
+ margin: 14px 0 0;
132
+ color: #6b7280;
133
+ font-size: 15px;
134
+ }
135
+ </style>