1
0
mirror of https://gitee.com/vant-contrib/vant.git synced 2025-04-06 03:57:59 +08:00
vant/static/js/async/7839.7e51e380.js
2024-04-20 08:49:23 +00:00

2 lines
7.0 KiB
JavaScript

/*! For license information please see 7839.7e51e380.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([["7839"],{82458:function(n,s,a){"use strict";a.r(s);var t=a("80681");let e=["innerHTML"];s.default={setup:()=>({html:""}),render:()=>((0,t.wg)(),(0,t.iD)("div",{class:"van-doc-markdown-body",innerHTML:'<h1>Divider</h1>\n<div class="van-doc-card"><h3 id="intro" tabindex="-1">Intro</h3>\n<p>Separate content into multiple areas.</p>\n</div><div class="van-doc-card"><h3 id="install" tabindex="-1">Install</h3>\n<p>Register component globally via <code>app.use</code>, refer to <a href="#/en-US/advanced-usage#zu-jian-zhu-ce" target="_blank">Component Registration</a> for more registration ways.</p>\n<pre><code class="language-js"><span class="hljs-keyword">import</span> { createApp } <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;vue&#x27;</span>;\n<span class="hljs-keyword">import</span> { <span class="hljs-title class_">Divider</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;vant&#x27;</span>;\n\n<span class="hljs-keyword">const</span> app = <span class="hljs-title function_">createApp</span>();\napp.<span class="hljs-title function_">use</span>(<span class="hljs-title class_">Divider</span>);\n</code></pre>\n</div><h2 id="usage" tabindex="-1">Usage</h2>\n<div class="van-doc-card"><h3 id="basic-usage" tabindex="-1">Basic Usage</h3>\n<pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">van-divider</span> /&gt;</span>\n</code></pre>\n</div><div class="van-doc-card"><h3 id="with-text" tabindex="-1">With Text</h3>\n<pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">van-divider</span>&gt;</span>Text<span class="hljs-tag">&lt;/<span class="hljs-name">van-divider</span>&gt;</span>\n</code></pre>\n</div><div class="van-doc-card"><h3 id="content-position" tabindex="-1">Content Position</h3>\n<pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">van-divider</span> <span class="hljs-attr">content-position</span>=<span class="hljs-string">&quot;left&quot;</span>&gt;</span>Text<span class="hljs-tag">&lt;/<span class="hljs-name">van-divider</span>&gt;</span>\n<span class="hljs-tag">&lt;<span class="hljs-name">van-divider</span> <span class="hljs-attr">content-position</span>=<span class="hljs-string">&quot;right&quot;</span>&gt;</span>Text<span class="hljs-tag">&lt;/<span class="hljs-name">van-divider</span>&gt;</span>\n</code></pre>\n</div><div class="van-doc-card"><h3 id="dashed" tabindex="-1">Dashed</h3>\n<pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">van-divider</span> <span class="hljs-attr">dashed</span>&gt;</span>Text<span class="hljs-tag">&lt;/<span class="hljs-name">van-divider</span>&gt;</span>\n</code></pre>\n</div><div class="van-doc-card"><h3 id="custom-style" tabindex="-1">Custom Style</h3>\n<pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">van-divider</span>\n <span class="hljs-attr">:style</span>=<span class="hljs-string">&quot;{ color: &#x27;#1989fa&#x27;, borderColor: &#x27;#1989fa&#x27;, padding: &#x27;0 16px&#x27; }&quot;</span>\n&gt;</span>\n Text\n<span class="hljs-tag">&lt;/<span class="hljs-name">van-divider</span>&gt;</span>\n</code></pre>\n</div><div class="van-doc-card"><h3 id="vertical" tabindex="-1">Vertical</h3>\n<pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">van-divider</span> <span class="hljs-attr">vertical</span> /&gt;</span>\nText\n<span class="hljs-tag">&lt;<span class="hljs-name">van-divider</span> <span class="hljs-attr">vertical</span> <span class="hljs-attr">dashed</span> /&gt;</span>\nText\n<span class="hljs-tag">&lt;<span class="hljs-name">van-divider</span> <span class="hljs-attr">vertical</span> <span class="hljs-attr">:hairline</span>=<span class="hljs-string">&quot;false&quot;</span> /&gt;</span>\nText\n<span class="hljs-tag">&lt;<span class="hljs-name">van-divider</span> <span class="hljs-attr">vertical</span> <span class="hljs-attr">:style</span>=<span class="hljs-string">&quot;{ borderColor: &#x27;#1989fa&#x27; }&quot;</span> /&gt;</span>\n</code></pre>\n</div><h2 id="api" tabindex="-1">API</h2>\n<div class="van-doc-card"><h3 id="props" tabindex="-1">Props</h3>\n<table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Description</th>\n<th>Type</th>\n<th>Default</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>dashed</td>\n<td>Whether to use dashed border</td>\n<td><em>boolean</em></td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td>hairline</td>\n<td>Whether to use hairline</td>\n<td><em>boolean</em></td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td>content-position</td>\n<td>Content position, can be set to <code>left</code> <code>right</code></td>\n<td><em>string</em></td>\n<td><code>center</code></td>\n</tr>\n<tr>\n<td>vertical <code>v4.4.0</code></td>\n<td>Whether to use vertical</td>\n<td><em>boolean</em></td>\n<td><code>false</code></td>\n</tr>\n</tbody>\n</table>\n</div><div class="van-doc-card"><h3 id="slots" tabindex="-1">Slots</h3>\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>default</td>\n<td>content</td>\n</tr>\n</tbody>\n</table>\n</div><div class="van-doc-card"><h3 id="types" tabindex="-1">Types</h3>\n<p>The component exports the following type definitions:</p>\n<pre><code class="language-ts"><span class="hljs-keyword">import</span> <span class="hljs-keyword">type</span> { <span class="hljs-title class_">DividerProps</span>, <span class="hljs-title class_">DividerContentPosition</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;vant&#x27;</span>;\n</code></pre>\n</div><h2 id="theming" tabindex="-1">Theming</h2>\n<div class="van-doc-card"><h3 id="css-variables" tabindex="-1">CSS Variables</h3>\n<p>The component provides the following CSS variables, which can be used to customize styles. Please refer to <a href="#/en-US/config-provider" target="_blank">ConfigProvider component</a>.</p>\n<table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Default Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>--van-divider-margin</td>\n<td><em>var(--van-padding-md) 0</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-divider-vertical-margin</td>\n<td><em>0 var(--van-padding-xs)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-divider-text-color</td>\n<td><em>var(--van-text-color-2)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-divider-font-size</td>\n<td><em>var(--van-font-size-md)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-divider-line-height</td>\n<td><em>24px</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-divider-border-color</td>\n<td><em>var(--van-border-color)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-divider-content-padding</td>\n<td><em>var(--van-padding-md)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-divider-content-left-width</td>\n<td><em>10%</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-divider-content-right-width</td>\n<td><em>10%</em></td>\n<td>-</td>\n</tr>\n</tbody>\n</table>\n</div>'},null,8,e))}}}]);