|
|
@@ -72,6 +72,7 @@ export default {
|
|
|
loadFirst: true,
|
|
|
menuWidth: 0,
|
|
|
sceneNum: config.sceneNum,
|
|
|
+ SlyArr:[]
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -93,19 +94,40 @@ export default {
|
|
|
history.replaceState(null, null, "".concat(window.location.pathname, "?").concat(`id=${this.showInfo.id}&vr=${item.sceneCode}`));
|
|
|
this.sceneNum = item.sceneCode;
|
|
|
},
|
|
|
+ refreshSly(){
|
|
|
+ this.SlyArr.forEach(item=>{
|
|
|
+ // item.toStart()
|
|
|
+ this.$nextTick(() => {
|
|
|
+ item.reload()
|
|
|
+ });
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
this.$nextTick(() => {
|
|
|
if ($scroll == null) {
|
|
|
let eles = $(".clip-scroller");
|
|
|
- Array.from(eles).forEach((item) => {
|
|
|
- let frame = new PerfectScrollbar(item, {
|
|
|
- useBothWheelAxes: true,
|
|
|
- suppressScrollY: true,
|
|
|
- wheelSpeed: 0.8,
|
|
|
- });
|
|
|
- $(item).data("scrollbar", frame);
|
|
|
+ Array.from(eles).forEach((item,i) => {
|
|
|
+ // let frame = new PerfectScrollbar(item, {
|
|
|
+ // useBothWheelAxes: true,
|
|
|
+ // suppressScrollY: true,
|
|
|
+ // wheelSpeed: 0.8,
|
|
|
+ // });
|
|
|
+ // $(item).data("scrollbar", frame);
|
|
|
+ let iii = new Sly($(item),{
|
|
|
+ horizontal: !0,
|
|
|
+ smart: !0,
|
|
|
+ mouseDragging: !0,
|
|
|
+ touchDragging: !0,
|
|
|
+ speed: 0,
|
|
|
+ dragHandle: !0,
|
|
|
+ dynamicHandle: !0,
|
|
|
+ clickBar: !0,
|
|
|
+ activateOn: null
|
|
|
+ }).init()
|
|
|
+ this.SlyArr.push(iii)
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
@@ -140,6 +162,7 @@ export default {
|
|
|
});
|
|
|
this.scenes = arr.sort((a, b) => a.weight - b.weight);
|
|
|
}
|
|
|
+ this.refreshSly()
|
|
|
},
|
|
|
},
|
|
|
|