# vue2-popup

> Vue2Popup: Http component with Progress bar

Latest version **0.0.8** (published 2018-11-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue2-popup
pnpm add vue2-popup
yarn add vue2-popup
bun add vue2-popup
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2018-11-30 |
| First published | 2018-09-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 4.2.0 |
| Dependencies | 2 |
| Unpacked size | 48.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | sanchit |
| Maintainers | san-kumar |
| Keywords | vue, bootstrap, Vue2Popup, vue2-popup |

## Links

- npm: https://www.npmjs.com/package/vue2-popup
- Repository: https://github.com/san-kumar/vue2-popup
- Issues: https://github.com/san-kumar/vue2-popup/issues
- npm.io page: https://npm.io/package/vue2-popup

## Dependencies (2)

- [jquery](https://npm.io/package/jquery.md) ^3.3.1
- [eslint-plugin-vue](https://npm.io/package/eslint-plugin-vue.md) ^5.0.0-beta.3

## Alternatives

- [@sveltejs/kit](https://npm.io/package/@sveltejs/kit.md) — 2.2M weekly downloads
- [@atlaskit/theme](https://npm.io/package/@atlaskit/theme.md) — 402.0K weekly downloads
- [@tangle-network/brand](https://npm.io/package/@tangle-network/brand.md) — 10.0K weekly downloads
- [seneca](https://npm.io/package/seneca.md) — 7.4K weekly downloads
- [@bsb/base](https://npm.io/package/@bsb/base.md) — 7.2K weekly downloads

## Recent versions

- 0.0.8 (latest) — 2018-11-30
- 0.0.7 — 2018-11-10
- 0.0.6 — 2018-11-10
- 0.0.5 — 2018-09-21
- 0.0.4 — 2018-09-21
- 0.0.3 — 2018-09-21
- 0.0.2 — 2018-09-20

## README

# Vue2Popup

> Vue Component for Vue 2.x

## Install

``` bash
    npm install vue2-popup --save
```

## Demo

For demo, please [see here](https://jsfiddle.net/superasn/e08wLyju/) 

## Usage

*1\. Import the component*

```
import Vue2Popup from 'vue2-popup';
```

*2\.1 Use it globally*

```
Vue.use(Vue2Popup);

// OR with options

Vue.use(Vue2Popup, {baseURL: 'https://jsonplaceholder.typicode.com/', headers: {'X-API-KEY': 1234}});
```

*3\. Access it locally

```
<template>
    <vue2-popup ref="http" v-model="data" :error-fn="onError"></vue2-popup>
</template>
```

```
components: {
    'vue2-popup': Vue2Popup
},

```

## Properties

- **title**: *String*

- **size**: *String*

- **static**: *Boolean*

- **saveBtn**: *Boolean* (default: *1*)

- **cancelBtn**: *Boolean* (default: *1*)

- **mini**: *Boolean*

- **closeBtnLabel**: *String* (default: *Close*)

- **cancelBtnLabel**: *String* (default: *Cancel*)

- **saveBtnLabel**: *String* (default: *Save*)

- **forceFooter**: *Boolean*



## Example

    <template>
        <div id="app">
            <div>
                <vue2-popup ref="popup" :save-btn="true" :mini="true">
                    <input-box v-model="data"></input-box>
                </vue2-popup>
    
                <vue2-popup size="sm" ref="popup2" :save-btn="true" :mini="true" :modal="true">
                    just static modal
                </vue2-popup>
    
                <p>Data only changes if the user presses save!</p>
                <p><code>this.$parent.$on('save', () => ...)</code> in &lt;input-box&gt; or child component</p>
                <p v-for="i in 10">&nbsp;</p>
                <pre>{{data}}</pre>
    
                <button class="btn btn-primary btn-sm" type="button" @click="$refs.popup.show()">Test</button>
    
            </div>
        </div>
    </template>
    
    <script>
        import Vue from 'vue';
        import Vue2Popup from '../src/index'
        import InputBox from "./InputBox";
    
        Vue.use(Vue2Popup, {});
    
        export default {
            name: 'app',
            components: {InputBox},
            data() {
                return {
                    data: {keyword: 123},
                }
            },
            mounted(){
                this.$refs.popup.show();
                setTimeout(() => this.$refs.popup2.show(), 2000);
            },
            methods: {
                test() {
                    // code
                }
            },
        }
    </script>
    

## Contributing

Contributions are welcome

## Build Setup

``` bash
# install dependencies
npm install

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

# build for production with minification
npm run build
```

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