@jx3box/jx3box-common-ui 7.6.3 → 7.6.6
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 -0
- 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,6 +22,7 @@
|
|
|
22
22
|
<!-- 面包屑内容 -->
|
|
23
23
|
<Crumb :name="slug" v-if="crumbEnable" />
|
|
24
24
|
<slot></slot>
|
|
25
|
+
<slot v-if="show" name="title"></slot>
|
|
25
26
|
<div class="u-op">
|
|
26
27
|
<slot name="op-append"></slot>
|
|
27
28
|
<a
|
|
@@ -86,6 +87,7 @@ export default {
|
|
|
86
87
|
isNotAdmin: !User.isEditor(),
|
|
87
88
|
isOverlay: false,
|
|
88
89
|
isApp: isApp(),
|
|
90
|
+
show: false
|
|
89
91
|
};
|
|
90
92
|
},
|
|
91
93
|
computed: {
|
|
@@ -100,8 +102,24 @@ export default {
|
|
|
100
102
|
},
|
|
101
103
|
publishLink,
|
|
102
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);
|
|
103
120
|
},
|
|
104
121
|
mounted: function () {
|
|
122
|
+
document.addEventListener("scroll", this.onShowTitle);
|
|
105
123
|
Bus.$on("toggleLeftSide", (data) => {
|
|
106
124
|
this.isOpen = data;
|
|
107
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.form.startsWith('www') ? item.form : 'www.' + item.form
|
|
68
|
+
location.href = location.href.replace(from, item.to);
|
|
67
69
|
// }
|
|
68
70
|
},
|
|
69
71
|
},
|