|
@@ -113,9 +113,12 @@ export default {
|
|
|
async created() {
|
|
|
// this.option = option
|
|
|
this.option = await this.getColumnData(this.getColumnName(17), option);
|
|
|
- console.log(this.option.column.length)
|
|
|
- if (parseInt(this.option.column.length / 4) !== this.option.column.length / 4){
|
|
|
- const num = 4 - Number(this.option.column.length % 4)
|
|
|
+ let i = 0;
|
|
|
+ this.option.column.forEach(item => {
|
|
|
+ if (item.search) i++
|
|
|
+ })
|
|
|
+ if (i % 4 !== 0){
|
|
|
+ const num = 4 - Number(i % 4)
|
|
|
this.option.searchMenuSpan = num * 6;
|
|
|
this.option.searchMenuPosition = "right";
|
|
|
}
|