浏览文章

文章信息

Magento2 图片上传UI 13433

<field name="featured_img">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">string</item>
                    <item name="source" xsi:type="string">post</item>
                    <item name="label" xsi:type="string" translate="true">Featured Image</item>
                    <item name="visible" xsi:type="boolean">true</item>
                    <item name="formElement" xsi:type="string">fileUploader</item>
                    <item name="elementTmpl" xsi:type="string">ui/form/element/uploader/uploader</item>
                    <item name="previewTmpl" xsi:type="string">Magento_Catalog/image-preview</item>
                    <item name="required" xsi:type="boolean">false</item>
                    <item name="uploaderConfig" xsi:type="array">
                        <item name="url" xsi:type="url" path="Aiweline/Blog/featuredImg"/>
                    </item>
                    <item name="sortOrder" xsi:type="number">10</item>
                </item>
            </argument>
        </field>


原创