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

不言
Release: 2018-08-21 17:41:29
Original
2713 people have browsed it

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!

source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template