@jx3box/jx3box-common-ui 7.6.4 → 7.6.7
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/src/App.vue +2 -2
- package/src/Breadcrumb.vue +18 -1
- package/src/header/clientSwitch.vue +3 -1
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -271,7 +271,7 @@ export default {
|
|
|
271
271
|
},
|
|
272
272
|
methods: {
|
|
273
273
|
addUser: function (val) {
|
|
274
|
-
console.log(val);
|
|
274
|
+
// console.log(val);
|
|
275
275
|
},
|
|
276
276
|
loadPost: function () {
|
|
277
277
|
axios.get(`/api/cms/post/${this.post_id}`).then((res) => {
|
|
@@ -280,7 +280,7 @@ export default {
|
|
|
280
280
|
});
|
|
281
281
|
},
|
|
282
282
|
updateExtend: function (val) {
|
|
283
|
-
console.log(val);
|
|
283
|
+
// console.log(val);
|
|
284
284
|
},
|
|
285
285
|
},
|
|
286
286
|
watch: {
|
package/src/Breadcrumb.vue
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<!-- 面包屑内容 -->
|
|
23
23
|
<Crumb :name="slug" v-if="crumbEnable" />
|
|
24
24
|
<slot></slot>
|
|
25
|
-
<slot name="title"></slot>
|
|
25
|
+
<slot v-if="show" name="title"></slot>
|
|
26
26
|
<div class="u-op">
|
|
27
27
|
<slot name="op-append"></slot>
|
|
28
28
|
<a
|
|
@@ -87,6 +87,7 @@ export default {
|
|
|
87
87
|
isNotAdmin: !User.isEditor(),
|
|
88
88
|
isOverlay: false,
|
|
89
89
|
isApp: isApp(),
|
|
90
|
+
show: false
|
|
90
91
|
};
|
|
91
92
|
},
|
|
92
93
|
computed: {
|
|
@@ -101,8 +102,24 @@ export default {
|
|
|
101
102
|
},
|
|
102
103
|
publishLink,
|
|
103
104
|
getAppIcon,
|
|
105
|
+
onShowTitle(e) {
|
|
106
|
+
// 小屏不显示
|
|
107
|
+
if (window.innerWidth < 1680) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
let scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
111
|
+
if (scrollTop > 100) {
|
|
112
|
+
this.show = true;
|
|
113
|
+
} else {
|
|
114
|
+
this.show = false;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
beforeDestroy() {
|
|
119
|
+
document.removeEventListener("scroll", this.onShowTitle);
|
|
104
120
|
},
|
|
105
121
|
mounted: function () {
|
|
122
|
+
document.addEventListener("scroll", this.onShowTitle);
|
|
106
123
|
Bus.$on("toggleLeftSide", (data) => {
|
|
107
124
|
this.isOpen = data;
|
|
108
125
|
});
|
|
@@ -63,7 +63,9 @@ export default {
|
|
|
63
63
|
// if(location.pathname.startsWith('/index') || location.pathname.startsWith('/origin')){
|
|
64
64
|
// location.href = 'https://' + item.to
|
|
65
65
|
// }else{
|
|
66
|
-
|
|
66
|
+
// 如果起始不是www,则添加www
|
|
67
|
+
const from = item.from?.startsWith('www') ? item.from : 'www.' + item.from
|
|
68
|
+
location.href = location.href.replace(from, item.to);
|
|
67
69
|
// }
|
|
68
70
|
},
|
|
69
71
|
},
|