|
@@ -40,13 +40,22 @@
|
|
|
methods: {
|
|
|
navleft(){
|
|
|
this.left+=100
|
|
|
- console.log(this.left)
|
|
|
- this.$refs.navclickwrap.style.left = -this.left+'px'
|
|
|
+ if(this.left<this.$refs.navclickwrap.offsetWidth){
|
|
|
+ this.$refs.navclickwrap.style.left = -this.left+'px'
|
|
|
+ }else{
|
|
|
+ this.left=this.$refs.navclickwrap.offsetWidth
|
|
|
+ this.$refs.navclickwrap.style.left = -this.$refs.navclickwrap.offsetWidth+'px'
|
|
|
+ }
|
|
|
},
|
|
|
navright(){
|
|
|
this.left-=100
|
|
|
console.log(this.left)
|
|
|
- this.$refs.navclickwrap.style.left = -this.left+'px'
|
|
|
+ if(-this.left<0){
|
|
|
+ this.$refs.navclickwrap.style.left = -this.left+'px'
|
|
|
+ }else{
|
|
|
+ this.left=0
|
|
|
+ this.$refs.navclickwrap.style.left = '0px'
|
|
|
+ }
|
|
|
},
|
|
|
// 删除标签页
|
|
|
removeTag(index) {
|