[新增] card 组件
This commit is contained in:
9
src/module/card/index.ts
Normal file
9
src/module/card/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 || 'LayCard ', Component)
|
||||
}
|
||||
|
||||
export default Component as IDefineComponent
|
||||
14
src/module/card/index.vue
Normal file
14
src/module/card/index.vue
Normal file
@@ -0,0 +1,14 @@
|
||||
<template>
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
<slot name="header"></slot>
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<slot name="body"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="LayCard" lang="ts">
|
||||
|
||||
</script>
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { App } from 'vue'
|
||||
import Component from './index.vue'
|
||||
import type { IDefineComponent } from '../../type/index'
|
||||
import type { IDefineComponent } from '../type/index'
|
||||
|
||||
Component.install = (app: App) => {
|
||||
app.component(Component.name || 'LayIcon', Component)
|
||||
|
||||
@@ -3,7 +3,7 @@ import Component from './index.vue'
|
||||
import type { IDefineComponent } from '../type/index'
|
||||
|
||||
Component.install = (app: App) => {
|
||||
app.component(Component.name || 'LayLogo', Component)
|
||||
app.component(Component.name || 'LayPanel', Component)
|
||||
}
|
||||
|
||||
export default Component as IDefineComponent
|
||||
|
||||
Reference in New Issue
Block a user