🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@ophiuchus/divider

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ophiuchus/divider

### 介绍

latest
npmnpm
Version
1.0.1
Version published
Weekly downloads
5
-58.33%
Maintainers
1
Weekly downloads
 
Created
Source

Divider 分割线

介绍

用于将内容分隔为多个区域。

引入

import Vue from 'vue';
import Divider from '@ophiuchus/divider';

Vue.use(Divider);

代码演示

基础用法

默认渲染一条水平分割线。

<sf-divider />

展示文字

通过插槽在可以分割线中间插入内容。

<sf-divider>文字</sf-divider>

内容位置

通过 content-position 指定内容所在位置。

<sf-divider content-position="left">文字</sf-divider>
<sf-divider content-position="right">文字</sf-divider>

虚线

添加 dashed 属性使分割线渲染为虚线。

<sf-divider dashed>文字</sf-divider>

自定义样式

可以直接通过 style 属性设置分割线的样式。

<sf-divider
  :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 16px' }"
>
  文字
</sf-divider>

API

Props

参数说明类型默认值
dashed是否使用虚线booleanfalse
hairline是否使用 0.5px 线booleantrue
content-position内容位置,可选值为left rightstringcenter

Slots

名称说明
default内容

样式变量

组件提供了下列 Less 变量,可用于自定义样式,使用方法请参考主题定制

名称默认值描述
@divider-margin@padding-md 0-
@divider-text-color@gray-6-
@divider-font-size@font-size-md-
@divider-line-height24px-
@divider-border-color@border-color-
@divider-content-padding@padding-md-
@divider-content-left-width10%-
@divider-content-right-width10%-

Keywords

ui

FAQs

Package last updated on 26 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts