DEV Community

Cover image for How Can I Implement the Function of Touching and Holding an Image to Save It in Quick Apps
Zachary Powell
Zachary Powell

Posted on

How Can I Implement the Function of Touching and Holding an Image to Save It in Quick Apps

Scenario Description

WeChat mini programs allow you save images to the album by touching and holding them. Currently, HUAWEI Quick App does not have any API to implement this function, but you can trigger events to implement this function

All quick app elements support the longpress event. So you can use the image element to render images and trigger the longpress event on the element to implement the function.

Sample code

Reference: Quick app reference

Top comments (0)