[新增] lay-line 分割线组件
This commit is contained in:
@@ -22,6 +22,7 @@ import LayRow from "./module/row/index"
|
||||
import LayInput from "./module/input/index"
|
||||
import LayBadge from "./module/badge/index"
|
||||
import LayBlock from "./module/block/index"
|
||||
import LayLine from "./module/line/index"
|
||||
|
||||
const components: Record<string, IDefineComponent> = {
|
||||
LayRadio,
|
||||
@@ -42,7 +43,8 @@ const components: Record<string, IDefineComponent> = {
|
||||
LayCol,
|
||||
LayInput,
|
||||
LayBadge,
|
||||
LayBlock
|
||||
LayBlock,
|
||||
LayLine
|
||||
}
|
||||
|
||||
const install = (app: App, options?: InstallOptions): void => {
|
||||
@@ -75,6 +77,7 @@ export {
|
||||
LayInput,
|
||||
LayBadge,
|
||||
LayBlock,
|
||||
LayLine,
|
||||
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>
|
||||
Reference in New Issue
Block a user