ci(component): 初步集成 滑块 和 轮播 组件
This commit is contained in:
@@ -55,6 +55,8 @@ import LayPage from './module/page/index'
|
||||
import LayTransfer from './module/transfer/index'
|
||||
import LayCheckboxGroup from './module/checkboxGroup/index'
|
||||
import LaySlider from './module/slider/index'
|
||||
import LayCarousel from './module/carousel/index'
|
||||
|
||||
|
||||
const components: Record<string, IDefineComponent> = {
|
||||
LayRadio,
|
||||
@@ -109,7 +111,8 @@ const components: Record<string, IDefineComponent> = {
|
||||
LayPage,
|
||||
LayTransfer,
|
||||
LayCheckboxGroup,
|
||||
LaySlider
|
||||
LaySlider,
|
||||
LayCarousel
|
||||
}
|
||||
|
||||
const install = (app: App, options?: InstallOptions): void => {
|
||||
@@ -178,6 +181,7 @@ export {
|
||||
LayTransfer,
|
||||
LayCheckboxGroup,
|
||||
LaySlider,
|
||||
LayCarousel,
|
||||
install,
|
||||
}
|
||||
|
||||
|
||||
9
src/module/carousel/index.ts
Normal file
9
src/module/carousel/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 || 'LayCarousel', Component)
|
||||
}
|
||||
|
||||
export default Component as IDefineComponent
|
||||
31
src/module/carousel/index.vue
Normal file
31
src/module/carousel/index.vue
Normal file
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<div
|
||||
class="layui-carousel"
|
||||
id="test1"
|
||||
lay-anim=""
|
||||
lay-indicator="inside"
|
||||
lay-arrow="always"
|
||||
style="width: 100%; height: 280px"
|
||||
>
|
||||
<div carousel-item="">
|
||||
<div> </div>
|
||||
<div> </div>
|
||||
<div> </div>
|
||||
<div> </div>
|
||||
<div class="layui-this"></div>
|
||||
</div>
|
||||
<div class="layui-carousel-ind">
|
||||
<ul>
|
||||
<li class=""></li>
|
||||
<li class=""></li>
|
||||
<li class=""></li>
|
||||
<li class=""></li>
|
||||
<li class="layui-this"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<button class="layui-icon layui-carousel-arrow" lay-type="sub"></button
|
||||
><button class="layui-icon layui-carousel-arrow" lay-type="add"></button>
|
||||
</div>
|
||||
</template>
|
||||
<script setup name="LayCarousel" lang="ts">
|
||||
</script>
|
||||
Reference in New Issue
Block a user