[新增] lay-line 分割线组件
This commit is contained in:
parent
4abe76d8b9
commit
eec76e2cb1
25
docs/docs/zh-CN/components/line.md
Normal file
25
docs/docs/zh-CN/components/line.md
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
::: demo
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<lay-line></lay-line>
|
||||||
|
<lay-line theme="red"></lay-line>
|
||||||
|
<lay-line theme="orange"></lay-line>
|
||||||
|
<lay-line theme="green"></lay-line>
|
||||||
|
<lay-line theme="cyan"></lay-line>
|
||||||
|
<lay-line theme="blue"></lay-line>
|
||||||
|
<lay-line theme="black"></lay-line>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { ref } from 'vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
setup() {
|
||||||
|
|
||||||
|
return {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
:::
|
@ -1,32 +1,30 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<div class="width:100%;height:300px">
|
<div class="width:100%;height:300px">
|
||||||
<lay-layout>
|
<lay-layout>
|
||||||
<lay-header>
|
<lay-header>
|
||||||
<lay-logo>
|
<lay-logo> layui-vue </lay-logo>
|
||||||
layui-vue
|
</lay-header>
|
||||||
</lay-logo>
|
<lay-side>
|
||||||
</lay-header>
|
<ul>
|
||||||
<lay-side>
|
<li><router-link to="/zh-CN/components/layout">布局</router-link></li>
|
||||||
<ul>
|
<li><router-link to="/zh-CN/components/button">按钮</router-link></li>
|
||||||
<li><router-link to="/zh-CN/components/layout">布局</router-link></li>
|
<li><router-link to="/zh-CN/components/icon">图标</router-link></li>
|
||||||
<li><router-link to="/zh-CN/components/button">按钮</router-link></li>
|
<li><router-link to="/zh-CN/components/panel">面板</router-link></li>
|
||||||
<li><router-link to="/zh-CN/components/icon">图标</router-link></li>
|
<li><router-link to="/zh-CN/components/card">卡片</router-link></li>
|
||||||
<li><router-link to="/zh-CN/components/panel">面板</router-link></li>
|
<li><router-link to="/zh-CN/components/grid">栅格</router-link></li>
|
||||||
<li><router-link to="/zh-CN/components/card">卡片</router-link></li>
|
<li><router-link to="/zh-CN/components/form">表单</router-link></li>
|
||||||
<li><router-link to="/zh-CN/components/grid">栅格</router-link></li>
|
<li><router-link to="/zh-CN/components/badge">徽章</router-link></li>
|
||||||
<li><router-link to="/zh-CN/components/form">表单</router-link></li>
|
<li><router-link to="/zh-CN/components/block">区块</router-link></li>
|
||||||
<li><router-link to="/zh-CN/components/badge">徽章</router-link></li>
|
<li><router-link to="/zh-CN/components/line">分割</router-link></li>
|
||||||
<li><router-link to="/zh-CN/components/block">区块</router-link></li>
|
</ul>
|
||||||
</ul>
|
</lay-side>
|
||||||
</lay-side>
|
<lay-body>
|
||||||
<lay-body>
|
<div style="padding: 20px">
|
||||||
<div style="padding: 20px">
|
<router-view></router-view>
|
||||||
<router-view></router-view>
|
</div>
|
||||||
</div>
|
</lay-body>
|
||||||
</lay-body>
|
<lay-footer></lay-footer>
|
||||||
<lay-footer></lay-footer>
|
</lay-layout>
|
||||||
</lay-layout>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -59,6 +59,11 @@ const zhCN = [
|
|||||||
path: '/zh-CN/components/block',
|
path: '/zh-CN/components/block',
|
||||||
component: () => import('../../docs/zh-CN/components/block.md'),
|
component: () => import('../../docs/zh-CN/components/block.md'),
|
||||||
meta: { title: '辅助' },
|
meta: { title: '辅助' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/zh-CN/components/line',
|
||||||
|
component: () => import('../../docs/zh-CN/components/line.md'),
|
||||||
|
meta: { title: '分割' },
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -22,6 +22,7 @@ import LayRow from "./module/row/index"
|
|||||||
import LayInput from "./module/input/index"
|
import LayInput from "./module/input/index"
|
||||||
import LayBadge from "./module/badge/index"
|
import LayBadge from "./module/badge/index"
|
||||||
import LayBlock from "./module/block/index"
|
import LayBlock from "./module/block/index"
|
||||||
|
import LayLine from "./module/line/index"
|
||||||
|
|
||||||
const components: Record<string, IDefineComponent> = {
|
const components: Record<string, IDefineComponent> = {
|
||||||
LayRadio,
|
LayRadio,
|
||||||
@ -42,7 +43,8 @@ const components: Record<string, IDefineComponent> = {
|
|||||||
LayCol,
|
LayCol,
|
||||||
LayInput,
|
LayInput,
|
||||||
LayBadge,
|
LayBadge,
|
||||||
LayBlock
|
LayBlock,
|
||||||
|
LayLine
|
||||||
}
|
}
|
||||||
|
|
||||||
const install = (app: App, options?: InstallOptions): void => {
|
const install = (app: App, options?: InstallOptions): void => {
|
||||||
@ -75,6 +77,7 @@ export {
|
|||||||
LayInput,
|
LayInput,
|
||||||
LayBadge,
|
LayBadge,
|
||||||
LayBlock,
|
LayBlock,
|
||||||
|
LayLine,
|
||||||
install,
|
install,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
9
src/module/line/index.ts
Normal file
9
src/module/line/index.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import type { App } from 'vue'
|
||||||
|
import Component from './index.vue'
|
||||||
|
import type { IDefineComponent } from '../type/index'
|
||||||
|
|
||||||
|
Component.install = (app: App) => {
|
||||||
|
app.component(Component.name || 'LayLine', Component)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Component as IDefineComponent
|
12
src/module/line/index.vue
Normal file
12
src/module/line/index.vue
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<template>
|
||||||
|
<hr :class="['layui-border-' + theme]" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="LayLine" lang="ts">
|
||||||
|
import { defineProps } from '@vue/runtime-core'
|
||||||
|
|
||||||
|
const props =
|
||||||
|
defineProps<{
|
||||||
|
theme?: string
|
||||||
|
}>()
|
||||||
|
</script>
|
Loading…
x
Reference in New Issue
Block a user