@jx3box/jx3box-vue3-ui 0.8.9 → 0.8.11

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-vue3-ui",
3
- "version": "0.8.9",
3
+ "version": "0.8.11",
4
4
  "description": "JX3BOX Vue3 UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -126,21 +126,22 @@
126
126
  </template>
127
127
 
128
128
  <script>
129
+ import { cloneDeep } from "lodash";
129
130
  import default_nav from "../../assets/data/nav.json";
130
131
  import { getMenu } from "../../service/header";
131
132
  import { trimSlash } from "../../utils";
132
133
 
133
134
  const activeNav = {
134
- index: ['index'],
135
- macro: ['macro', 'pz'],
136
- tool: ['app', 'jx3dat', 'dbm'],
137
- bps: ['bps', 'jcl', 'battle'],
138
- fb: ['fb','baizhan','team', 'jdt', 'rank'],
139
- cj: ['cj', 'item', 'knowledge', 'quest'],
140
- pvx: ['face', 'adventure', 'pvg'],
141
- bbs: ['bbs','topic','event'],
142
- pvp: ['pvp']
143
- }
135
+ index: ["index"],
136
+ macro: ["macro", "pz"],
137
+ tool: ["app", "jx3dat", "dbm"],
138
+ bps: ["bps", "jcl", "battle"],
139
+ fb: ["fb", "baizhan", "team", "jdt", "rank"],
140
+ cj: ["cj", "item", "knowledge", "quest"],
141
+ pvx: ["face", "adventure", "pvg"],
142
+ bbs: ["bbs", "topic", "event"],
143
+ pvp: ["pvp"],
144
+ };
144
145
  export default {
145
146
  name: "HeaderNav",
146
147
  props: [],
@@ -153,6 +154,7 @@ export default {
153
154
  },
154
155
  computed: {
155
156
  finalNav: function ({ nav }) {
157
+ nav = cloneDeep(nav);
156
158
  // 父节点
157
159
  const finalNav = nav.filter((d) => !d.parentKey && d.status);
158
160
  // 子节点
@@ -183,8 +185,8 @@ export default {
183
185
  methods: {
184
186
  isFocus: function (type) {
185
187
  // return location.pathname.includes(type);
186
- let active = '';
187
- const pathname = location.pathname?.split('/')?.filter(Boolean)?.[0] || '';
188
+ let active = "";
189
+ const pathname = location.pathname?.split("/")?.filter(Boolean)?.[0] || "";
188
190
  for (const key in activeNav) {
189
191
  if (activeNav[key].includes(pathname)) {
190
192
  active = key;
@@ -16,6 +16,7 @@
16
16
  <template v-if="titleExtra">
17
17
  <span class="u-client" :class="'i-client-' + client">{{ showClientLabel(client) }}</span>
18
18
  <span class="u-client u-zlp" v-if="zlp">{{ zlp }}</span>
19
+ <span class="u-client i-client-wujie" v-if="is_wujie">无界</span>
19
20
  </template>
20
21
  </span>
21
22
  </div>
@@ -43,7 +44,7 @@
43
44
  <div class="u-meta u-sub-block">
44
45
  <em class="u-label">适用客户端</em>
45
46
  <span class="u-value u-client" :class="client">{{ showClientLabel(client) }}</span>
46
- <span class="u-value u-client wujie">无界</span>
47
+ <span class="u-value u-client wujie" v-if="is_wujie">无界</span>
47
48
  </div>
48
49
 
49
50
  <!-- 发布日期 -->
@@ -138,6 +139,9 @@ export default {
138
139
  client: function () {
139
140
  return this.post?.client || "std";
140
141
  },
142
+ is_wujie: function () {
143
+ return this.post?.is_wujie
144
+ },
141
145
  },
142
146
  watch: {
143
147
  post: {
@@ -171,6 +175,25 @@ export default {
171
175
  </script>
172
176
 
173
177
  <style lang="less">
178
+ .i-client-all {
179
+ border: 1px solid #a26ef7;
180
+ color: #a26ef7;
181
+ }
182
+ .i-client-std {
183
+ border: 1px solid #f0b400;
184
+ color: #f0b400;
185
+ }
186
+ .i-client-origin {
187
+ border: 1px solid #0eb7ce;
188
+ color: #0eb7ce;
189
+ }
190
+ .i-client-wujie {
191
+ border: 1px solid #00dcda;
192
+ color: #3ae0f1;
193
+ background: #eff;
194
+ margin-left: 5px;
195
+ }
196
+
174
197
  .m-single-header {
175
198
  padding-top: 20px;
176
199
  padding-bottom: 20px;