New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

wepy-plugin-usingcomponents

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wepy-plugin-usingcomponents

wepy-plugin-usingcomponents auto require wx min app usingcomponents

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

wepy-plugin-usingcomponents

wepy-plugin-usingcomponents auto require wx min app usingcomponents

自动装载usingcomponents

安装

npm install wepy-plugin-usingcomponents --save-dev

配置wepy.config.js

const path = require("path");
module.exports.plugins = {
    'usingcomponents': {
        dirs = [path.resolve(__dirname, 'node_modules')], //查找的路径, 取第一个找到的目录
        filter = /\.json$/, //解析对应的json文件中的`usingComponents`
        dist = "dist/usingcomponents" //输出到指定目录 , 此目录必须在小程序根目录下
    }
};
//page.wpy
<template lang="pug">
  view
    zan-tab(scroll="{{ true }}"
      list="{{ [{id:1,title:'name'}] }}"
      selected-id="{{ tags[0].id }}"
      height="{{ 30 }}")
</template>
<script>
    import wepy from 'wepy'
    export default class Index extends wepy.page {
        config = {
            usingComponents: {
                "zan-tab": "zanui-weapp/dist/tab"
            }
        }
    }
</script>

效果

Keywords

wepy

FAQs

Package last updated on 26 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts