# l-drag

> ## 查看源码

Latest version **1.0.3** (published 2021-04-25) · 0 weekly downloads

## Install

```sh
npm install l-drag
pnpm add l-drag
yarn add l-drag
bun add l-drag
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2021-04-25 |
| First published | 2021-04-07 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 374.5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | 3shs |
| Keywords | drag, vue, components |

## Links

- npm: https://www.npmjs.com/package/l-drag
- Repository: https://github.com/3shs/l-drag
- Homepage: https://github.com/3shs/l-drag#readme
- Issues: https://github.com/3shs/l-drag/issues
- npm.io page: https://npm.io/package/l-drag

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^2.6.11
- [core-js](https://npm.io/package/core-js.md) ^3.6.5

## Recent versions

- 1.0.3 (latest) — 2021-04-25
- 1.0.2 — 2021-04-07
- 1.0.1 — 2021-04-07
- 1.0.0 — 2021-04-07

## README

# l-drag

## 查看源码

### Project setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

## 使用组件 l-drag
```
main.js

1、安装： npm i l-drag
2、引入： import lDrag from 'l-drag'
3、引入样式： import 'l-drag/lib/ldrag.css'
4、使用插件： Vue.use(lDrag)
```
## 配置
```
一、属性配置

   属性              说明                             类型                    默认值 
   visible           是否显示drag 支持.sync           boolean                 false
   title             drag的标题                      string                   无
   width             drag的宽度                      string                   min-width: 500px
   top               drag距离浏览器的top值            string                   15vh



二、slot

    footer  drag 的底部slot



三、事件

    open                       drag打开的回调
    close                      drag关闭的回调



四、例子

<template>
  <div class="about">
    <div @click="handleClick">点击打开拖拽组件</div>
    <l-drag
      title="提示"
      :visible.sync="isShowDrag"
      width="40%"
      @open="handleOpen"
      @close="handleClose">
    </l-drag>
  </div>  
</template>

<script>
export default {
    data () {
        return {
            isShowDrag: false
        }
    },
    methods: {
        handleClick () {
            this.isShowDrag = true
        },
        handleOpen () {

        },
        handleClose () {

        }
    }
}
</script> 

欢迎star~~~(*^▽^*)
```

---
_Source: https://npm.io/package/l-drag · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
