定制 element119/module-hyva-canvas 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

element119/module-hyva-canvas

最新稳定版本:1.0.1

Composer 安装命令:

composer require element119/module-hyva-canvas

包简介

A Magento 2 module that adds an AlpineJS-powered HTML canvas component to Hyvä themes.

README 文档

README

element119 | Hyvä Canvas

github release github release date license packagist downloads

hyva-canvas

📝 Features

✔️ Adds an AlpineJS-powered canvas component to Hyvä themes

✔️ Allows customers to draw, reset, and submit canvas data

✔️ Responsive design to suit mobile and desktop devices

✔️ Supports multiple canvas components per page


🔌 Installation

Run the following command to install this module:

composer require element119/module-hyva-canvas
php bin/magento setup:upgrade

⏫ Updating

Run the following command to update this module:

composer update element119/module-hyva-canvas
php bin/magento setup:upgrade

❌ Uninstallation

Run the following command to uninstall this module:

composer remove element119/module-hyva-canvas
php bin/magento setup:upgrade

📚 User Guide

Adding the Canvas Component

To add the canvas component to a page, simply use layout XML to create a new block using the Element119_HyvaCanvas::canvas.phtml template.

<block name="my.canvas.component" template="Element119_HyvaCanvas::canvas.phtml"/>

Obtaining the Canvas Value

A custom JavaScript event is fired whenever the user submits their canvas data. This event name is customer-canvas-submitted and the canvas data can be accessed via its detail object:

{
    ...
    detail: {
        canvasBlockName: "my_canvas_component",
        canvasImage: "data:image/png;base64,iVBORw0...",
    },
    ...
}

canvas-demo

统计信息

  • 总下载量: 1.84k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 1
  • 开发语言: HTML

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2022-10-31