gdpao
This commit is contained in:
@@ -30,22 +30,21 @@
|
||||
show: false,
|
||||
tab_lables: [],
|
||||
submites: '选好了进入首页',
|
||||
rSelect:[],
|
||||
rSelect: [],
|
||||
list: [],
|
||||
};
|
||||
},
|
||||
onLoad(){
|
||||
onLoad() {
|
||||
// 标签的列表展示
|
||||
this.$u.api.labelList({
|
||||
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
this.tab_lables = res.data
|
||||
})
|
||||
},
|
||||
|
||||
mounted(){
|
||||
this.$u.api.labelList({
|
||||
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
this.tab_lables = res.data
|
||||
})
|
||||
},
|
||||
|
||||
mounted() {},
|
||||
methods: {
|
||||
// 选中某个复选框时,由checkbox时触发
|
||||
checkboxChange(e) {
|
||||
@@ -59,11 +58,15 @@
|
||||
this.show = !this.show
|
||||
},
|
||||
// 点击切换颜色
|
||||
tapClick(index,id) {
|
||||
tapClick(index, id) {
|
||||
// console.log(id);
|
||||
if (this.rSelect.indexOf(index) == -1) {
|
||||
this.rSelect.push(index);
|
||||
this.list.push(id); //选中添加到数组里
|
||||
this.rSelect.push(index); // 选中状态
|
||||
this.list.push(id); //选中添加到数组里
|
||||
if (this.rSelect.length > 9) {
|
||||
this.$u.toast("只能选择10个标签!");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
this.rSelect.splice(this.rSelect.indexOf(index), 1); //取消
|
||||
this.list.splice(this.rSelect.indexOf(id), 1); //取消
|
||||
@@ -76,7 +79,7 @@
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -363,9 +366,10 @@
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
// 选中的样式
|
||||
.cur {
|
||||
background-color: #ff5d00!important;
|
||||
color: #fff!important;
|
||||
background-color: #ff5d00 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user