[新增] field 字段组件

This commit is contained in:
就眠仪式
2021-10-01 22:31:21 +08:00
parent 9cfe1c06d5
commit ba5e4ea5c7
7 changed files with 58 additions and 1 deletions

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

View File

@@ -0,0 +1,15 @@
<template>
<fieldset class="layui-elem-field">
<legend>{{title}}</legend>
<div class="layui-field-box">
<slot></slot>
</div>
</fieldset>
</template>
<script setup name="LayField" lang="ts">
const props =
defineProps<{
title?: string
}>()
</script>