我们提供/magento2-module-select2-uicomponent

该软件包已被弃用且不再维护。未建议替代软件包。
关于该软件包的最新版本(1.0.1)没有可用的许可信息。

Magento 2 Select2 UI 组件

安装: 565

依赖: 0

建议: 0

安全: 0

星标: 15

关注者: 4

分支: 9

开放问题: 0

语言:JavaScript

类型:magento2-module

1.0.1 2017-06-13 08:54 UTC

This package is not auto-updated.

Last update: 2024-05-28 09:42:12 UTC


README

Magento 2 Select2 UI 组件

安装

  1. composer require weprovide/magento2-module-select2-uicomponent
  2. bin/magento setup:upgrade

使用方法

它可以在任何 UI 组件配置文件中使用。

示例

VENDOR/MODULE/view/adminhtml/ui_component/cms_page_form.xml

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="FIELDSET_NAME">
        <field name="CUSTOM_FIELD">
            <argument name="data" xsi:type="array">
                <item name="options" xsi:type="object">VENDOR\MODULE\Model\Config\Source\CUSTOMSOURCE</item>
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">text</item>
                    <item name="label" xsi:type="string" translate="true">CUSTOM FIELD</item>
                    <item name="formElement" xsi:type="string">select</item>
                    <item name="source" xsi:type="string">page</item>
                    <item name="dataScope" xsi:type="string">CUSTOM_FIELD</item>
                    <item name="elementTmpl" xsi:type="string">WeProvide_Select2UiComponent/form/element/select2</item>
                </item>
            </argument>
        </field>
    </fieldset>
</form>