# vue-initi

> 这是一个通过Vue directive来实现在加载之前通过占位来保持布局状态的插件

Latest version **1.0.1** (published 2018-09-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-initi
pnpm add vue-initi
yarn add vue-initi
bun add vue-initi
```

## 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.1 |
| Published | 2018-09-21 |
| First published | 2018-09-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 16.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | raohong07@163.com |
| Maintainers | toolcool |
| Keywords | vue, placeholder, directive, v-initi, img, text |

## Links

- npm: https://www.npmjs.com/package/vue-initi
- Repository: https://github.com/CodeGather/vue-initi
- Homepage: https://github.com/CodeGather/vue-initi#readme
- Issues: https://github.com/CodeGather/vue-initi/issues
- npm.io page: https://npm.io/package/vue-initi

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 1.0.1 (latest) — 2018-09-21
- 1.0.0 — 2018-09-02

## README

# vue-initi
这是一个通过Vue directive来实现在加载之前通过占位来保持布局状态的插件


# Install
Using `yarn` or `npm` to install `vue-initi`:

```
# yarn
yarn add vue-initi

# npm
npm install vue-initi
```

# Usage
In your `main.js` file:

```
import VueIniti from 'vue-initi'

Vue.use(VueIniti)
```

Now `vue-initi` is a global Vue directive, you can use `v-initi` in every `.vue` file.

# Params

|  param |   type   | description | necessary |
| ------ | -------- | ----------- | --------- |
|  data  | {Object} | the data you bind to the node | Yes |
| config | {Object} | the color lump's css config | No |

可执行例子:

```
<template>
  <div id="app" style="width:200px;height:50px;">
    <div v-initi="{ data: content, config }"></div>
    <img v-initi="{ data: src, config: {width: '100px',height: '100px',borderRadius: '50%'}}">
  </div>
</template>

<script>
export default {
  data () {
    return {
      src: '',
      content: '',
      config: {
        width: '200px',
        height: '18px',
        background: '#ddd'
      }
    }
  },
  mounted () {
    setTimeout(()=>{
        this.content = 'Hello world！';
	this.src = 'https://www.baidu.com/img/baidu_jgylogo3.gif';
    })
  }
}
</script>
```

And the note with `v-initi` will be like this:

```
<div v-initi="{ data: content, config }">
  <div style="width: 100%; height: 100%; background: #eee;></div>
</div>
```

# Lisence
MIT

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