@codeniu/vue-divider
Version:
This is divider vue component.
48 lines (32 loc) • 1.43 kB
Markdown
# vue-divider [](https://vuejs.org/) [](https://www.npmjs.com/package/@codeniu/vue-divider) [](https://www.npmjs.com/package/@codeniu/vue-divider)
> vue-divider is a dependency-free, lightweight vue component. This is a study project, You will learn how to build a npm package from this project. You can also learn some webpack configurations.
## [Try the demo](https://codeniu.github.io/vue-divider/demo/)
How to use?
``` bash
npm install -divider
```
Example
``` vue
<template>
<div>
<niu-divider />
<niu-divider>This is a divider</niu-divider>
</div>
</template>
<script>
import niuDivider from '@codeniu/vue-divider';
export default {
components: { niuDivider },
data () {
return { }
}
}
</script>
```
## Options
| Property | Description | type | default |
| ----------------- | ------------ | ------- | ------- |
| contentp-position | 文字位置 | String | left |
| hidden-preset | 隐藏头部标记 | Boolean | false |
[查看npm包的发布教程](https://github.com/Codeniu/vue-divider/blob/main/docs/How-to-publish-your-first-npm-package.md)
[掘金教程](https://juejin.cn/post/7130989356700925983)