|
@@ -106,6 +106,8 @@ const drawerFooter = new Vue({
|
|
|
recommend: [],
|
|
|
typeId: 0,
|
|
|
labelId: 0,
|
|
|
+ screenWidth: 0,
|
|
|
+ vantWidth: 0 // 轮播图width
|
|
|
},
|
|
|
mounted() {
|
|
|
this.typeId = $("#typeId").val() * 1;
|
|
@@ -125,6 +127,19 @@ const drawerFooter = new Vue({
|
|
|
console.log(res);
|
|
|
});
|
|
|
}
|
|
|
+ this.screenWidth = document.body.clientWidth
|
|
|
+ window.onresize = () => {
|
|
|
+ return (() => {
|
|
|
+ this.screenWidth = document.body.clientWidth
|
|
|
+ })()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ screenWidth: {
|
|
|
+ handler (val) {
|
|
|
+ this.vantWidth = val * 48 / 100
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
methods: {
|
|
|
// 链接跳转
|