0.1.0 • Published 5 years ago

ch-drawer v0.1.0

Weekly downloads
25
License
MIT
Repository
github
Last release
5 years ago

Ch-Drawer

Build Status Netlify Status

A simple drawer component based on Vue.js and used on Web docs here

Install

npm install ch-drawer --save

Usage

import Vue from 'vue';
import ChDrawer from 'ch-drawer'
Vue.use(ChDrawer, { zIndex: 1000 });
// zIndex default value is 200

API

AttributeTypeAccepted ValuesDescriptionDefault
visibleBooleanShould drawer component be displayed support .sync notationfalse
areaString/NumberDrawer's area, if Drawer is horizontal mode it will effect width proporty, otherwise it will effect heightproporty, when area is number type it define the area by pixels, when area is stringtype it define the area by z%'25%'
close-visibleBooleanShould show close buttontrue
maskBooleanShould masked drawer's containertrue
blurBooleanShould changedocument.body become blurrytrue
destroy-on-closeBooleanShould destroy component in default slot,if set value to be true it will be destroyed after hidding drawerfalse
titleStringtitle string will inserted in header slot-
custom-classStringAdd a custom class on drawer container-
locationString'left'/'right'/'top'/'bottom'Describe which direction should drawer popup'left'
escap-on-pressBooleanWhen press esc should close drawertrue
escape-on-clickBooleanWhen click on container(outside of the drawer) should close drawertrue
before-closeFunctionIf set, close process will be halted, function accept next to keep close process continue-
openTrigger when drawer open-
openedTrigger when drawer open animation is finished-
closeTrigger when drawer close-
closedTrigger when drawer closed animation is finished-
headerSlotSlot which named header-
defaultSlotDefault slot on drawer's content-
footerSlotSlot which named footer-