Home WeChat Applet Mini Program Development How to reference the ivew weapp control in WeChat applet

How to reference the ivew weapp control in WeChat applet

Aug 21, 2018 pm 05:41 PM

The content of this article is about how to reference the ivew weapp control in the WeChat applet. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

Not long after I came into contact with the WeChat applet, I encountered many pitfalls, one of which required referencing the ivew weapp control in the component.

Because I am using the wepy framework, the page page references the ivew weapp control directly using the usingComponents reference in the page's config, as shown below:

config={
    usingComponents: {
        'i-switch': '../iview/switch/index',
        'i-action-sheet':'../iview/action-sheet/index',
        "i-icon": "../iview/icon/index",
        "i-tabs": "../iview/tabs/index",
        "i-tab": "../iview/tab/index",
        "i-cell-group": "../iview/cell-group/index",
        "i-cell": "../iview/cell/index",
        "calendar": "plugin://calendar/calendar"
    },
}
Copy after login

Then it can be used directly on the page ivew weapp component, but later I found that this method does not take effect in the component. I thought it was not available in the component, but later I accidentally discovered that the ivew weapp component that needs to be used in the component is introduced in the parent page it references. It means that the controls needed in the component are introduced into the parent page, and then they can be used directly in the component. Well, it’s that simple, and it confused me for a long time, haha, I hope it can help you!

Related recommendations:

WeChat Mini Program Example: Code to implement custom date control

WeChat Mini Program Example: Customized Navigation Column implementation method

The above is the detailed content of How to reference the ivew weapp control in WeChat applet. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1654
14
PHP Tutorial
1252
29
C# Tutorial
1225
24