Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wepy-com-paper-drawer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wepy-com-paper-drawer

Wepy paper UI drawer component

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

wepy-com-paper-drawer

A useful drawer/sheet component for use in wepyjs, a Vue-like framework for building WeChat mini programs.

What it looks like

‘left’ mode left-drawer ‘right’ mode right-drawer ‘bottom’ mode bottom-drawer ‘full’ mode full-drawer

Usage

installation

npm install wepy-com-paper-drawer --save

Importing the component

For example, on a page index.wpy

// index.wpy
<template>
    <drawer :mode.sync="left">
    // Slot, put your WXML content of the drawer here
    </drawer>
</template>
<script>
    import wepy from 'wepy'
    import Drawer from 'wepy-com-paper-drawer'

    export default class Index extends wepy.page {
        components = {
            drawer: Drawer
        }

        data = {
            left: "left"
        }
    }
</script>

Showing the drawer

Inside of a @tap handler (or anywhere in a wepy component or page), you could invoke the drawer to display, i.e. show the drawer by calling the /toggle/ function

// index.wpy
	this.$invoke('drawer', 'toggle', null)

Props

There are four props exposed on wepy-com-paper-drawer

open

Default set to true

    <drawer :open.sync="customOpen">
		// slot
    </drawer>
mode

The direction & style of the drawer. Default set to left, available options: left, right, bottom, full

    <drawer :mode.sync="bottom">
		// slot
    </drawer>
closeCLass

Set a custom class to the ‘x’ close icon

    <drawer :closeClass.sync="customCloseClass">
		// slot
    </drawer>
displayClose

Remove the ‘x’ close icon if needed

    <drawer :displayClose.sync="hasDisplayClose">
		// slot
    </drawer>

Keywords

FAQs

Package last updated on 20 May 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc