An open API service indexing awesome lists of open source software.

https://github.com/codegather/vue-initi

这是一个通过Vue directive来实现在加载之前通过占位来保持布局状态的插件
https://github.com/codegather/vue-initi

Last synced: 4 months ago
JSON representation

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

Awesome Lists containing this project

README

        

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

点击查看demo演示

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

可执行例子:

```




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';
})
}
}

```

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

```