定制 piszczek/magento2-inputmask 二次开发

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

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

piszczek/magento2-inputmask

Composer 安装命令:

composer require piszczek/magento2-inputmask

包简介

Add inputMask parameter to abstract input. Based on IMask.

README 文档

README

This simply plugin allows add input mask configuration to form ui component configuration.

Based on Imask and support most of the configuration (except passing js function as a parameters).

Installation

composer require piszczek/magento2-inputmask

Example

Location app/code/Your/Module/view/adminhtml/ui_component/your_module_model_form.xml

<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    ....
    <fieldset name="General">
        ...
        <field name="zip_code" formElement="input">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="inputMask" xsi:type="array">
                        <!-- pass your simple mask here-->
                        <item name="mask" xsi:type="string">00-000</item>
                    </item>
                </item>
            </argument>
            <settings>
                <validation>
                    <rule name="required-entry" xsi:type="boolean">true</rule>
                </validation>
                <label translate="true">Zip Code</label>
                <placeholder>00-000</placeholder>
            </settings>
        </field>
        ...
    </fieldset>
</form>

This plugin is lazy load - inputmask.min.js is only load when is required by one of fields in page.

统计信息

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

GitHub 信息

  • Stars: 10
  • Watchers: 2
  • Forks: 5
  • 开发语言: JavaScript

其他信息

  • 授权协议: proprietary
  • 更新时间: 2018-01-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固