[文档] 调整目录样式
This commit is contained in:
11
src/index.ts
11
src/index.ts
@@ -29,6 +29,9 @@ import LayTextarea from "./module/textarea/index"
|
||||
import LaySwitch from "./module/switch/index"
|
||||
import LayCollapse from "./module/collapse/index"
|
||||
import LayContainer from "./module/container/index"
|
||||
import LayMenu from './module/menu/index'
|
||||
import LayMenuItem from './module/menuItem/index'
|
||||
import LayMenuChildItem from './module/menuChildItem/index'
|
||||
|
||||
const components: Record<string, IDefineComponent> = {
|
||||
LayRadio,
|
||||
@@ -56,7 +59,10 @@ const components: Record<string, IDefineComponent> = {
|
||||
LayTextarea,
|
||||
LaySwitch,
|
||||
LayCollapse,
|
||||
LayContainer
|
||||
LayContainer,
|
||||
LayMenu,
|
||||
LayMenuItem,
|
||||
LayMenuChildItem
|
||||
}
|
||||
|
||||
const install = (app: App, options?: InstallOptions): void => {
|
||||
@@ -96,6 +102,9 @@ export {
|
||||
LaySwitch,
|
||||
LayCollapse,
|
||||
LayContainer,
|
||||
LayMenu,
|
||||
LayMenuItem,
|
||||
LayMenuChildItem,
|
||||
install,
|
||||
}
|
||||
|
||||
|
||||
9
src/module/menu/index.ts
Normal file
9
src/module/menu/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 || 'LayMenu', Component)
|
||||
}
|
||||
|
||||
export default Component as IDefineComponent
|
||||
9
src/module/menu/index.vue
Normal file
9
src/module/menu/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<ul class="layui-nav layui-nav-tree">
|
||||
<slot></slot>
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
<script setup name="LayMenu" lang="ts">
|
||||
|
||||
</script>
|
||||
9
src/module/menuChildItem/index.ts
Normal file
9
src/module/menuChildItem/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 || 'LayMenuChildItem', Component)
|
||||
}
|
||||
|
||||
export default Component as IDefineComponent
|
||||
7
src/module/menuChildItem/index.vue
Normal file
7
src/module/menuChildItem/index.vue
Normal file
@@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<dd><a href="">选项</a></dd>
|
||||
</template>
|
||||
|
||||
<script setup name="LayMenuChildItem" lang="ts">
|
||||
|
||||
</script>
|
||||
9
src/module/menuItem/index.ts
Normal file
9
src/module/menuItem/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 || 'LayMenuItem', Component)
|
||||
}
|
||||
|
||||
export default Component as IDefineComponent
|
||||
14
src/module/menuItem/index.vue
Normal file
14
src/module/menuItem/index.vue
Normal file
@@ -0,0 +1,14 @@
|
||||
<template>
|
||||
<li class="layui-nav-item">
|
||||
<a href="">{{title}}</a>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
<script setup name="LayMenuItem" lang="ts">
|
||||
import { defineProps } from 'vue'
|
||||
|
||||
const props =
|
||||
defineProps<{
|
||||
title: string
|
||||
}>()
|
||||
</script>
|
||||
Reference in New Issue
Block a user