[新增] panel 组件
This commit is contained in:
@@ -11,6 +11,7 @@ import LayBody from "./module/body/index"
|
||||
import LayHeader from "./module/header/index"
|
||||
import LayFooter from "./module/footer/index"
|
||||
import LayLogo from "./module/logo/index"
|
||||
import LayPanel from "./module/panel/index"
|
||||
|
||||
const components: Record<string, IDefineComponent> = {
|
||||
LayRadio,
|
||||
@@ -21,7 +22,8 @@ const components: Record<string, IDefineComponent> = {
|
||||
LayHeader,
|
||||
LayBody,
|
||||
LayFooter,
|
||||
LayLogo
|
||||
LayLogo,
|
||||
LayPanel
|
||||
}
|
||||
|
||||
const install = (app: App, options?: InstallOptions): void => {
|
||||
@@ -44,6 +46,7 @@ export {
|
||||
LayBody,
|
||||
LayFooter,
|
||||
LayLogo,
|
||||
LayPanel,
|
||||
install,
|
||||
}
|
||||
|
||||
|
||||
9
src/module/panel/index.ts
Normal file
9
src/module/panel/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 || 'LayLogo', Component)
|
||||
}
|
||||
|
||||
export default Component as IDefineComponent
|
||||
9
src/module/panel/index.vue
Normal file
9
src/module/panel/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<div class="layui-panel">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="LayPanel" lang="ts">
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user