Move pet card actions into menu and use circular brand logos
This commit is contained in:
@@ -9,6 +9,19 @@ Component({
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async more() {
|
||||
if (this.data.saving) return;
|
||||
try {
|
||||
const result = await wx.showActionSheet({
|
||||
itemList: ["编辑档案", "保存身份卡到相册"],
|
||||
itemColor: "#795a4b",
|
||||
});
|
||||
if (result.tapIndex === 0) this.edit();
|
||||
else if (result.tapIndex === 1) await this.save();
|
||||
} catch (error) {
|
||||
if (!/cancel/.test(error.errMsg || "")) toast(error);
|
||||
}
|
||||
},
|
||||
edit() {
|
||||
this.triggerEvent("edit", { id: this.data.pet.id });
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user