[新增] block 区块 辅助组件

This commit is contained in:
就眠仪式
2021-09-27 17:39:35 +08:00
parent 909f21f972
commit 4abe76d8b9
7 changed files with 54 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ import LayCol from "./module/col/index"
import LayRow from "./module/row/index"
import LayInput from "./module/input/index"
import LayBadge from "./module/badge/index"
import LayBlock from "./module/block/index"
const components: Record<string, IDefineComponent> = {
LayRadio,
@@ -40,7 +41,8 @@ const components: Record<string, IDefineComponent> = {
LayRow,
LayCol,
LayInput,
LayBadge
LayBadge,
LayBlock
}
const install = (app: App, options?: InstallOptions): void => {
@@ -72,6 +74,7 @@ export {
LayCol,
LayInput,
LayBadge,
LayBlock,
install,
}

View 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 || 'LayBlock', Component)
}
export default Component as IDefineComponent

View File

@@ -0,0 +1,14 @@
<template>
<blockquote class="layui-elem-quote" :class="[nm?'layui-quote-nm':'']">
<slot></slot>
</blockquote>
</template>
<script setup name="LayBlock" lang="ts">
import { defineProps } from '@vue/runtime-core'
const props =
defineProps<{
nm?: boolean
}>()
</script>