# janl-components

> Components of pc base on vue2.x

Latest version **1.0.7** (published 2020-04-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install janl-components
pnpm add janl-components
yarn add janl-components
bun add janl-components
```

## 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.7 |
| Published | 2020-04-08 |
| First published | 2020-04-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 52.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | janl |
| Maintainers | janl |

## Links

- npm: https://www.npmjs.com/package/janl-components
- npm.io page: https://npm.io/package/janl-components

## Dependencies (1)

- [vue](https://npm.io/package/vue.md) ^2.5.11

## Recent versions

- 1.0.7 (latest) — 2020-04-08
- 1.0.6 — 2020-04-07
- 1.0.5 — 2020-04-07
- 1.0.4 — 2020-04-05
- 1.0.3 — 2020-04-05
- 1.0.2 — 2020-04-05
- 1.0.1 — 2020-04-05

## README

# janl-components

> 

## janl-loadingswitch

a component janl-loadingswitch
it working like this;
```
mounted(event)                          timewait->0                           set value
 state(init) ----> state(waiting) -----------------------> state(timeout) -----------------> state(ready)
                      ^  |                                                                   ^   |
                      |  |______________________set value (True/False)_______________________|   |
                      |                          click it to switch                              |
                      ----------------------------------------------------------------------------                                                                                 
```

## prop:

val:         Boolen , if True switch turn on else turn off.
waittime:    Nubmer , countdown seconds default is 10

## event:
mounted :  the component is mounted. for request the fixed status for true or falas.
timeouted: the countdown is end , the switch is disabled , cant't click. not set value to it in loading. retry to request.
change:    the val changed where user click the switch, the val = !val . 

## quick start

```

<janl-loadingswitch 
        :value="val"
        :waittime="wait"
        @change="loadingSwitchChanged"
        @timeouted="loadingTimeOuted"
        @mounted="switchMounted"
        ></janl-loadingswitch>
<button @click="elchange">test button</button>

```
```
export default {
    name: 'app',
    data () {
        return {
        msg: 'Welcome to Your Vue.js App',
        val: true,
        wait: 25,
        }
    },
    methods:{
        elchange(){
            this.val = !this.val
        },
        loadingSwitchChanged(val){
            console.log("janl-loadingswitchchanged. val is:", val)
        },
        loadingTimeOuted(val){
            console.log("janl-loadingswitch loading timeouted, val is:", val)
        },
        switchMounted(val){
            console.log("janl-loadingswitch mounted, val is:", val)
        }
    }

}

```

## good lucky

## 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
```

For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader).

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