Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LehaoLin committed Apr 16, 2023
1 parent 7737371 commit 52460d4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion frontend/src/views/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -554,14 +554,15 @@ export default {
});
},
async search() {
console.log(this.search_select, this.search_input);
if (this.search_input == "") {
this.searching_data = true;
await this.get_data();
this.searching_data = false;
return;
}
if (this.search_select.value == "1") {
if (this.search_select == "1") {
// tokenID
if (!isNaN(this.search_input)) {
var max_num = await this.contract.methods.totalSupply().call();
Expand Down Expand Up @@ -594,6 +595,16 @@ export default {
type: "warning",
});
}
} else if (this.search_select == "2") {
// labels
// to save network resource, only support filtering the local data
let label = this.search_input;
console.log(this.tableData);
this.tableData = this.tableData.filter((item) => {
if (item.labels.includes(label)) {
return item;
}
});
}
},
async get_more_data() {
Expand Down

0 comments on commit 52460d4

Please sign in to comment.