Coder Social home page Coder Social logo

vue-drawer's Introduction

drawerlayout

a vue.js drawer with more function for vue2.x

A Vue.js project

demo

online-demo

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build
	<!-- drawer-->
    <drawer 
    :show="drawerShow" 
    :pos="pos" :tran="tran"
    @change-show="changeDrawerShow">
    <!-- drawerlayout with slot="drawer"-->
      <div class="layout" slot="drawer" >
        <h2><a href="#">bajian drawer</a></h2>
        <ul>
          <li v-for="item in navItems"><a href="#{{item}}">{{item}}</a></li>
        </ul>
      </div>
      <!-- page content -->
      <button v-on:click="directionFlip">directionChange</button><br><br>
      <button v-on:click="tranFlip">tranChange</button><br><br>
      <button v-on:click="drawerToggle">toggle</button>
    </drawer>


    changeDrawerShow(state) {
      this.drawerShow=state;
    }

Api

Properties

Name Type Default Description
pos String left the position where the drawer is:left/right
tran String overlay the transition that the drawer beharior:overlay/push
show.sync Boolean false the drawer visibility,set true to show the drawer
on-hide Function undefined the drawer hide listener
on-show Function undefined the drawer show listener
change-show Function undefined as vue2.0 deprecated the sync,this event must be called to change drawer state by the component itself
==================== ========= ============ ===================

For detailed explanation on how things work, checkout the guide and docs for vue-loader.

vue-drawer's People

Contributors

bajian avatar kant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-drawer's Issues

doesnt work in latest vue

vue.runtime.esm.js?ff9b:455 [Vue warn]: Failed to resolve directive: touch

vue-touch 1.x doesnt support vue 2.x. Vue-touch 2.x has a different api.

No win. This component is busted for the meantime

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.