按钮
{ { num }}
export default {
data() {
return {
lists: ['A', 'B', 'C', 'D', 'E' ,'E' ,'E' ,'E' ,'E' ,'E' ,'E' ,'E' , ],
listMode: true, // 模式 默认一行一个项目
width: 750, // 列表宽
cols_1_margin_left: 0, // 一个项目的左边距
cols_1_margin_bottom: 15, //一个项目的底边距
cols_1_height: 300, // 一个项目的高
cols_2_margin_left: 20, // 两个项目的左边距
cols_2_margin_centre: 15, //两个项目的中边距
cols_2_margin_bottom: 20, //两个项目的左边距
cols_2_height: 460 // 两个项目的高
};
},
methods: {
/**
* 每个项目的样式计算初始化
* @param {Object} idx
*/
initProdStyle(idx) {
if (this.listMode) {
//一行一个
return {
width: `${this.width - this.cols_