优化店务小程序店铺设置和表单体验

This commit is contained in:
2026-07-22 15:41:12 +08:00
parent 492cbab0fd
commit b9989f8344
14 changed files with 543 additions and 44 deletions
@@ -598,6 +598,7 @@ Page({
},
customerOptions: [],
customerDropdownVisible: false,
customerNameFocused: false,
customerLoading: false,
customerError: '',
products: [],
@@ -651,6 +652,9 @@ Page({
}
this.loadOptions()
this.searchCustomers()
wx.nextTick(() => {
this.setData({ customerNameFocused: true })
})
},
async loadOptions() {
@@ -745,7 +749,10 @@ Page({
onCustomerFocus(event) {
const field = event.currentTarget.dataset.field
this.setData({ customerDropdownVisible: true })
this.setData({
customerDropdownVisible: true,
customerNameFocused: field === 'customerName'
})
this.searchCustomers(field)
},
@@ -794,7 +801,10 @@ Page({
hideCustomerDropdown() {
setTimeout(() => {
this.setData({ customerDropdownVisible: false })
this.setData({
customerDropdownVisible: false,
customerNameFocused: false
})
}, 180)
},