feat: nicer stall cards
This commit is contained in:
parent
ad0ac073ab
commit
1f0ea23359
5 changed files with 70 additions and 34 deletions
|
|
@ -40,16 +40,8 @@ async function customerMarket(path) {
|
|||
methods: {
|
||||
refreshProducts: function () {
|
||||
this.showProducts = false
|
||||
const searchText = this.searchText?.toLowerCase() || ''
|
||||
this.partialProducts = []
|
||||
|
||||
if (searchText.length < 3) {
|
||||
this.lastProductIndex = Math.min(this.filteredProducts.length, this.productsPerPage)
|
||||
this.partialProducts.push(...this.filteredProducts.slice(0, this.lastProductIndex))
|
||||
setTimeout(() => this.showProducts = true, 0)
|
||||
return
|
||||
}
|
||||
|
||||
this.startIndex = 0
|
||||
this.lastProductIndex = Math.min(this.filteredProducts.length, this.productsPerPage)
|
||||
this.partialProducts.push(...this.filteredProducts.slice(0, this.lastProductIndex))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue