home-hot-category.js
579 Bytes
Component({
properties: {
categoryList: {
type: Array,
value: []
},
},
data: {
itemWidth: 93,
imageHeight: 103,
},
attached: function () {
try {
let systemInfo = tt.getSystemInfoSync();
let windowWidth = systemInfo.windowWidth;
let itemWidth = (windowWidth - 3)/4;
let imageHeight = (windowWidth - 3)/4 + 10;
this.setData({
itemWidth,
imageHeight,
})
} catch(e) {
console.log("home-hot-category error: " + e.message)
}
},
methods: {
}
})